MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / TEST

Function TEST

tests/node_test.cpp:776–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

774};
775
776TEST(DNodeTest, AllocatorReturnNull) {
777 using NodeType = DNode<InvalidAllocator>;
778 InvalidAllocator a;
779 std::string str = "Hello World";
780 NodeType node1(str, a);
781 EXPECT_TRUE(node1.IsString());
782 EXPECT_TRUE(node1.Size() == 0);
783 EXPECT_EQ(node1.GetString(), "");
784 EXPECT_EQ(node1.GetStringView(), "");
785}
786
787TYPED_TEST(NodeTest, SourceAllocator) {
788 using NodeType = TypeParam;

Callers

nothing calls this directly

Calls 2

IsStringMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected