Lines Matching refs:Code
61 testing::AssertionResult matchesConditionally(const std::string &Code,
76 if (!runToolOnCodeWithArgs(Factory->create(), Code, Args)) {
77 return testing::AssertionFailure() << "Parsing error in \"" << Code << "\"";
87 << "Could not find match in \"" << Code << "\"";
90 << "Found unexpected match in \"" << Code << "\"";
96 testing::AssertionResult matches(const std::string &Code, const T &AMatcher) {
97 return matchesConditionally(Code, AMatcher, true, "-std=c++11");
101 testing::AssertionResult notMatches(const std::string &Code,
103 return matchesConditionally(Code, AMatcher, false, "-std=c++11");
108 matchAndVerifyResultConditionally(const std::string &Code, const T &AMatcher,
120 if (!runToolOnCodeWithArgs(Factory->create(), Code, Args)) {
121 return testing::AssertionFailure() << "Parsing error in \"" << Code << "\"";
125 << "Could not verify result in \"" << Code << "\"";
128 << "Verified unexpected result in \"" << Code << "\"";
132 std::unique_ptr<ASTUnit> AST(buildASTFromCodeWithArgs(Code, Args));
134 return testing::AssertionFailure() << "Parsing error in \"" << Code
139 << "Could not verify result in \"" << Code << "\" with AST";
142 << "Verified unexpected result in \"" << Code << "\" with AST";
152 matchAndVerifyResultTrue(const std::string &Code, const T &AMatcher,
155 Code, AMatcher, FindResultVerifier, true);
160 matchAndVerifyResultFalse(const std::string &Code, const T &AMatcher,
163 Code, AMatcher, FindResultVerifier, false);