summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-08-19 14:52:48 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-08-19 14:52:48 +0000
commit6632ad5851d6f404193a81c15664425ec5706e4a (patch)
tree37b62868065fa815f1ff64ecdf7f08a0befdbbb5
parenta023d6b7de784719398cfd81b9f2fe871fa35293 (diff)
downloadbcm5719-llvm-6632ad5851d6f404193a81c15664425ec5706e4a.tar.gz
bcm5719-llvm-6632ad5851d6f404193a81c15664425ec5706e4a.zip
[lldb][NFC] Stop using GetNumberOfMatches in CompletionRequest test
This function is just a wrapper for GetNumberOfResults and will be removed soon. This patch just changes all calls to GetNumberOfResults where possible (which is currently just the unit test). llvm-svn: 369267
-rw-r--r--lldb/unittests/Utility/CompletionRequestTest.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/lldb/unittests/Utility/CompletionRequestTest.cpp b/lldb/unittests/Utility/CompletionRequestTest.cpp
index e250f3daa26..8ea4eebc3b2 100644
--- a/lldb/unittests/Utility/CompletionRequestTest.cpp
+++ b/lldb/unittests/Utility/CompletionRequestTest.cpp
@@ -41,20 +41,20 @@ TEST(CompletionRequest, DuplicateFiltering) {
CompletionRequest request(command, cursor_pos, result);
result.GetMatches(matches);
- EXPECT_EQ(0U, request.GetNumberOfMatches());
+ EXPECT_EQ(0U, result.GetNumberOfResults());
// Add foo twice
request.AddCompletion("foo");
result.GetMatches(matches);
- EXPECT_EQ(1U, request.GetNumberOfMatches());
+ EXPECT_EQ(1U, result.GetNumberOfResults());
EXPECT_EQ(1U, matches.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
request.AddCompletion("foo");
result.GetMatches(matches);
- EXPECT_EQ(1U, request.GetNumberOfMatches());
+ EXPECT_EQ(1U, result.GetNumberOfResults());
EXPECT_EQ(1U, matches.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -62,7 +62,7 @@ TEST(CompletionRequest, DuplicateFiltering) {
request.AddCompletion("bar");
result.GetMatches(matches);
- EXPECT_EQ(2U, request.GetNumberOfMatches());
+ EXPECT_EQ(2U, result.GetNumberOfResults());
EXPECT_EQ(2U, matches.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
EXPECT_STREQ("bar", matches.GetStringAtIndex(1));
@@ -70,7 +70,7 @@ TEST(CompletionRequest, DuplicateFiltering) {
request.AddCompletion("bar");
result.GetMatches(matches);
- EXPECT_EQ(2U, request.GetNumberOfMatches());
+ EXPECT_EQ(2U, result.GetNumberOfResults());
EXPECT_EQ(2U, matches.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
EXPECT_STREQ("bar", matches.GetStringAtIndex(1));
@@ -79,7 +79,7 @@ TEST(CompletionRequest, DuplicateFiltering) {
request.AddCompletion("foo");
result.GetMatches(matches);
- EXPECT_EQ(2U, request.GetNumberOfMatches());
+ EXPECT_EQ(2U, result.GetNumberOfResults());
EXPECT_EQ(2U, matches.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
EXPECT_STREQ("bar", matches.GetStringAtIndex(1));
@@ -88,7 +88,7 @@ TEST(CompletionRequest, DuplicateFiltering) {
request.AddCompletion("foobar");
result.GetMatches(matches);
- EXPECT_EQ(3U, request.GetNumberOfMatches());
+ EXPECT_EQ(3U, result.GetNumberOfResults());
EXPECT_EQ(3U, matches.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
EXPECT_STREQ("bar", matches.GetStringAtIndex(1));
@@ -105,14 +105,14 @@ TEST(CompletionRequest, DuplicateFilteringWithComments) {
result.GetMatches(matches);
result.GetDescriptions(descriptions);
- EXPECT_EQ(0U, request.GetNumberOfMatches());
+ EXPECT_EQ(0U, result.GetNumberOfResults());
// Add foo twice with same comment
request.AddCompletion("foo", "comment");
result.GetMatches(matches);
result.GetDescriptions(descriptions);
- EXPECT_EQ(1U, request.GetNumberOfMatches());
+ EXPECT_EQ(1U, result.GetNumberOfResults());
EXPECT_EQ(1U, matches.GetSize());
EXPECT_EQ(1U, descriptions.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -122,7 +122,7 @@ TEST(CompletionRequest, DuplicateFilteringWithComments) {
result.GetMatches(matches);
result.GetDescriptions(descriptions);
- EXPECT_EQ(1U, request.GetNumberOfMatches());
+ EXPECT_EQ(1U, result.GetNumberOfResults());
EXPECT_EQ(1U, matches.GetSize());
EXPECT_EQ(1U, descriptions.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -133,7 +133,7 @@ TEST(CompletionRequest, DuplicateFilteringWithComments) {
result.GetMatches(matches);
result.GetDescriptions(descriptions);
- EXPECT_EQ(2U, request.GetNumberOfMatches());
+ EXPECT_EQ(2U, result.GetNumberOfResults());
EXPECT_EQ(2U, matches.GetSize());
EXPECT_EQ(2U, descriptions.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -143,7 +143,7 @@ TEST(CompletionRequest, DuplicateFilteringWithComments) {
result.GetMatches(matches);
result.GetDescriptions(descriptions);
- EXPECT_EQ(3U, request.GetNumberOfMatches());
+ EXPECT_EQ(3U, result.GetNumberOfResults());
EXPECT_EQ(3U, matches.GetSize());
EXPECT_EQ(3U, descriptions.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -158,7 +158,7 @@ TEST(CompletionRequest, DuplicateFilteringWithComments) {
result.GetMatches(matches);
result.GetDescriptions(descriptions);
- EXPECT_EQ(4U, request.GetNumberOfMatches());
+ EXPECT_EQ(4U, result.GetNumberOfResults());
EXPECT_EQ(4U, matches.GetSize());
EXPECT_EQ(4U, descriptions.GetSize());
EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -186,6 +186,6 @@ TEST(CompletionRequest, TestCompletionOwnership) {
Temporary[0] = 'f';
result.GetMatches(matches);
- EXPECT_EQ(1U, request.GetNumberOfMatches());
+ EXPECT_EQ(1U, result.GetNumberOfResults());
EXPECT_STREQ("bar", matches.GetStringAtIndex(0));
}
OpenPOWER on IntegriCloud