mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-18 23:03:06 +08:00
Translate everything-claude-code repository to Japanese including: - 17 root documentation files - 60 agent documentation files - 80 command documentation files - 99 rule files across 18 language directories (common, angular, arkts, cpp, csharp, dart, fsharp, golang, java, kotlin, perl, php, python, ruby, rust, swift, typescript, web) - 199 skill documentation files Total: 455 files translated to Japanese with: - Consistent terminology glossary applied throughout - YAML field names preserved in English (name, description, etc.) - Code blocks and examples untouched (comments translated) - Markdown structure and relative links preserved - Professional translation maintaining technical accuracy This translation expands ECC accessibility to Japanese-speaking developers and teams. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
46 lines
1.2 KiB
Markdown
46 lines
1.2 KiB
Markdown
---
|
||
paths:
|
||
- "**/*.swift"
|
||
- "**/Package.swift"
|
||
---
|
||
# Swift テスト
|
||
|
||
> このファイルは [common/testing.md](../common/testing.md) を Swift 固有のコンテンツで拡張します。
|
||
|
||
## フレームワーク
|
||
|
||
新しいテストには **Swift Testing**(`import Testing`)を使用する。`@Test` と `#expect` を使用する:
|
||
|
||
```swift
|
||
@Test("User creation validates email")
|
||
func userCreationValidatesEmail() throws {
|
||
#expect(throws: ValidationError.invalidEmail) {
|
||
try User(email: "not-an-email")
|
||
}
|
||
}
|
||
```
|
||
|
||
## テストの分離
|
||
|
||
各テストは新しいインスタンスを取得する — `init` でセットアップし、`deinit` でティアダウンする。テスト間で共有ミュータブル状態を持たない。
|
||
|
||
## パラメータ化テスト
|
||
|
||
```swift
|
||
@Test("Validates formats", arguments: ["json", "xml", "csv"])
|
||
func validatesFormat(format: String) throws {
|
||
let parser = try Parser(format: format)
|
||
#expect(parser.isValid)
|
||
}
|
||
```
|
||
|
||
## カバレッジ
|
||
|
||
```bash
|
||
swift test --enable-code-coverage
|
||
```
|
||
|
||
## 参考
|
||
|
||
プロトコルベースの依存性注入と Swift Testing によるモックパターンについてはスキル: `swift-protocol-di-testing` を参照。
|