diff --git a/tst_fractiontest.cpp b/tst_fractiontest.cpp index 16a3aed..bab9d5b 100644 --- a/tst_fractiontest.cpp +++ b/tst_fractiontest.cpp @@ -223,7 +223,6 @@ void FractionTest::test_division() { QCOMPARE(f1 / 2, f2); f1 /= 2; - qDebug() << f1.display(); QCOMPARE(f1, 0.5); QCOMPARE(f1 / 2, 0.25); @@ -466,21 +465,21 @@ void FractionTest::test_pow() { // x ** 0 = 1; (where x != 0 and x ∈ R) // 0 ** 0 depends on context QCOMPARE(f1.pow(0), 1.0); - bool threw_correct_error = false; + bool threw_not_defined_error = false; try { Fraction(0, 2).pow(0); } catch (const not_defined_error&) { - threw_correct_error = true; + threw_not_defined_error = true; } - QVERIFY(threw_correct_error); + QVERIFY(threw_not_defined_error); - threw_correct_error = false; + bool threw_not_real_error = false; try { Fraction(0, 1).pow(-1); } catch (const not_real_error&) { - threw_correct_error = true; + threw_not_real_error = true; } - QVERIFY(threw_correct_error); + QVERIFY(threw_not_real_error); } QTEST_APPLESS_MAIN(FractionTest)