Lines Matching refs:Code

63     const std::string &Code, const T &AMatcher, bool ExpectMatch,
87 Factory->create(), Code, Args, Filename, "clang-tool",
89 return testing::AssertionFailure() << "Parsing error in \"" << Code << "\"";
99 << "Could not find match in \"" << Code << "\"";
102 << "Found unexpected match in \"" << Code << "\"";
108 testing::AssertionResult matches(const std::string &Code, const T &AMatcher) {
109 return matchesConditionally(Code, AMatcher, true, "-std=c++11");
113 testing::AssertionResult notMatches(const std::string &Code,
115 return matchesConditionally(Code, AMatcher, false, "-std=c++11");
119 testing::AssertionResult matchesObjC(const std::string &Code,
122 Code, AMatcher, true,
127 testing::AssertionResult matchesC(const std::string &Code, const T &AMatcher) {
128 return matchesConditionally(Code, AMatcher, true, "", FileContentMappings(),
133 testing::AssertionResult matchesC99(const std::string &Code,
135 return matchesConditionally(Code, AMatcher, true, "-std=c99",
140 testing::AssertionResult notMatchesC(const std::string &Code,
142 return matchesConditionally(Code, AMatcher, false, "", FileContentMappings(),
147 testing::AssertionResult notMatchesObjC(const std::string &Code,
150 Code, AMatcher, false,
159 const std::string &Code, const T &AMatcher, bool ExpectMatch,
194 CudaHeader + Code, Args)) {
195 return testing::AssertionFailure() << "Parsing error in \"" << Code << "\"";
205 << "Could not find match in \"" << Code << "\"";
208 << "Found unexpected match in \"" << Code << "\"";
214 testing::AssertionResult matchesWithCuda(const std::string &Code,
216 return matchesConditionallyWithCuda(Code, AMatcher, true, "-std=c++11");
220 testing::AssertionResult notMatchesWithCuda(const std::string &Code,
222 return matchesConditionallyWithCuda(Code, AMatcher, false, "-std=c++11");
227 matchAndVerifyResultConditionally(const std::string &Code, const T &AMatcher,
241 if (!runToolOnCodeWithArgs(Factory->create(), Code, Args)) {
242 return testing::AssertionFailure() << "Parsing error in \"" << Code << "\"";
246 << "Could not verify result in \"" << Code << "\"";
249 << "Verified unexpected result in \"" << Code << "\"";
253 std::unique_ptr<ASTUnit> AST(buildASTFromCodeWithArgs(Code, Args));
255 return testing::AssertionFailure() << "Parsing error in \"" << Code
260 << "Could not verify result in \"" << Code << "\" with AST";
263 << "Verified unexpected result in \"" << Code << "\" with AST";
273 matchAndVerifyResultTrue(const std::string &Code, const T &AMatcher,
276 Code, AMatcher, std::move(FindResultVerifier), true);
281 matchAndVerifyResultFalse(const std::string &Code, const T &AMatcher,
284 Code, AMatcher, std::move(FindResultVerifier), false);