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

アウトライン解析を表示して閉じる操作がテストで実行されるようにする #1671

Merged

Conversation

berryzplus
Copy link
Contributor

PR の目的

タイトル通りです。
テスト不可な機能「アウトライン解析」の一部コードを自動テストで実行するようにします。

カテゴリ

  • その他の問題

PR の背景

アウトライン解析(ダイアログ)はサクラエディタの全クラス中3番目に大きなクラスです。
CEditWndのインスタンスメンバであるため、サクラエディタを起動するだけで約2%のコードが実行されます。

アウトライン解析のコードの大半は、UIに依存しないデータ処理コードですが、
Windows APIに強く依存するコーディングスタイルが採られているためテスト不能です。

今回は、アウトライン解析を開いて閉じる操作を追加することで、自動テストで実行されるコード量を増やします。
これにより、3.2kステップあるコードのうち、500ステップくらいカバーすることができます。

PR のメリット

  • コードカバレッジが若干上がります。

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

  • コードを動かした結果を表かしない「動かすだけテスト」なので、追加する意義は若干ビミョーです。

仕様・動作説明

  • 既存テストで実行するスクリプトにアウトライン解析の表示/非表示を追加します。

PR の影響範囲

テスト追加のみです。

テスト内容

テスト追加のみの変更なので、CIテストのみで評価可能と思います。

関連 issue, PR

参考資料

テスト不可な機能「アウトライン解析」の一部コードを自動テストで実行するようにします。
@sonarcloud
Copy link

sonarcloud bot commented May 18, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@AppVeyorBot
Copy link

@berryzplus
Copy link
Contributor Author

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

@berryzplus berryzplus merged commit ba2e379 into sakura-editor:master May 20, 2021
@berryzplus berryzplus deleted the feature/add_show_dlgfunclist branch May 20, 2021 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants