reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
56 EXPECT_TRUE(NoOpQuery().run(OS, S)); 58 EXPECT_EQ("", OS.str()); 62 EXPECT_FALSE(InvalidQuery("Parse error").run(OS, S)); 64 EXPECT_EQ("Parse error\n", OS.str()); 68 EXPECT_TRUE(HelpQuery().run(OS, S)); 70 EXPECT_TRUE(OS.str().find("Available commands:") != std::string::npos); 74 EXPECT_TRUE(MatchQuery("functionDecl()", FnMatcher).run(OS, S)); 76 EXPECT_TRUE(OS.str().find("foo.cc:1:1: note: \"root\" binds here") != 78 EXPECT_TRUE(OS.str().find("foo.cc:2:1: note: \"root\" binds here") != 80 EXPECT_TRUE(OS.str().find("bar.cc:1:1: note: \"root\" binds here") != 82 EXPECT_TRUE(OS.str().find("bar.cc:2:1: note: \"root\" binds here") != 84 EXPECT_TRUE(OS.str().find("4 matches.") != std::string::npos); 88 EXPECT_TRUE(MatchQuery(FooMatcherString, FooMatcher).run(OS, S)); 90 EXPECT_TRUE(OS.str().find("foo.cc:1:1: note: \"root\" binds here") != 92 EXPECT_TRUE(OS.str().find("1 match.") != std::string::npos); 97 SetExclusiveOutputQuery(&QuerySession::PrintOutput).run(OS, S)); 98 EXPECT_TRUE(MatchQuery(FooMatcherString, FooMatcher).run(OS, S)); 100 EXPECT_TRUE(OS.str().find("Binding for \"root\":\nvoid foo1()") != 106 SetExclusiveOutputQuery(&QuerySession::DetailedASTOutput).run(OS, S)); 107 EXPECT_TRUE(MatchQuery(FooMatcherString, FooMatcher).run(OS, S)); 109 EXPECT_TRUE(OS.str().find("FunctionDecl") != std::string::npos); 113 EXPECT_TRUE(EnableOutputQuery(&QuerySession::DiagOutput).run(OS, S)); 114 EXPECT_TRUE(EnableOutputQuery(&QuerySession::DetailedASTOutput).run(OS, S)); 115 EXPECT_TRUE(MatchQuery(FooMatcherString, FooMatcher).run(OS, S)); 118 auto Output = OS.str(); 126 EXPECT_TRUE(SetQuery<bool>(&QuerySession::BindRoot, false).run(OS, S)); 127 EXPECT_TRUE(MatchQuery(FooMatcherString, FooMatcher).run(OS, S)); 129 EXPECT_TRUE(OS.str().find("No bindings.") != std::string::npos); 133 EXPECT_FALSE(MatchQuery("isMain()", isMain()).run(OS, S)); 135 EXPECT_EQ("Not a valid top-level matcher.\n", OS.str()); 139 EXPECT_TRUE(QueryParser::parse("let x \"foo1\"", S)->run(OS, S)); 140 EXPECT_EQ("", OS.str()); 143 EXPECT_TRUE(QueryParser::parse("let y hasName(x)", S)->run(OS, S)); 144 EXPECT_EQ("", OS.str()); 147 EXPECT_TRUE(QueryParser::parse("match functionDecl(y)", S)->run(OS, S)); 148 EXPECT_TRUE(OS.str().find("foo.cc:1:1: note: \"root\" binds here") != 150 EXPECT_TRUE(OS.str().find("1 match.") != std::string::npos); 153 EXPECT_TRUE(QueryParser::parse("unlet x", S)->run(OS, S)); 154 EXPECT_EQ("", OS.str()); 157 EXPECT_FALSE(QueryParser::parse("let y hasName(x)", S)->run(OS, S)); 159 "1:10: Value not found: x\n", OS.str());