5#include "testing/testing.h"
14TEST(index_range, DefaultConstructor)
26TEST(index_range, FromBeginSize)
30 EXPECT_TRUE(range.is_empty());
45TEST(index_range, FromBeginEnd)
49 EXPECT_TRUE(range.is_empty());
64TEST(index_range, FromBeginEndInclusive)
79TEST(index_range, FromEndSize)
83 EXPECT_TRUE(range.is_empty());
92TEST(index_range, FromSingle)
106TEST(index_range, SingleElementRange)
121TEST(index_range, MultipleElementRange)
132 for (
int i = 0; i < 4; i++) {
137TEST(index_range, SubscriptOperator)
167 EXPECT_TRUE(range.contains(5));
168 EXPECT_TRUE(range.contains(6));
169 EXPECT_TRUE(range.contains(7));
170 EXPECT_FALSE(range.contains(4));
171 EXPECT_FALSE(range.contains(8));
192TEST(index_range, OneBeforeStart)
236 auto slice = a.drop_back(2);
245 auto slice = a.drop_back(a.size());
246 EXPECT_TRUE(slice.is_empty());
252 auto slice = a.drop_front(1);
259TEST(index_range, DropFrontLargeN)
282TEST(index_range, TakeFrontLargeN)
292 auto slice = a.take_back(2);
298TEST(index_range, TakeBackLargeN)
309 std::array<int, range[0]> compiles = {1};
314TEST(index_range, GenericAlgorithms)
317 EXPECT_TRUE(std::any_of(range.begin(), range.end(), [](
int v) { return v == 6; }));
318 EXPECT_FALSE(std::any_of(range.begin(), range.end(), [](
int v) { return v == 20; }));
319 EXPECT_EQ(std::count_if(range.begin(), range.end(), [](
int v) { return v < 7; }), 3);
322TEST(index_range, SplitByAlignment)
#define BLI_STATIC_ASSERT(a, msg)
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a vector
ATTR_WARN_UNUSED_RESULT const BMVert * v
DBVT_INLINE bool Intersect(const btDbvtAabbMm &a, const btDbvtAabbMm &b)
constexpr int64_t first() const
static constexpr IndexRange from_end_size(const int64_t end, const int64_t size)
constexpr int64_t last(const int64_t n=0) const
constexpr int64_t size() const
constexpr bool is_empty() const
static constexpr IndexRange from_begin_end(const int64_t begin, const int64_t end)
static constexpr IndexRange from_begin_size(const int64_t begin, const int64_t size)
constexpr IndexRange after(int64_t n) const
constexpr IndexRange before(int64_t n) const
constexpr IndexRange take_back(int64_t n) const
static constexpr IndexRange from_single(const int64_t index)
constexpr IndexRange slice(int64_t start, int64_t size) const
constexpr IndexRange take_front(int64_t n) const
static constexpr IndexRange from_begin_end_inclusive(const int64_t begin, const int64_t last)
constexpr IndexRange drop_front(int64_t n) const
TEST(any, DefaultConstructor)
AlignedIndexRanges split_index_range_by_alignment(const IndexRange range, const int64_t alignment)