5#include "testing/testing.h"
14TEST(index_range, DefaultConstructor)
26TEST(index_range, FromBeginSize)
45TEST(index_range, FromBeginEnd)
64TEST(index_range, FromBeginEndInclusive)
79TEST(index_range, FromEndSize)
92TEST(index_range, FromSingle)
106TEST(index_range, SingleElementRange)
121TEST(index_range, MultipleElementRange)
132 for (
int i = 0;
i < 4;
i++) {
137TEST(index_range, SubscriptOperator)
192TEST(index_range, OneBeforeStart)
246 EXPECT_TRUE(slice.is_empty());
259TEST(index_range, DropFrontLargeN)
282TEST(index_range, TakeFrontLargeN)
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; }));
322TEST(index_range, SplitByAlignment)
#define BLI_STATIC_ASSERT(a, msg)
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
ATTR_WARN_UNUSED_RESULT const BMVert * v
DBVT_INLINE bool Intersect(const btDbvtAabbMm &a, const btDbvtAabbMm &b)
constexpr int64_t one_before_start() const
constexpr int64_t first() const
constexpr int64_t one_after_last() const
constexpr Iterator end() const
constexpr IndexRange intersect(IndexRange other) const
constexpr IndexRange drop_back(int64_t n) 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 int64_t start() const
constexpr IndexRange before(int64_t n) const
constexpr IndexRange take_back(int64_t n) const
constexpr Iterator begin() const
static constexpr IndexRange from_single(const int64_t index)
constexpr IndexRange slice(int64_t start, int64_t size) const
constexpr bool contains(int64_t value) 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
AlignedIndexRanges split_index_range_by_alignment(const IndexRange range, const int64_t alignment)