| 185 | QCOMPARE(fnct(0, 2.3345), 1); |
| 186 | } |
| 187 | void 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 | |
| 201 | void ExpressionParserTest::testnotFunction() { |
| 202 | auto fnct = getFunction1(QStringLiteral("not")); |
nothing calls this directly
no test coverage detected