slightly saner malloc_hook_test implementation
This commit is contained in:
parent
e1014dead2
commit
91b96b92a2
|
@ -59,9 +59,15 @@ using base::internal::kHookListMaxValues;
|
|||
typedef base::internal::HookList<MallocHook::NewHook> TestHookList;
|
||||
|
||||
|
||||
const MallocHook::NewHook kTestValue = reinterpret_cast<MallocHook::NewHook>(69);
|
||||
const MallocHook::NewHook kAnotherTestValue = reinterpret_cast<MallocHook::NewHook>(42);
|
||||
const MallocHook::NewHook kThirdTestValue = reinterpret_cast<MallocHook::NewHook>(7);
|
||||
const MallocHook::NewHook kTestValue = [] (const void* ptr, size_t size) {
|
||||
printf("kTestValue\n");
|
||||
};
|
||||
const MallocHook::NewHook kAnotherTestValue = [] (const void* ptr, size_t size) {
|
||||
printf("kAnotherTestValue\n");
|
||||
};
|
||||
const MallocHook::NewHook kThirdTestValue = [] (const void* ptr, size_t size) {
|
||||
printf("kThirdTestValue\n");
|
||||
};
|
||||
|
||||
TEST(HookListTest, InitialValueExists) {
|
||||
TestHookList list{kTestValue};
|
||||
|
|
Loading…
Reference in New Issue