Swift Testing Code Review
name: swift-testing-code-review
by anderskev · published 2026-04-01
$ claw add gh:anderskev/anderskev-swift-testing-code-review---
name: swift-testing-code-review
description: Reviews Swift Testing code for proper use of #expect/#require, parameterized tests, async testing, and organization. Use when reviewing .swift files with import Testing, @Test, #expect, @Suite, or confirmation patterns.
---
# Swift Testing Code Review
Quick Reference
| Issue Type | Reference |
|------------|-----------|
| #expect vs #require, expression capture, error testing | [references/expect-macro.md](references/expect-macro.md) |
| @Test with arguments, traits, zip() pitfalls | [references/parameterized.md](references/parameterized.md) |
| confirmation, async sequences, completion handlers | [references/async-testing.md](references/async-testing.md) |
| @Suite, tags, parallel execution, .serialized | [references/organization.md](references/organization.md) |
Review Checklist
When to Load References
Review Questions
1. Could pre-computed booleans in `#expect` lose diagnostic context?
2. Is `#require` stopping tests prematurely instead of revealing all failures?
3. Are multi-argument parameterized tests creating accidental Cartesian products?
4. Could `zip()` silently drop test cases due to unequal array lengths?
5. Are completion handlers incorrectly tested with `confirmation`?
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...