| 19 | BABYLON_REGISTER_SERIALIZER(int); |
| 20 | |
| 21 | TEST_F(SerializerTest, support_scalar) { |
| 22 | ASSERT_EQ(nullptr, Serialization::serializer_for_name("float")); |
| 23 | ASSERT_NE(nullptr, Serialization::serializer_for_name("int")); |
| 24 | |
| 25 | int s = gen(); |
| 26 | ASSERT_TRUE(Serialization::serialize_to_string(s, string)); |
| 27 | Any ss; |
| 28 | auto serializer = Serialization::serializer_for_name("int"); |
| 29 | ASSERT_TRUE(serializer->parse_from_string(string, ss)); |
| 30 | ASSERT_TRUE(ss); |
| 31 | ASSERT_EQ(TypeId<int>::ID, ss.instance_type()); |
| 32 | ASSERT_EQ(s, *ss.get<int>()); |
| 33 | } |
| 34 | |
| 35 | namespace user { |
| 36 | struct BasicTypeSerializable { |
nothing calls this directly
no test coverage detected