| 249 | QCOMPARE(fnct(5.11, 1, 5), 1); |
| 250 | } |
| 251 | void ExpressionParserTest::testequalEpsilon() { |
| 252 | auto fnct = getFunction3(QStringLiteral("equalE")); |
| 253 | QVERIFY(fnct); |
| 254 | |
| 255 | QCOMPARE(fnct(0.99, 1, 5), 1); |
| 256 | QCOMPARE(fnct(1, 1, 5), 1); |
| 257 | QCOMPARE(fnct(2, 1, 5), 1); |
| 258 | QCOMPARE(fnct(5, 1, 5), 1); |
| 259 | QCOMPARE(fnct(5.11, 1, 5), 1); |
| 260 | |
| 261 | QCOMPARE(fnct(5.11, 5.3, 0.1), 0); |
| 262 | QCOMPARE(fnct(-5.11, 5.3, 0.2), 0); |
| 263 | QCOMPARE(fnct(-5.11, -5.3, 0.2), 1); |
| 264 | } |
| 265 | |
| 266 | void ExpressionParserTest::testRoundn() { |
| 267 | auto fnct = getFunction2(QStringLiteral("roundn")); |
nothing calls this directly
no test coverage detected