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

Function TEST

tests/test_identifier.cpp:27–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25static_assert(Enchantment::Protection == "minecraft:protection");
26
27TEST(IdentifierTest, ParsesWithExplicitNamespace)
28{
29 constexpr auto id = ItemTypeId{"endstone:custom"};
30 EXPECT_EQ(id.getNamespace(), "endstone");
31 EXPECT_EQ(id.getKey(), "custom");
32 EXPECT_TRUE(id == "endstone:custom");
33 EXPECT_FALSE(id != "endstone:custom");
34}
35
36TEST(IdentifierTest, DefaultsToMinecraftNamespace)
37{

Callers

nothing calls this directly

Calls 2

getNamespaceMethod · 0.80
getKeyMethod · 0.80

Tested by

no test coverage detected