[quiz] Assert pool size is 0 between quiz cases

This commit is contained in:
Léa Saviot
2018-09-12 15:40:33 +02:00
parent cb471d83d5
commit e4c11a993d

View File

@@ -28,7 +28,11 @@ static inline void ion_main_inner() {
while (quiz_cases[i] != NULL) {
QuizCase c = quiz_cases[i];
quiz_print(quiz_case_names[i]);
int initialPoolSize = Poincare::TreePool::sharedPool()->numberOfNodes();
quiz_assert(initialPoolSize == 0);
c();
int currentPoolSize = Poincare::TreePool::sharedPool()->numberOfNodes();
quiz_assert(initialPoolSize == currentPoolSize);
i++;
}
quiz_print("ALL TESTS FINISHED");