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

Method testnotFunction

tests/backend/gsl/ExpressionParserTest.cpp:201–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201void ExpressionParserTest::testnotFunction() {
202 auto fnct = getFunction1(QStringLiteral("not"));
203 QVERIFY(fnct);
204
205 QCOMPARE(fnct(1), 0);
206 QCOMPARE(fnct(0), 1);
207 QCOMPARE(fnct(-1), 0); // According to C/C++ standard. -1 is true and !-1 is false
208 QCOMPARE(fnct(2), 0);
209}
210
211void ExpressionParserTest::testbetweenIncluded() {
212 auto fnct = getFunction3(QStringLiteral("between_inc"));

Callers

nothing calls this directly

Calls 1

getFunction1Function · 0.85

Tested by

no test coverage detected