7#include "testing/testing.h"
13 return operation(a,
b);
16TEST(function_ref, StatelessLambda)
22TEST(function_ref, StatefullLambda)
24 const int factor = 10;
26 2, 3, [&](
int a,
int b) {
return factor * (a +
b); });
35TEST(function_ref, StandaloneFunction)
41TEST(function_ref, ConstantFunction)
43 auto f = []() {
return 42; };
48TEST(function_ref, MutableStatefullLambda)
51 auto f = [&]()
mutable {
return counter++; };
63 auto f = []() {
return 1; };
71TEST(function_ref, CopyDoesNotReferenceFunctionRef)
73 auto f1 = []() {
return 1; };
74 auto f2 = []() {
return 2; };
81TEST(function_ref, CopyDoesNotReferenceFunctionRef2)
83 auto f = []() {
return 1; };
92TEST(function_ref, ReferenceAnotherFunctionRef)
94 auto f1 = []() {
return 1; };
95 auto f2 = []() {
return 2; };
97 auto f3 = [&]() {
return x(); };
104TEST(function_ref, InitializeWithNull)
120TEST(function_ref, OverloadSelection)
122 const auto fn_1 = [](std::string ) {};
123 const auto fn_2 = [](
int ) {};
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
local_group_size(16, 16) .push_constant(Type b
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
static int add_two_numbers(int a, int b)
static int perform_binary_operation(int a, int b, FunctionRef< int(int, int)> operation)
TEST(any, DefaultConstructor)
static int overload_test(const FunctionRef< void(std::string)>)