diff options
Diffstat (limited to 'clang-tools-extra/unittests/clang-query/QueryParserTest.cpp')
-rw-r--r-- | clang-tools-extra/unittests/clang-query/QueryParserTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp b/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp index c814a3d16fc..d6153a86479 100644 --- a/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp +++ b/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp @@ -170,4 +170,14 @@ TEST_F(QueryParserTest, Complete) { EXPECT_EQ("Stmt(", Comps[0].TypedText); EXPECT_EQ("Matcher<Stmt> whileStmt(Matcher<WhileStmt>...)", Comps[0].DisplayText); + + Comps = QueryParser::complete("m", 1, QS); + ASSERT_EQ(1u, Comps.size()); + EXPECT_EQ("atch ", Comps[0].TypedText); + EXPECT_EQ("match", Comps[0].DisplayText); + + Comps = QueryParser::complete("l", 1, QS); + ASSERT_EQ(1u, Comps.size()); + EXPECT_EQ("et ", Comps[0].TypedText); + EXPECT_EQ("let", Comps[0].DisplayText); } |