MCPcopy Create free account
hub / github.com/KDE/labplot / testFunction0Arguments

Method testFunction0Arguments

tests/backend/Parser/ParserTest.cpp:78–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void ParserTest::testFunction0Arguments() {
79 // Function with no arguments
80
81 Parsing::Parser parser(false);
82 const auto res1 = parser.parse(qPrintable(QStringLiteral("rand()")), "C");
83 QVERIFY(res1 >= 0. && res1 <= (double)RAND_MAX);
84
85 const auto res2 = parser.parse(qPrintable(QStringLiteral("rand()")), "C");
86 QVERIFY(res2 >= 0. && res2 <= (double)RAND_MAX);
87
88 QVERIFY(res1 != res2); // It is really unlikely that they are equal
89}
90
91void ParserTest::testFunction1Argument() {
92 Parsing::Parser parser(false);

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected