12#include "testing/testing.h"
28 std::array<int, 5>
data = {3, 4, 5, 6, 7};
104 std::vector<int> vector = {5, 6, 7, 8};
113 std::array<int, 4>
array = {2, 3, 4, 5};
155static int get_x(
const std::array<int, 3> &item)
160static void set_x(std::array<int, 3> &item,
int value)
169 vector.append({1, 1, 1});
191 std::array<int, 4>
array = {4, 2, 6, 4};
221 std::array<int, 10>
array = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90};
223 std::array<int, 3> compressed_array;
237 std::array<int, 3> compressed_array;
243 compressed_array.fill(0);
252 std::array<int, 3> compressed_array;
307 EXPECT_EQ_SPAN(span1, {42, 42, 42});
350 EXPECT_EQ_SPAN(span1, {0, 1, 2});
353 EXPECT_EQ_SPAN(span2, {7, 8, 9});
356 EXPECT_EQ_SPAN(span3, {5});
359TEST(generic_virtual_array, FromFunc)
363 new (r_value) std::string(std::to_string(i));
static const CPPType & get()
static GVArray from_func(const CPPType &type, int64_t size, GetToUninitFn &&get_to_uninit)
VArray< T > typed() const
static IndexMask from_indices(Span< T > indices, LinearAllocator<> &memory)
static constexpr IndexRange from_begin_size(const int64_t begin, const int64_t size)
constexpr const T * data() const
constexpr int64_t size() const
void materialize_compressed_to_uninitialized(const IndexMask &mask, MutableSpan< T > r_span) const
T get_internal_single() const
T get(const int64_t index) const
void materialize_compressed(const IndexMask &mask, MutableSpan< T > r_span) const
Span< T > get_internal_span() const
Span< T > get_span_for_range(const IndexRange range) const
static VArray from_derived_span(Span< StructT > values)
static VArray from_std_func(const int64_t size, std::function< T(int64_t index)> get_func)
static VArray from_single(T value, const int64_t size)
static VArray from_func(const int64_t size, GetFunc get_func)
static VArray from_span(Span< T > values)
static VArray from_container(ContainerT container)
static VMutableArray from_derived_span(MutableSpan< StructT > values)
void set(const int64_t index, T value)
static VMutableArray from_container(ContainerT container)
MutableSpan< T > get_internal_span() const
static VMutableArray from_span(MutableSpan< T > values)
void append(const T &value)
constexpr bool is_empty() const
constexpr bool is_empty() const
constexpr int64_t size() const
static void SetUpTestSuite()
#define EXPECT_FALSE(result)
#define EXPECT_TRUE(result)
TEST_F(BlfLoadTest, load)
static int get_x(const std::array< int, 3 > &item)
TEST(any_virtual, DefaultConstructor)
static void set_x(std::array< int, 3 > &item, int value)
BMesh const char void * data
void register_cpp_types()
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)