[clang-tools-extra] r343535 - [clang-query] Add missing quit test

Stephen Kelly via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 13:45:39 PDT 2018


Author: steveire
Date: Mon Oct  1 13:45:39 2018
New Revision: 343535

URL: http://llvm.org/viewvc/llvm-project?rev=343535&view=rev
Log:
[clang-query] Add missing quit test

Modified:
    clang-tools-extra/trunk/unittests/clang-query/QueryParserTest.cpp

Modified: clang-tools-extra/trunk/unittests/clang-query/QueryParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-query/QueryParserTest.cpp?rev=343535&r1=343534&r2=343535&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-query/QueryParserTest.cpp (original)
+++ clang-tools-extra/trunk/unittests/clang-query/QueryParserTest.cpp Mon Oct  1 13:45:39 2018
@@ -47,6 +47,15 @@ TEST_F(QueryParserTest, Help) {
   EXPECT_EQ("unexpected extra input: ' me'", cast<InvalidQuery>(Q)->ErrStr);
 }
 
+TEST_F(QueryParserTest, Quit) {
+  QueryRef Q = parse("quit");
+  ASSERT_TRUE(isa<QuitQuery>(Q));
+
+  Q = parse("quit me");
+  ASSERT_TRUE(isa<InvalidQuery>(Q));
+  EXPECT_EQ("unexpected extra input: ' me'", cast<InvalidQuery>(Q)->ErrStr);
+}
+
 TEST_F(QueryParserTest, Set) {
   QueryRef Q = parse("set");
   ASSERT_TRUE(isa<InvalidQuery>(Q));




More information about the cfe-commits mailing list