8#include "testing/testing.h"
12TEST(any, DefaultConstructor)
15 EXPECT_FALSE(a.has_value());
21 EXPECT_TRUE(a.has_value());
22 EXPECT_TRUE(a.is<
int>());
23 EXPECT_FALSE(a.is<
float>());
24 const int &value = a.get<
int>();
30 EXPECT_TRUE(
b.has_value());
33 Any<> c = std::move(a);
46 EXPECT_TRUE(a.has_value());
57 Any<> c = std::move(a);
60 c =
static_cast<decltype(a) &
>(c);
70 Any<> b = std::string(
"hello");
74 EXPECT_FALSE(
z.has_value());
77 EXPECT_TRUE(
z.has_value());
84 EXPECT_FALSE(
z.has_value());
87 EXPECT_FALSE(
z.is<
int>());
88 EXPECT_TRUE(
z.is<
Any<>>());
115 EXPECT_EQ(a.extra_info().size,
sizeof(
int));
117 a = std::string(
"hello");
118 EXPECT_EQ(a.extra_info().size,
sizeof(std::string));
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
bool add(const Key &key, const Value &value)
const Value & lookup(const Key &key) const
local_group_size(16, 16) .push_constant(Type b
TEST(any, DefaultConstructor)