aboutsummaryrefslogtreecommitdiff
path: root/tests/check.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-08-04 21:31:59 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-08-04 21:31:59 +0300
commit7cc838733848c58ea1c88fb477cfeefc941e3f32 (patch)
tree9126a797f62ef69278ee9502c043b7e59e0f2fc1 /tests/check.c
parentbf993be4a04bc7279f7d49ae18f185e1dca36479 (diff)
downloadcopyjit-7cc838733848c58ea1c88fb477cfeefc941e3f32.tar.gz
copyjit-7cc838733848c58ea1c88fb477cfeefc941e3f32.zip
add compile_destroy as cleanup
Diffstat (limited to 'tests/check.c')
-rw-r--r--tests/check.c10
1 files changed, 10 insertions, 0 deletions
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);
}
}