| 76 | } |
| 77 | |
| 78 | void ParserTest::testFunction0Arguments() { |
| 79 | // Function with no arguments |
| 80 | |
| 81 | Parsing::Parser parser(false); |
| 82 | const auto res1 = parser.parse(qPrintable(QStringLiteral("rand()")), "C"); |
| 83 | QVERIFY(res1 >= 0. && res1 <= (double)RAND_MAX); |
| 84 | |
| 85 | const auto res2 = parser.parse(qPrintable(QStringLiteral("rand()")), "C"); |
| 86 | QVERIFY(res2 >= 0. && res2 <= (double)RAND_MAX); |
| 87 | |
| 88 | QVERIFY(res1 != res2); // It is really unlikely that they are equal |
| 89 | } |
| 90 | |
| 91 | void ParserTest::testFunction1Argument() { |
| 92 | Parsing::Parser parser(false); |