updated test with example cleaner syntax
This commit is contained in:
@@ -4,10 +4,8 @@
|
|||||||
Test(arena_allocator, repeated_allocations) {
|
Test(arena_allocator, repeated_allocations) {
|
||||||
arena_allocator_t aalloc = arena_allocator_create();
|
arena_allocator_t aalloc = arena_allocator_create();
|
||||||
|
|
||||||
for ( int i = 0; i < 10; i++ ) {
|
for ( int i = 0; i < 10; i++ ) with_arena(&aalloc, allocator) {
|
||||||
with_arena(&aalloc, allocator) {
|
allocator_alloc(allocator, 10);
|
||||||
allocator_alloc(allocator, 10);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cr_assert_eq(aalloc.total_allocated, 10);
|
cr_assert_eq(aalloc.total_allocated, 10);
|
||||||
|
|||||||
Reference in New Issue
Block a user