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

Method getTestSequence

lib/tcanalysis/GoogleTestExtractor.cpp:94–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94const std::vector<const NamedDecl *>
95GoogleTestExtractor::getTestSequence(const clang::NamedDecl *Test) {
96 std::vector<const NamedDecl *> SequenceNamedDecls;
97 const auto *TestCXXRecordDecl = cast<CXXRecordDecl>(Test);
98
99 std::vector<std::string> TestSequence = {SetupTestcaseName, SetupName,
100 TestName, TeardownName,
101 TeardownTestcaseName};
102
103 for (std::string ActionName : TestSequence) {
104 const auto *ActionDecl =
105 findTestMethodRecursively(TestCXXRecordDecl, ActionName);
106 if (ActionDecl)
107 SequenceNamedDecls.emplace_back(ActionDecl);
108 }
109 return SequenceNamedDecls;
110}
111
112bool GoogleTestExtractor::isTestBody(const llvm::Function *Function) const {
113 std::string MethodFullName =

Callers 5

getTCCallMethod · 0.80
getTCCallMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected