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

Latin1の変換テストを増強する #1633

Merged

Conversation

berryzplus
Copy link
Contributor

@berryzplus berryzplus commented Apr 18, 2021

PR の目的

Latin1の変換テストを増強します。

カテゴリ

  • その他の問題

PR の背景

#1614 で文字コード変換クラスのテストを追加しました。

一律にテスト導入できるようにCLatin1のケースも作成しましたが、詳細部分はテキトーに実装してありました。

PR のメリット

  • CLatin1の変換仕様が明確になります。

PR のデメリット (トレードオフとかあれば)

  • とくにありません。

仕様・動作説明

#1614 で導入したCLatin1のテストにコード範囲 [0x80, 0xFF] の仕様を追加します。

また、 #1627 で犯したテストコード挿入位置誤りに対処します。

PR の影響範囲

テストコードの修正のみであるため、アプリの仕様・挙動に影響はありません。

テスト内容

関連 issue, PR

#1614
#1627

参考資料

https://ja.wikipedia.org/wiki/Windows-1252

実装されている仕様を明確するようにテストを修正
@AppVeyorBot
Copy link

Comment on lines 267 to 268
constexpr const auto& wcsOGuy = L"カナかなカナ漢字";
constexpr const auto& mbsOGuy = "????????";
Copy link
Member

@kengoide kengoide Apr 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
constexpr const auto& wcsOGuy = L"カナかなカナ漢字";
constexpr const auto& mbsOGuy = "????????";
constexpr const auto& wcsKanaKanji = L"カナかなカナ漢字";
constexpr const auto& mbsKanaKanji = "????????";

この文字列はオーガイさんではありませんから…。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

誤記というかコピペしたままでした。

ちなみに、OGuyは O - Guy で 「Oな野郎」 を意味します。
一応、化けるテストなもんで、バケラッタのO次郎とかけています。
O次郎は昭和のアニメ「オバケのQ太郎」に登場するキャラクターです。
だから、鷗外じゃなくてもこれでいいんだ!と頑張れなくもないんですが、直したいっす。

@berryzplus berryzplus marked this pull request as draft April 19, 2021 00:45
@berryzplus
Copy link
Contributor Author

まちがった!これナシw
(検討中の修正を誤ってあげたっす)

@berryzplus berryzplus marked this pull request as ready for review April 19, 2021 04:20
@sonarcloud
Copy link

sonarcloud bot commented Apr 19, 2021

Please retry analysis of this Pull-Request directly on SonarCloud.

@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@beru beru added the UnitTest label Apr 19, 2021
@berryzplus
Copy link
Contributor Author

レビューありがとうございます。マージしちゃいます。

@berryzplus berryzplus merged commit 9713af2 into sakura-editor:master Apr 21, 2021
@berryzplus berryzplus deleted the feature/improve_latin1_test branch April 21, 2021 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants