[apps/calc] Add test on shouldOnlyDisplayApproximateOutput

This commit is contained in:
Léa Saviot
2018-12-03 15:53:04 +01:00
committed by EmilieNumworks
parent 10556b477b
commit 70a4542705

View File

@@ -102,5 +102,12 @@ QUIZ_CASE(calculation_display_exact_approximate) {
lastCalculation = store.calculationAtIndex(1);
quiz_assert(lastCalculation->shouldOnlyDisplayExactOutput() == false);
quiz_assert(lastCalculation->shouldOnlyDisplayApproximateOutput(&globalContext) == true);
store.deleteAll();
store.push("28^7", &globalContext);
lastCalculation = store.calculationAtIndex(1);
quiz_assert(lastCalculation->shouldOnlyDisplayExactOutput() == false);
quiz_assert(lastCalculation->shouldOnlyDisplayApproximateOutput(&globalContext) == false);
store.deleteAll();
}