- Fix "behaviour" → "behavior" for American English consistency
- Rewrite InlineArray section: label as custom helper, use correct
initializer syntax, fix emoji, add import and function body
- Remove misleading KeyValuePairs mention (no usage example, niche)
- Update review checklist to recommend tuples/dictionaries as primary
pairing strategy, with zip as fallback
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Addresses gaps in the parameterized testing guidance around several
subtle but impactful pitfalls:
- Derived expected values: warn against using the input itself in the
expected expression, which allows bugs to pass silently.
- Control flow in test bodies: explains why if/switch branching mirrors
implementation logic and defeats independent verification.
- zip() silent truncation: unequal-length collections drop elements
without any warning or compiler error.
- CaseIterable.allCases with zip: fragile when enum cases are reordered;
also forces conformance that constrains production code design.
- Paired input alternatives: adds array-of-tuples, dictionary arguments,
and fixed-size zip with InlineArray (Swift 6.2+) as safer options.
- When CaseIterable IS appropriate: property-based tests verifying
universal invariants are a valid and distinct use case.
Review checklist updated to reflect all new guidance.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>