Minor test changes.

This commit is contained in:
vng 2014-08-19 16:40:33 +03:00 committed by Alex Zolotarev
parent 9ec15a4d2b
commit e64a982065
2 changed files with 11 additions and 6 deletions

View file

@ -335,7 +335,6 @@ UNIT_TEST(LastUniChar)
TEST_EQUAL(strings::LastUniChar(""), 0, ());
TEST_EQUAL(strings::LastUniChar("Hello"), 0x6f, ());
TEST_EQUAL(strings::LastUniChar(" \xD0\x90"), 0x0410, ());
}
UNIT_TEST(GetUniString)
@ -372,10 +371,17 @@ UNIT_TEST(Normalize)
TEST_EQUAL(us, result, ());
}
UNIT_TEST(Normalize_Polish)
UNIT_TEST(Normalize_Special)
{
string const utf8 = "ąĄćłŁÓŻźŃĘęĆ";
TEST_EQUAL(strings::ToUtf8(strings::Normalize(strings::MakeUniString(utf8))), "aAclLOZzNEeC", ());
{
string const utf8 = "ąĄćłŁÓŻźŃĘęĆ";
TEST_EQUAL(strings::ToUtf8(strings::Normalize(strings::MakeUniString(utf8))), "aAclLOZzNEeC", ());
}
{
string const utf8 = "əüöğ";
TEST_EQUAL(strings::ToUtf8(strings::Normalize(strings::MakeUniString(utf8))), "əuog", ());
}
}
UNIT_TEST(UniStringToUtf8)

View file

@ -1,8 +1,7 @@
#pragma once
#include "../indexer/search_delimiters.hpp"
#include "../base/buffer_vector.hpp"
#include "../std/algorithm.hpp"
namespace search
{