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

Method testifCondition

tests/backend/gsl/ExpressionParserTest.cpp:156–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void ExpressionParserTest::testifCondition() {
157 auto fnct = getFunction3(QStringLiteral("if"));
158 QVERIFY(fnct);
159
160 QCOMPARE(fnct(1, 1, 5), 1);
161 QCOMPARE(fnct(0, 1, 5), 5);
162
163 QCOMPARE(fnct(1.1, 1, 5), 1);
164 QCOMPARE(fnct(-1, 1, 5), 1);
165}
166void ExpressionParserTest::testandFunction() {
167 auto fnct = getFunction2(QStringLiteral("and"));
168 QVERIFY(fnct);

Callers

nothing calls this directly

Calls 1

getFunction3Function · 0.85

Tested by

no test coverage detected