From 7cc838733848c58ea1c88fb477cfeefc941e3f32 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 4 Aug 2023 21:31:59 +0300 Subject: add compile_destroy as cleanup --- tests/check.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/check.c b/tests/check.c index f6e775c..168f02f 100644 --- a/tests/check.c +++ b/tests/check.c @@ -16,6 +16,7 @@ static void check_li() compile_finish(&ctx); assert(run(&ctx) == i); + compile_destroy(&ctx); } // y @@ -34,6 +35,7 @@ static void check_li() compile_finish(&ctx); assert(run(&ctx) == i); + compile_destroy(&ctx); } // o @@ -50,6 +52,7 @@ static void check_li() compile_finish(&ctx); assert(run(&ctx) == i); + compile_destroy(&ctx); } // a @@ -66,6 +69,7 @@ static void check_li() compile_finish(&ctx); assert(run(&ctx) == i); + compile_destroy(&ctx); } } @@ -83,6 +87,7 @@ static void check_add() compile_finish(&ctx); assert(run(&ctx) == i); + compile_destroy(&ctx); } // y @@ -101,6 +106,7 @@ static void check_add() compile_finish(&ctx); assert(run(&ctx) == i); + compile_destroy(&ctx); } // o @@ -117,6 +123,7 @@ static void check_add() compile_finish(&ctx); assert(run(&ctx) == i); + compile_destroy(&ctx); } // a @@ -133,6 +140,7 @@ static void check_add() compile_finish(&ctx); assert(run(&ctx) == i); + compile_destroy(&ctx); } } @@ -156,6 +164,7 @@ static void check_branch() compile_finish(&ctx); assert(run(&ctx) == (i != 0)); + compile_destroy(&ctx); } for (size_t i = 0; i < 2; ++i) { @@ -176,6 +185,7 @@ static void check_branch() compile_finish(&ctx); assert(run(&ctx) == (i == 0)); + compile_destroy(&ctx); } } -- cgit v1.3