Blender  V3.3
Functions
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 Vector< int32_t > &values)
 
static void test_idprop (const IDProperty *id_property, StringRef expected_name, const Vector< float > &values)
 
static void test_idprop (const IDProperty *id_property, StringRef expected_name, const Vector< 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

◆ 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

◆ 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

◆ 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 348 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 340 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 332 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 188 of file idprop_serialize_test.cc.

◆ TEST() [5/17]

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

Definition at line 326 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 145 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 182 of file idprop_serialize_test.cc.

◆ TEST() [8/17]

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

Definition at line 320 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 124 of file idprop_serialize_test.cc.

References test_float_to_value().

◆ TEST() [10/17]

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

◆ TEST() [11/17]

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

Definition at line 176 of file idprop_serialize_test.cc.

◆ TEST() [12/17]

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

Definition at line 314 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 103 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 306 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 82 of file idprop_serialize_test.cc.

References test_string_to_value().

◆ test_array_to_value()

template<typename PrimitiveType , typename ValueType >
static void blender::bke::idprop::tests::test_array_to_value ( const StringRefNull  prop_name,
Vector< PrimitiveType prop_content 
)
static

◆ 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 Vector< double > &  values 
)
static

◆ test_idprop() [2/7]

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

◆ test_idprop() [3/7]

static void blender::bke::idprop::tests::test_idprop ( const IDProperty id_property,
StringRef  expected_name,
const Vector< 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 220 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 202 of file idprop_serialize_test.cc.

References usdtokens::out(), and blender::io::serialize::JsonFormatter::serialize().

Referenced by TEST().