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

Function TEST_F

test/WorldspawnColour.cpp:84–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82using Quake4WorldspawnColourTest = EmptyQuake4Setup;
83
84TEST_F(Quake4WorldspawnColourTest, SchemeBrushColourIsUsed)
85{
86 // File system should be loaded and ready
87 EXPECT_TRUE(GlobalFileSystem().isInitialised());
88
89 // This setup doesn't have a worldspawn
90 EXPECT_FALSE(GlobalEntityClassManager().findClass("worldspawn"));
91
92 // Create a worldspawn
93 auto worldspawn = GlobalMapModule().findOrInsertWorldspawn();
94
95 // The eclass wire shader should match the colour defined in the scheme
96 const auto& schemeColour = GlobalColourSchemeManager().getActiveScheme().getColour("default_brush").getColour();
97 EXPECT_EQ(Node_getEntity(worldspawn)->getEntityClass()->getColour(), Vector4(schemeColour, 1));
98}
99
100TEST_F(RadiantTest, SchemeBrushColourIsUsed)
101{

Callers

nothing calls this directly

Calls 10

Node_getEntityFunction · 0.85
isInitialisedMethod · 0.80
getActiveSchemeMethod · 0.80
findOrInsertMethod · 0.80
saveColourSchemesMethod · 0.80
emitEclassOverridesMethod · 0.80
restoreColourSchemesMethod · 0.80
findClassMethod · 0.45
getColourMethod · 0.45
getEntityClassMethod · 0.45

Tested by

no test coverage detected