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

Function TEST_F

test/CodeTokeniser.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37TEST_F(GuiTokeniser, ParseWindowDef)
38{
39 std::string contents = R"(
40 windowDef rightPageBackground {
41 rect -100, -10, 500, 400
42 background "guis/assets/background_right_01"
43 matcolor 1, 1, 1, 0
44 })";
45
46 expectTokenSequence(_context, contents,
47 {
48 "windowDef", "rightPageBackground",
49 "{",
50 "rect", "-","100",",","-", "10",",","500",",","400",
51 "background", "guis/assets/background_right_01",
52 "matcolor", "1",",","1",",","1",",","0",
53 "}",
54 });
55}
56
57// The game's GUI parser supports reading rect-100 values without whitespace separation
58TEST_F(GuiTokeniser, ParseRectExpression)

Callers

nothing calls this directly

Calls 2

expectTokenSequenceFunction · 0.70
openTextFileMethod · 0.45

Tested by

no test coverage detected