| 8 | using TestLocIndex = TestBase; |
| 9 | |
| 10 | TEST_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 | |
| 28 | TEST_F(TestLocIndex, AllocaInstTestP) { |
| 29 | const std::string Code = R"( |
nothing calls this directly
no test coverage detected