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

Method testxorFunction

tests/backend/gsl/ExpressionParserTest.cpp:187–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185 QCOMPARE(fnct(0, 2.3345), 1);
186}
187void ExpressionParserTest::testxorFunction() {
188 auto fnct = getFunction2(QStringLiteral("xor"));
189 QVERIFY(fnct);
190
191 QCOMPARE(fnct(1, 1), 0);
192 QCOMPARE(fnct(0, 1), 1);
193 QCOMPARE(fnct(1, 0), 1);
194 QCOMPARE(fnct(0, 0), 0);
195 QCOMPARE(fnct(2, 5), 0);
196 QCOMPARE(fnct(0, 2.3345), 1);
197 QCOMPARE(fnct(2.3345, 2.3345), 0);
198 QCOMPARE(fnct(2.3345, 0), 1);
199}
200
201void ExpressionParserTest::testnotFunction() {
202 auto fnct = getFunction1(QStringLiteral("not"));

Callers

nothing calls this directly

Calls 1

getFunction2Function · 0.85

Tested by

no test coverage detected