Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

単体テストコードの記述ミスを訂正する #1611

Merged
merged 1 commit into from
Mar 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/unittests/test-cnative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ TEST(CNativeW, GetHabaOfChar)
*/
TEST(CNativeW, GetCharNext)
{
constexpr wchar_t* text = L"a\xd83c\xdf38";
constexpr const wchar_t* text = L"a\xd83c\xdf38";
// 次の文字のアドレスを返す。
EXPECT_EQ(CNativeW::GetCharNext(text, 3, text), text + 1);
// 上位サロゲートが渡された場合は下位サロゲートを飛ばす。
Expand All @@ -864,7 +864,7 @@ TEST(CNativeW, GetCharNext)
*/
TEST(CNativeW, GetCharPrev)
{
constexpr wchar_t* text = L"a\xd83c\xdf38" L"d";
constexpr const wchar_t* text = L"a\xd83c\xdf38" L"d";
// 前の文字のアドレスを返す。
EXPECT_EQ(CNativeW::GetCharPrev(text, 4, text + 1), text);
// 前の文字が下位サロゲートだった場合は下位サロゲートを飛ばす。
Expand All @@ -879,7 +879,7 @@ TEST(CNativeW, GetCharPrev)
TEST(CNativeW, GetCharPrev_Bugs_Preview)
{
// a、カラー絵文字「男性のシンボル」、x
constexpr wchar_t text[] = L"a\U0001F6B9x";
constexpr const wchar_t text[] = L"a\U0001F6B9x";

// text[0] = L'a'
// text[1] = (\U0001F6B9 の1ワード目)
Expand Down