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

Method testorFunction

tests/backend/gsl/ExpressionParserTest.cpp:176–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174 QCOMPARE(fnct(2, 5), 1);
175}
176void ExpressionParserTest::testorFunction() {
177 auto fnct = getFunction2(QStringLiteral("or"));
178 QVERIFY(fnct);
179
180 QCOMPARE(fnct(1, 1), 1);
181 QCOMPARE(fnct(0, 1), 1);
182 QCOMPARE(fnct(1, 0), 1);
183 QCOMPARE(fnct(0, 0), 0);
184 QCOMPARE(fnct(2, 5), 1);
185 QCOMPARE(fnct(0, 2.3345), 1);
186}
187void ExpressionParserTest::testxorFunction() {
188 auto fnct = getFunction2(QStringLiteral("xor"));
189 QVERIFY(fnct);

Callers

nothing calls this directly

Calls 1

getFunction2Function · 0.85

Tested by

no test coverage detected