MCPcopy Create free account
hub / github.com/KDE/kdevelop / testDefines

Method testDefines

plugins/custommake/makefileresolver/tests/test_custommake.cpp:93–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void TestCustomMake::testDefines()
94{
95 MakeFileResolver mf;
96 const auto result = mf.processOutput("-DFOO -DFOO=\\\"foo\\\" -DBAR=ASDF -DLALA=1 -DMEH="
97 " -DSTR=\"\\\"foo \\\\\\\" bar\\\"\" -DEND"
98 " -DX=1 -UX", QString());
99 QCOMPARE(result.defines.value("FOO", "not found"), QString("\"foo\""));
100 QCOMPARE(result.defines.value("BAR", "not found"), QString("ASDF"));
101 QCOMPARE(result.defines.value("LALA", "not found"), QString("1"));
102 QCOMPARE(result.defines.value("MEH", "not found"), QString());
103 QCOMPARE(result.defines.value("STR", "not found"), QString("\"foo \\\" bar\""));
104 QCOMPARE(result.defines.value("END", "not found"), QString());
105 QCOMPARE(result.defines.value("X", "not found"), QString("not found"));
106}
107
108QTEST_GUILESS_MAIN(TestCustomMake)
109

Callers

nothing calls this directly

Calls 3

QStringClass · 0.50
processOutputMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected