sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land.
Thanks for fixing this! ================ Comment at: unittests/clangd/CodeCompleteTests.cpp:2195 +TEST(CompletionTest, ObjectiveCMethodNoArguments) { + std::string Context = R"objc( + @interface Foo ---------------- "Context" is an odd name for this. ================ Comment at: unittests/clangd/CodeCompleteTests.cpp:2202 + + auto A = completions(Context, {}, {}, "Foo.m").Completions.front(); + EXPECT_EQ(A.Name, "value"); ---------------- this will crash if there aren't any completions, and do something unpredictable if there are multiple. either grab the completions and then `ASSERT_THAT(completions, ElementsAre(_))` or write a getOnlyCompletion() helper that does the needed logging. (Note an assertion on size isn't as good, as it only prints the size on failure) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53934 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits