[test] Use strcmpWithSystemParentheses

Now there can be two types of parentheses : '(' or
UCodePointLeftSystemParenthesis. Because we do not want to complicate
the test results, when comparing a computed serialization and a result
we do not differentiate between the two types of parentheses.
This commit is contained in:
Léa Saviot
2019-06-24 13:38:26 +02:00
committed by LeaNumworks
parent 6109903f66
commit 40c5196cee
4 changed files with 37 additions and 10 deletions

View File

@@ -77,10 +77,12 @@ void assertCalculationDisplay(const char * input, ::Calculation::Calculation::Di
quiz_assert(lastCalculation->exactAndApproximateDisplayedOutputsAreEqual(context) == sign);
}
if (exactOutput) {
quiz_assert(strcmp(lastCalculation->exactOutputText(), exactOutput) == 0);
constexpr int bufferSize = 500;
char buffer[bufferSize];
quiz_assert(strcmpWithSystemParentheses(lastCalculation->exactOutputText(), exactOutput) == 0);
}
if (approximateOutput) {
quiz_assert(strcmp(lastCalculation->approximateOutputText(), approximateOutput) == 0);
quiz_assert(strcmpWithSystemParentheses(lastCalculation->approximateOutputText(), approximateOutput) == 0);
}
store->deleteAll();
}