MCPcopy Create free account
hub / github.com/EndstoneMC/endstone / TEST

Function TEST

tests/test_nbt.cpp:21–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19using namespace endstone;
20
21TEST(NbtValueTag, EqualityAndImplicitReadConversion)
22{
23 ByteTag b5{5};
24 ByteTag b6{6};
25 EXPECT_TRUE(b5 == b5);
26 EXPECT_TRUE(b5 != b6);
27
28 StringTag s1{"hi"};
29 StringTag s2{"bye"};
30 EXPECT_TRUE(s1 == "hi");
31 EXPECT_TRUE("hi" == s1);
32 EXPECT_TRUE(s1 != s2);
33 const std::string &sv = s1; // implicit conversion to std::string
34 EXPECT_EQ(sv, "hi");
35}
36
37TEST(NbtValueTag, GetReturnsConstRefForValueWrappers)
38{

Callers

nothing calls this directly

Calls 8

push_backMethod · 0.80
atMethod · 0.80
insert_or_assignMethod · 0.80
mergeMethod · 0.80
sizeMethod · 0.45
typeMethod · 0.45
emptyMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected