MCPcopy Create free account
hub / github.com/beefytech/Beef / TEST

Function TEST

BeefRT/gperftools/src/tests/malloc_hook_test.cc:121–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119#define INIT_HOOK_LIST(initial_value) { 1, { initial_value } }
120
121TEST(HookListTest, InitialValueExists) {
122 TestHookList list = INIT_HOOK_LIST(69);
123 uintptr_t values[2] = { 0, 0 };
124 EXPECT_EQ(1, TestHookList_Traverse(list, values, 2));
125 EXPECT_EQ(69, values[0]);
126 EXPECT_EQ(1, list.priv_end);
127}
128
129TEST(HookListTest, CanRemoveInitialValue) {
130 TestHookList list = INIT_HOOK_LIST(69);

Callers

nothing calls this directly

Calls 8

TestHookList_TraverseFunction · 0.70
TestHookList_RemoveFunction · 0.70
TestHookList_AddFunction · 0.70
RunManyThreadsWithIdFunction · 0.70
SetMmapReplacementFunction · 0.50
SetMunmapReplacementFunction · 0.50
mmapFunction · 0.50
munmapFunction · 0.50

Tested by

no test coverage detected