Blender V4.3
blender::bke::idprop::tests Namespace Reference

Functions

static void check_container_value (ArrayValue *value)
 
static void check_object_attribute (const DictionaryValue::Lookup &lookup, const std::string expected_key, const std::string expected_value)
 
static void check_object_attribute (const DictionaryValue::Lookup &lookup, const std::string expected_key, const int32_t expected_value)
 
static void check_object_attribute (const DictionaryValue::Lookup &lookup, const std::string expected_key, const float expected_value)
 
static void check_object_attribute (const DictionaryValue::Lookup &lookup, const std::string expected_key, const double expected_value)
 
static void test_string_to_value (const StringRefNull prop_name, const StringRefNull prop_content)
 
 TEST (idprop, convert_idp_string_to_value)
 
static void test_int_to_value (const StringRefNull prop_name, int32_t prop_content)
 
 TEST (idprop, convert_idp_int_to_value)
 
static void test_float_to_value (const StringRefNull prop_name, float prop_content)
 
 TEST (idprop, convert_idp_float_to_value)
 
static void test_double_to_value (const StringRefNull prop_name, double prop_content)
 
 TEST (idprop, convert_idp_double_to_value)
 
template<typename PrimitiveType , typename ValueType >
static void test_array_to_value (const StringRefNull prop_name, Vector< PrimitiveType > prop_content)
 
 TEST (idprop, convert_idp_int_array_to_value)
 
 TEST (idprop, convert_idp_float_array_to_value)
 
 TEST (idprop, convert_idp_double_array_to_value)
 
static std::unique_ptr< Valueparse_json (StringRef input)
 
static std::string to_json (const Value &value)
 
static void test_idprop (const IDProperty *id_property, StringRef expected_name, StringRef expected_value)
 
static void test_idprop (const IDProperty *id_property, StringRef expected_name, int32_t expected_value)
 
static void test_idprop (const IDProperty *id_property, StringRef expected_name, float expected_value)
 
static void test_idprop (const IDProperty *id_property, StringRef expected_name, double expected_value)
 
static void test_idprop (const IDProperty *id_property, StringRef expected_name, const Span< int32_t > values)
 
static void test_idprop (const IDProperty *id_property, StringRef expected_name, const Span< float > values)
 
static void test_idprop (const IDProperty *id_property, StringRef expected_name, const Span< double > values)
 
template<typename Type >
static void test_convert_idprop_from_value (StringRef input, StringRef expected_name, Type expected_value)
 
 TEST (idprop, convert_idp_string_from_value)
 
 TEST (idprop, convert_idp_int_from_value)
 
 TEST (idprop, convert_idp_float_from_value)
 
 TEST (idprop, convert_idp_double_from_value)
 
 TEST (idprop, convert_idp_array_int_from_value)
 
 TEST (idprop, convert_idp_array_float_from_value)
 
 TEST (idprop, convert_idp_array_double_from_value)
 
 TEST (idprop, convert_idp_multiple_from_value)
 
 TEST (idprop, convert_idp_multiple_roundtrip)
 
 TEST (idprop, convert_idp_group_from_value)
 

Function Documentation

◆ check_container_value()

static void blender::bke::idprop::tests::check_container_value ( ArrayValue * value)
static

◆ check_object_attribute() [1/4]

static void blender::bke::idprop::tests::check_object_attribute ( const DictionaryValue::Lookup & lookup,
const std::string expected_key,
const double expected_value )
static

Definition at line 60 of file idprop_serialize_test.cc.

References EXPECT_EQ().

◆ check_object_attribute() [2/4]

static void blender::bke::idprop::tests::check_object_attribute ( const DictionaryValue::Lookup & lookup,
const std::string expected_key,
const float expected_value )
static

Definition at line 50 of file idprop_serialize_test.cc.

References EXPECT_EQ().

◆ check_object_attribute() [3/4]

static void blender::bke::idprop::tests::check_object_attribute ( const DictionaryValue::Lookup & lookup,
const std::string expected_key,
const int32_t expected_value )
static

Definition at line 40 of file idprop_serialize_test.cc.

References EXPECT_EQ().

◆ check_object_attribute() [4/4]

static void blender::bke::idprop::tests::check_object_attribute ( const DictionaryValue::Lookup & lookup,
const std::string expected_key,
const std::string expected_value )
static

◆ parse_json()

static std::unique_ptr< Value > blender::bke::idprop::tests::parse_json ( StringRef input)
static

◆ TEST() [1/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_array_double_from_value  )

Definition at line 352 of file idprop_serialize_test.cc.

References test_convert_idprop_from_value().

