From e3fd5ad05a7d933d401de431ce2d27a99d3b9995 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 27 Jun 2022 00:36:48 +0100 Subject: Add update detection, clean up minor stuff --- test/hook.test.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/hook.test.c b/test/hook.test.c index b2e841c..7cbfd15 100644 --- a/test/hook.test.c +++ b/test/hook.test.c @@ -33,12 +33,14 @@ static int other_hook(int a, int b) { } TEST("Inline hooks should be able to wrap the original function") { + if (!hook_init()) return false; orig_some_function = hook_inline(&some_function, &some_hook); if (!orig_some_function) return false; return some_function(5, 5) == 15; } TEST("Inline hooks should be removable again") { + if (!hook_init()) return false; orig_some_function = hook_inline(&some_function, &some_hook); if (!orig_some_function) return false; unhook_inline(orig_some_function); @@ -46,6 +48,7 @@ TEST("Inline hooks should be removable again") { } TEST("Multiple functions should be able to be inline hooked at once") { + if (!hook_init()) return false; orig_some_function = hook_inline(&some_function, &some_hook); if (!orig_some_function) return false; -- cgit v1.2.3