[PATCH] Made the ClangTidyTest helper class independent of the testing framework.
Alexander Kornienko
alexfh at google.com
Thu Feb 27 06:26:04 PST 2014
================
Comment at: unittests/clang-tidy/GoogleModuleTest.cpp:8
@@ -6,3 +7,3 @@
-typedef ClangTidyTest<ExplicitConstructorCheck> ExplicitConstructorCheckTest;
+#define EXPECT_NO_CHANGES(test, code) EXPECT_EQ(code, test.runCheckOn(code))
----------------
Manuel Klimek wrote:
> Since this probably already destroys the __FILE__ magic, I'd just make it a function.
No, it doesn't break the __FILE__ magic. I get correct line numbers when the expect fails.
================
Comment at: unittests/clang-tidy/ClangTidyTest.h:31
@@ -31,4 +30,3 @@
Check->setContext(&Context);
- EXPECT_TRUE(
- tooling::runToolOnCode(new TestPPAction(*Check, &Context), Code));
+ tooling::runToolOnCode(new TestPPAction(*Check, &Context), Code);
ast_matchers::MatchFinder Finder;
----------------
Manuel Klimek wrote:
> Instead of ignoring return values, I'd prefer to explicitly return the empty string.
Done.
http://llvm-reviews.chandlerc.com/D2895
More information about the cfe-commits
mailing list