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

Method testandFunction

tests/backend/gsl/ExpressionParserTest.cpp:166–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164 QCOMPARE(fnct(-1, 1, 5), 1);
165}
166void ExpressionParserTest::testandFunction() {
167 auto fnct = getFunction2(QStringLiteral("and"));
168 QVERIFY(fnct);
169
170 QCOMPARE(fnct(1, 1), 1);
171 QCOMPARE(fnct(0, 1), 0);
172 QCOMPARE(fnct(1, 0), 0);
173 QCOMPARE(fnct(0, 0), 0);
174 QCOMPARE(fnct(2, 5), 1);
175}
176void ExpressionParserTest::testorFunction() {
177 auto fnct = getFunction2(QStringLiteral("or"));
178 QVERIFY(fnct);

Callers

nothing calls this directly

Calls 1

getFunction2Function · 0.85

Tested by

no test coverage detected