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

Method testFunction3Arguments

tests/backend/Parser/ParserTest.cpp:105–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void ParserTest::testFunction3Arguments() {
106 Parsing::Parser parser(false);
107
108 VALUES_EQUAL(parser.parse(qPrintable(QStringLiteral("if(1;-5.0;3.2)")), "C"), -5.);
109 VALUES_EQUAL(parser.parse(qPrintable(QStringLiteral("if(0;-5.0;3.2)")), "C"), 3.2);
110 // With comma
111 VALUES_EQUAL(parser.parse(qPrintable(QStringLiteral("if(1,-5.2,3.7)")), "C"), -5.2);
112 VALUES_EQUAL(parser.parse(qPrintable(QStringLiteral("if(0,-5.7,3.5)")), "C"), 3.5);
113}
114
115void ParserTest::testErrors() {
116 Parsing::Parser parser(false);

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected