MCPcopy Create free account
hub / github.com/bytedance/bolt / TEST_F

Function TEST_F

bolt/type/tests/VariantTest.cpp:302–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300};
301
302TEST_F(VariantSerializationTest, serializeOpaque) {
303 auto serialized = var_.serialize();
304 auto deserialized_variant = variant::create(serialized);
305 auto opaque = deserialized_variant.value<TypeKind::OPAQUE>().obj;
306 auto original_class = std::static_pointer_cast<SerializableClass>(opaque);
307 EXPECT_EQ(original_class->name, "test_class");
308 EXPECT_EQ(original_class->value, false);
309}
310
311TEST_F(VariantSerializationTest, opaqueToString) {
312 const auto type = var_.inferType();

Callers

nothing calls this directly

Calls 4

inferTypeMethod · 0.80
createFunction · 0.50
serializeMethod · 0.45
toJsonMethod · 0.45

Tested by

no test coverage detected