◆ TEST() [2/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_array_float_from_value  )

Definition at line 344 of file idprop_serialize_test.cc.

References test_convert_idprop_from_value().

◆ TEST() [3/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_array_int_from_value  )

Definition at line 336 of file idprop_serialize_test.cc.

References test_convert_idprop_from_value().

◆ TEST() [4/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_double_array_to_value  )

Definition at line 192 of file idprop_serialize_test.cc.

References test_array_to_value().

◆ TEST() [5/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_double_from_value  )

Definition at line 330 of file idprop_serialize_test.cc.

References test_convert_idprop_from_value().

◆ TEST() [6/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_double_to_value  )

Definition at line 149 of file idprop_serialize_test.cc.

References test_double_to_value().

◆ TEST() [7/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_float_array_to_value  )

Definition at line 186 of file idprop_serialize_test.cc.

References test_array_to_value().

◆ TEST() [8/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_float_from_value  )

Definition at line 324 of file idprop_serialize_test.cc.

References test_convert_idprop_from_value().

◆ TEST() [9/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_float_to_value  )

Definition at line 128 of file idprop_serialize_test.cc.

References test_float_to_value().

◆ TEST() [10/17]

◆ TEST() [11/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_int_array_to_value  )

Definition at line 180 of file idprop_serialize_test.cc.

References test_array_to_value().

◆ TEST() [12/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_int_from_value  )

Definition at line 318 of file idprop_serialize_test.cc.

References test_convert_idprop_from_value().

◆ TEST() [13/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_int_to_value  )

Definition at line 107 of file idprop_serialize_test.cc.

References test_int_to_value().

◆ TEST() [14/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_multiple_from_value  )

◆ TEST() [15/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_multiple_roundtrip  )

◆ TEST() [16/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_string_from_value  )

Definition at line 310 of file idprop_serialize_test.cc.

References test_convert_idprop_from_value().

◆ TEST() [17/17]

blender::bke::idprop::tests::TEST ( idprop ,
convert_idp_string_to_value  )

Definition at line 86 of file idprop_serialize_test.cc.

References test_string_to_value().

◆ test_array_to_value()

◆ test_convert_idprop_from_value()

template<typename Type >
static void blender::bke::idprop::tests::test_convert_idprop_from_value ( StringRef input,
StringRef expected_name,
Type expected_value )
static

◆ test_double_to_value()

static void blender::bke::idprop::tests::test_double_to_value ( const StringRefNull prop_name,
double prop_content )
static

◆ test_float_to_value()

static void blender::bke::idprop::tests::test_float_to_value ( const StringRefNull prop_name,
float prop_content )
static

◆ test_idprop() [1/7]

static void blender::bke::idprop::tests::test_idprop ( const IDProperty * id_property,
StringRef expected_name,
const Span< double > values )
static

◆ test_idprop() [2/7]

static void blender::bke::idprop::tests::test_idprop ( const IDProperty * id_property,
StringRef expected_name,
const Span< float > values )
static

◆ test_idprop() [3/7]

static void blender::bke::idprop::tests::test_idprop ( const IDProperty * id_property,
StringRef expected_name,
const Span< int32_t > values )
static

◆ test_idprop() [4/7]

static void blender::bke::idprop::tests::test_idprop ( const IDProperty * id_property,
StringRef expected_name,
double expected_value )
static

◆ test_idprop() [5/7]

static void blender::bke::idprop::tests::test_idprop ( const IDProperty * id_property,
StringRef expected_name,
float expected_value )
static

◆ test_idprop() [6/7]

static void blender::bke::idprop::tests::test_idprop ( const IDProperty * id_property,
StringRef expected_name,
int32_t expected_value )
static

Definition at line 224 of file idprop_serialize_test.cc.

References EXPECT_EQ(), IDP_INT, IDP_Int, IDProperty::name, and IDProperty::type.

◆ test_idprop() [7/7]

static void blender::bke::idprop::tests::test_idprop ( const IDProperty * id_property,
StringRef expected_name,
StringRef expected_value )
static

◆ test_int_to_value()

static void blender::bke::idprop::tests::test_int_to_value ( const StringRefNull prop_name,
int32_t prop_content )
static

◆ test_string_to_value()

static void blender::bke::idprop::tests::test_string_to_value ( const StringRefNull prop_name,
const StringRefNull prop_content )
static

◆ to_json()

static std::string blender::bke::idprop::tests::to_json ( const Value & value)
static

Definition at line 206 of file idprop_serialize_test.cc.

References blender::io::serialize::JsonFormatter::serialize().

Referenced by TEST().