4 #include "../calculation_store.h" 18 assert(CalculationStore::k_maxNumberOfCalculations == 10);
19 for (
int i = 0; i < CalculationStore::k_maxNumberOfCalculations; i++) {
20 char text[2] = {(char)(i+
'0'), 0};
21 store.
push(text, &globalContext);
25 const char * result[10] = {
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"};
28 store.
push(
"10", &globalContext);
30 const char * result1[10] = {
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10"};
33 for (
int i = 9; i > 0; i = i-2) {
37 const char * result2[10] = {
"1",
"3",
"5",
"7",
"9",
"",
"",
"",
"",
""};
40 for (
int i = 5; i < CalculationStore::k_maxNumberOfCalculations; i++) {
41 char text[3] = {(char)(i+
'0'), 0};
42 store.
push(text, &globalContext);
46 const char * result3[10] = {
"1",
"3",
"5",
"7",
"9",
"5",
"6",
"7",
"8",
"9"};
50 store.
push(
"1+3/4", &globalContext);
51 store.
push(
"ans+2/3", &globalContext);
56 store.
push(
"ans+0.22", &globalContext);
void assert_store_is(CalculationStore *store, const char *result[10])
Calculation * push(const char *text, Poincare::Context *context)
Calculation * calculationAtIndex(int i)
void deleteCalculationAtIndex(int i)
const char * exactOutputText()
const char * approximateOutputText()
bool shouldDisplayApproximateOutput(Poincare::Context *context)
QUIZ_CASE(calculation_store)
int numberOfCalculations()
int strcmp(const char *s1, const char *s2)