| 92 | } |
| 93 | |
| 94 | const std::vector<const NamedDecl *> |
| 95 | GoogleTestExtractor::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 | |
| 112 | bool GoogleTestExtractor::isTestBody(const llvm::Function *Function) const { |
| 113 | std::string MethodFullName = |