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

Stop defining test utilities under XCTest #456

Merged
merged 1 commit into from
May 19, 2024

Conversation

omochi
Copy link
Contributor

@omochi omochi commented May 19, 2024

CommandTestHelper.swift に書かれたテスト用のユーティリティメソッドが、
XCTest のエクステンションとして定義されています。

内容が特に XCTest のインスタンスと紐付ける必要がないもので、
設計として不適切なため脱エクステンションします。

将来的にこの辺りのプロセス制御系のコードを、
プロジェクト全体で整理したいので、
その際の変更を小さくする意図もあります。

なお、経緯を調べたところ、最初にこのエクステションを定義した時には、
self を参照してそこから Bundle を取得するロジックが書かれていたので、
メソッドとして定義するのは合理的です。


今はそのメンバはありません。

@@ -24,89 +24,87 @@ struct CommandTestError: Swift.Error & CustomStringConvertible {
var description: String
}

extension XCTest {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

これを消すだけです。hide whitespaceでご覧ください。

@omochi omochi marked this pull request as ready for review May 19, 2024 15:07
@kateinoigakukun kateinoigakukun changed the title テストユーティリティがXCTestのメソッドとして実装されているのを止める Stop defining test utilities under XCTest May 19, 2024
@kateinoigakukun kateinoigakukun merged commit 27fcd29 into swiftwasm:main May 19, 2024
4 checks passed
@omochi omochi deleted the stop-xctest-extension branch May 19, 2024 18:40
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.

2 participants