Rename hooks module to test_hooks.

"Hooks" is really the best name for the module that will contain the publicly
exposed hooks.  So lets rename the current "hooks" module (that hook external
dependencies, for reentrancy testing) to "test_hooks".
This commit is contained in:
David Goldblatt
2018-04-09 18:09:34 -07:00
committed by David Goldblatt
parent e870829e64
commit c7a87e0e0b
10 changed files with 38 additions and 38 deletions

View File

@@ -12,10 +12,10 @@ func_to_hook(int arg1, int arg2) {
return arg1 + arg2;
}
#define func_to_hook JEMALLOC_HOOK(func_to_hook, hooks_libc_hook)
#define func_to_hook JEMALLOC_HOOK(func_to_hook, test_hooks_libc_hook)
TEST_BEGIN(unhooked_call) {
hooks_libc_hook = NULL;
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.");
@@ -23,7 +23,7 @@ TEST_BEGIN(unhooked_call) {
TEST_END
TEST_BEGIN(hooked_call) {
hooks_libc_hook = &hook;
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.");