Verified Commit e4640549 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

calculatorrunner: Fix autotests if Qalculate is not found

This is the case on the BSD CI build. You can try this out with the
`-DCMAKE_DISABLE_FIND_PACKAGE_Qalculate=1` cmake flag and the tests
still pass.
parent 0928bfc5
......@@ -48,7 +48,9 @@ void CalculatorRunnerTest::testQuery_data()
QTest::newRow("simple power") << "2^3" << "8";
QTest::newRow("x as multiplication sign") << "25x4" << "100";
#ifdef ENABLE_QALCULATE
QTest::newRow("single digit factorial") << "5!" << "120";
#endif
QTest::newRow("hex to decimal lower case") << "0xf" << "15";
QTest::newRow("hex to decimal upper case") << "0xF" << "15";
......@@ -64,6 +66,9 @@ void CalculatorRunnerTest::testQuery_data()
void CalculatorRunnerTest::testApproximation()
{
#ifndef ENABLE_QALCULATE
QSKIP("Approximations are only with Qalculate supported");
#endif
launchQuery("5^1234567");
QCOMPARE(manager->matches().size(), 1);
QCOMPARE(manager->matches().constFirst().subtext(), "Approximation");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment