Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void TestMatching() {
- const int doc_id = 42;
- const string content = "cat in the city"s;
- const vector<int> ratings = {1, 2, 3};
- // находит нужный документ
- {
- SearchServer server;
- server.AddDocument(doc_id, content, DocumentStatus::ACTUAL, ratings);
- const auto [words, status] = server.MatchDocument("in", 42);
- ASSERT(status == DocumentStatus::ACTUAL);
- ASSERT_EQUAL(words.size(), 1);
- ASSERT_EQUAL(words[0], "in");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment