MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / TEST_F

Function TEST_F

test/Prefabs.cpp:28–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26};
27
28TEST_F(PrefabTest, LoadPrefabAt)
29{
30 loadPrefabAtOrigin("large_bounds.pfbx");
31
32 auto numSpeakers = algorithm::getChildCount(GlobalMapModule().getRoot(), [](const scene::INodePtr& node)
33 {
34 return Node_getSpeakerNode(node) != nullptr;
35 });
36
37 auto numLights = algorithm::getChildCount(GlobalMapModule().getRoot(), [](const scene::INodePtr& node)
38 {
39 return Node_getLightNode(node) != nullptr;
40 });
41
42 auto numBrushes = algorithm::getChildCount(GlobalMapModule().getWorldspawn(), [](const scene::INodePtr& node)
43 {
44 return Node_getIBrush(node) != nullptr;
45 });
46
47 EXPECT_EQ(numSpeakers, 1);
48 EXPECT_EQ(numLights, 1);
49 EXPECT_EQ(numBrushes, 1);
50}
51
52TEST_F(PrefabTest, PrefabBoundsCalculation)
53{

Callers

nothing calls this directly

Calls 13

getChildCountFunction · 0.85
Node_getSpeakerNodeFunction · 0.85
Node_getLightNodeFunction · 0.85
Node_getIBrushFunction · 0.85
getEntityByNameFunction · 0.85
stringMethod · 0.80
getRootMethod · 0.45
countSelectedMethod · 0.45
foreachSelectedMethod · 0.45
getBoundsMethod · 0.45
getTestProjectPathMethod · 0.45

Tested by

no test coverage detected