aboutsummaryrefslogtreecommitdiff
path: root/test/_case-test.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/_case-test.h')
-rw-r--r--test/_case-test.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/_case-test.h b/test/_case-test.h
index 684c6ec..ea05a86 100644
--- a/test/_case-test.h
+++ b/test/_case-test.h
@@ -65,12 +65,9 @@ test(const char8_t *line, int id)
: 0;
arena a = mkarena(0);
- mapped.p = FUNC(&mapped.len, before, cf, alloc_arena, &a);
-
- if (mapped.p == nullptr) {
- warn("case %d: got null %s buffer", id, STR(CASETYPE_VERB));
- return false;
- }
+ mapped.p = FUNC(&mapped.len, before, cf, alloc_arena, &(struct arena_ctx){
+ .a = &a,
+ });
if (!u8eq(mapped, after)) {
warn("case %d: expected ā€˜%.*sā€™ but got ā€˜%.*sā€™", id, SV_PRI_ARGS(after),