Done in r194494.
On Fri, Nov 8, 2013 at 2:17 AM, Peter Collingbourne <[email protected]> wrote: > On Thu, Nov 07, 2013 at 11:18:05PM -0000, Manuel Klimek wrote: > > +TEST(ClangToolTest, InjectDiagnosticConsumer) { > > + FixedCompilationDatabase Compilations("/", > std::vector<std::string>()); > > + ClangTool Tool(Compilations, std::vector<std::string>(1, "/a.cc")); > > + Tool.mapVirtualFile("/a.cc", "int x = undeclared;"); > > + TestDiagnosticConsumer Consumer; > > + Tool.setDiagnosticConsumer(&Consumer); > > + Tool.run(newFrontendActionFactory<SyntaxOnlyAction>()); > > + EXPECT_EQ(1u, Consumer.NumDiagnosticsSeen); > > +} > > Should this also be testing buildASTs? (I guess you could use a #warning > directive in order to ensure ASTUnit returns an AST). > > Thanks, > -- > Peter >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
