mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare/tests] Use quiz_assert instead of assert in tests
This commit is contained in:
@@ -22,14 +22,14 @@ QUIZ_CASE(poincare_helpers_insert_simple_swap) {
|
||||
}
|
||||
|
||||
Poincare::Helpers::Rotate(&buf[0], &buf[1], 1);
|
||||
assert(buf[0] == 1);
|
||||
assert(buf[1] == 0);
|
||||
assert(buf[2] == 2);
|
||||
quiz_assert(buf[0] == 1);
|
||||
quiz_assert(buf[1] == 0);
|
||||
quiz_assert(buf[2] == 2);
|
||||
|
||||
Poincare::Helpers::Rotate(&buf[2], &buf[0], 1);
|
||||
assert(buf[0] == 0);
|
||||
assert(buf[1] == 1);
|
||||
assert(buf[2] == 2);
|
||||
quiz_assert(buf[0] == 0);
|
||||
quiz_assert(buf[1] == 1);
|
||||
quiz_assert(buf[2] == 2);
|
||||
}
|
||||
|
||||
static inline void test_rotate(uint32_t buf[], size_t bufSize, size_t dstIndex, size_t srcIndex, size_t len) {
|
||||
|
||||
@@ -51,7 +51,7 @@ QUIZ_CASE(poincare_parser_memory_exhaustion) {
|
||||
}
|
||||
}
|
||||
|
||||
assert(memoryFailureHasBeenHandled);
|
||||
quiz_assert(memoryFailureHasBeenHandled);
|
||||
assert_pool_size(initialPoolSize);
|
||||
Expression e = Expression::parse("1+1");
|
||||
/* Stupid check to make sure the global variable generated by Bison is not
|
||||
|
||||
@@ -24,7 +24,7 @@ static void assert_pool_size(int i) {
|
||||
if (poolSize != i) {
|
||||
std::cout << "Expected pool of size " << i << " but got " << poolSize << std::endl;
|
||||
log_pool();
|
||||
assert(false);
|
||||
quiz_assert(false);
|
||||
}
|
||||
#else
|
||||
quiz_assert(pool_size() == i);
|
||||
|
||||
@@ -72,7 +72,7 @@ QUIZ_CASE(tree_handle_memory_failure) {
|
||||
} else {
|
||||
memoryFailureHasBeenHandled = true;
|
||||
}
|
||||
assert(memoryFailureHasBeenHandled);
|
||||
quiz_assert(memoryFailureHasBeenHandled);
|
||||
assert_pool_size(initialPoolSize);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user