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

Function TEST_F

tests/rootdefanalysis/TestRootDef.cpp:42–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40};
41
42TEST_F(TestRDAnalyzer, NoResultHandleRegisterN) {
43 std::string Code = "extern \"C\" {\n"
44 "int sub2(int P) { return P; }\n"
45 "int sub1(int P) {\n"
46 " int V1 = P;\n"
47 " return sub2(V1);"
48 "}\n"
49 "void test() {\n"
50 " int V1 = 1;\n"
51 " int V2 = sub1(V1);\n"
52 "}\n"
53 "}\n";
54 ASSERT_TRUE(loadCPP(Code));
55
56 auto Nodes = find("test", 0, 7, 0, {"test"}, nullptr);
57 ASSERT_EQ(Nodes.size(), 1);
58
59 auto *I = IRAH->getInstruction("test", 0, 3);
60 ASSERT_TRUE(I);
61 ASSERT_NE(Nodes.find(RDNode(0, *I)), Nodes.end());
62}
63
64TEST_F(TestRDAnalyzer, SameRouteDiffTargetP) {
65 std::string Code = "extern \"C\" {\n"

Callers 1

TestRootDef.cppFile · 0.70

Calls 15

RDNodeClass · 0.85
getMangledNamesFunction · 0.85
addOutParamFunction · 0.85
verifyFirstUseFunction · 0.85
sizeMethod · 0.80
getInstructionMethod · 0.80
endMethod · 0.80
getLLVMModuleMethod · 0.80
addTerminationMethod · 0.80
beginMethod · 0.80

Tested by

no test coverage detected