MCPcopy Create free account
hub / github.com/R-Fuzz/symsan / TEST

Function TEST

runtime/interception/tests/interception_linux_test.cpp:36–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace __interception {
35
36TEST(Interception, InterceptFunction) {
37 uptr malloc_address = 0;
38 EXPECT_TRUE(InterceptFunction("malloc", &malloc_address, 0, 0));
39 EXPECT_NE(0U, malloc_address);
40 EXPECT_FALSE(InterceptFunction("malloc", &malloc_address, 0, 1));
41
42 uptr dummy_address = 0;
43 EXPECT_FALSE(InterceptFunction("dummy_doesnt_exist__", &dummy_address, 0, 0));
44 EXPECT_EQ(0U, dummy_address);
45}
46
47TEST(Interception, Basic) {
48 EXPECT_TRUE(INTERCEPT_FUNCTION(isdigit));

Callers

nothing calls this directly

Calls 1

InterceptFunctionFunction · 0.85

Tested by

no test coverage detected