diff options
author | Qi Wang <interwq@gwu.edu> | 2022-05-06 18:28:25 (GMT) |
---|---|---|
committer | Qi Wang <interwq@gwu.edu> | 2022-05-06 18:28:25 (GMT) |
commit | 54eaed1d8b56b1aa528be3bdd1877e59c56fa90c (patch) | |
tree | e79620e0c00b1f8b6b698fbe74df6bae7d812ae2 /test/unit/test_hooks.c | |
parent | ea6b3e973b477b8061e0076bb257dbd7f3faa756 (diff) | |
parent | 304c919829f9f340669b61fa64867cfe5dba8021 (diff) | |
download | jemalloc-5.3.0.zip jemalloc-5.3.0.tar.gz jemalloc-5.3.0.tar.bz2 |
Merge branch 'dev'5.3.0
Diffstat (limited to 'test/unit/test_hooks.c')
-rw-r--r-- | test/unit/test_hooks.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/test_hooks.c b/test/unit/test_hooks.c index ded8698..8cd2b3b 100644 --- a/test/unit/test_hooks.c +++ b/test/unit/test_hooks.c @@ -12,21 +12,21 @@ func_to_hook(int arg1, int arg2) { return arg1 + arg2; } -#define func_to_hook JEMALLOC_HOOK(func_to_hook, test_hooks_libc_hook) +#define func_to_hook JEMALLOC_TEST_HOOK(func_to_hook, test_hooks_libc_hook) TEST_BEGIN(unhooked_call) { test_hooks_libc_hook = NULL; hook_called = false; - assert_d_eq(3, func_to_hook(1, 2), "Hooking changed return value."); - assert_false(hook_called, "Nulling out hook didn't take."); + expect_d_eq(3, func_to_hook(1, 2), "Hooking changed return value."); + expect_false(hook_called, "Nulling out hook didn't take."); } TEST_END TEST_BEGIN(hooked_call) { test_hooks_libc_hook = &hook; hook_called = false; - assert_d_eq(3, func_to_hook(1, 2), "Hooking changed return value."); - assert_true(hook_called, "Hook should have executed."); + expect_d_eq(3, func_to_hook(1, 2), "Hooking changed return value."); + expect_true(hook_called, "Hook should have executed."); } TEST_END |