MCPcopy Create free account
hub / github.com/Samsung/UTopia / TEST_F

Function TEST_F

tests/astirmap/TestLocIndex.cpp:10–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using TestLocIndex = TestBase;
9
10TEST_F(TestLocIndex, InstructionTestP) {
11 const std::string Code = R"(
12 extern "C" {
13 void API();
14 void test() {
15 API();
16 }
17 }
18 )";
19 loadCPP(Code);
20
21 auto *I = IRAH->getInstruction("test", 0, 0);
22 auto ILoc = LocIndex::of(*I);
23 ASSERT_EQ(5, ILoc.getLine());
24 ASSERT_EQ(7, ILoc.getColumn());
25 ASSERT_EQ("/tmp/default_test.cpp", ILoc.getPath());
26}
27
28TEST_F(TestLocIndex, AllocaInstTestP) {
29 const std::string Code = R"(

Callers

nothing calls this directly

Calls 4

getInstructionMethod · 0.80
getColumnMethod · 0.80
getPathMethod · 0.80
getLineMethod · 0.45

Tested by

no test coverage detected