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));
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));
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));
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));
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));
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));
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));
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));
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));
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));
Temporary[0] = 'f';
result.GetMatches(matches);
- EXPECT_EQ(1U, request.GetNumberOfMatches());
+ EXPECT_EQ(1U, result.GetNumberOfResults());
EXPECT_STREQ("bar", matches.GetStringAtIndex(0));
}