mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-25 15:11:33 +00:00
Removed useless comment and converted the file to UTF8 to keep special characters
This commit is contained in:
parent
c1c501ca35
commit
0e06e9b221
1 changed files with 7 additions and 9 deletions
|
@ -71,20 +71,18 @@ TEST_F(KeywordSearchTest, keyword_test_utf8_word_begin)
|
||||||
{
|
{
|
||||||
// We make sure that the search works well even if the character is not ASCII
|
// We make sure that the search works well even if the character is not ASCII
|
||||||
MWDialogue::KeywordSearch<std::string, int> search;
|
MWDialogue::KeywordSearch<std::string, int> search;
|
||||||
search.seed("états", 0);
|
search.seed("états", 0);
|
||||||
search.seed("ïrradiés", 0);
|
search.seed("ïrradiés", 0);
|
||||||
search.seed("ça nous déçois", 0);
|
search.seed("ça nous déçois", 0);
|
||||||
|
|
||||||
|
|
||||||
std::string text = "les nations unis ont réunis le monde entier, états units inclus pour parler du problème des gens ïrradiés et ça nous déçois";
|
std::string text = "les nations unis ont réunis le monde entier, états units inclus pour parler du problème des gens ïrradiés et ça nous déçois";
|
||||||
|
|
||||||
std::vector<MWDialogue::KeywordSearch<std::string, int>::Match> matches;
|
std::vector<MWDialogue::KeywordSearch<std::string, int>::Match> matches;
|
||||||
search.highlightKeywords(text.begin(), text.end(), matches);
|
search.highlightKeywords(text.begin(), text.end(), matches);
|
||||||
|
|
||||||
ASSERT_TRUE (matches.size() == 3);
|
ASSERT_TRUE (matches.size() == 3);
|
||||||
ASSERT_TRUE(std::string( matches[0].mBeg, matches[0].mEnd) == "états");
|
ASSERT_TRUE(std::string( matches[0].mBeg, matches[0].mEnd) == "états");
|
||||||
ASSERT_TRUE(std::string( matches[1].mBeg, matches[1].mEnd) == "ïrradiés");
|
ASSERT_TRUE(std::string( matches[1].mBeg, matches[1].mEnd) == "ïrradiés");
|
||||||
ASSERT_TRUE(std::string( matches[2].mBeg, matches[2].mEnd) == "ça nous déçois");
|
ASSERT_TRUE(std::string( matches[2].mBeg, matches[2].mEnd) == "ça nous déçois");
|
||||||
|
|
||||||
//ASSERT_TRUE (std::string(matches.front().mBeg, matches.front().mEnd) == "bar lock");
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue