Releases: Kaeldehta/swift-fixtures
Releases · Kaeldehta/swift-fixtures
0.2.0
What's Changed
⚠️ Breaking
- Renamed the module
Fixture→Fixtures. Update your imports toimport Fixtures. (#7)
✨ Features
@Fixturenow supports types with custom initializers. (#10)
📝 Docs
- Added
CONTEXT.mdand ADR 0002 documenting custom-initializer support. (#9) - Added a warning note to the README.
Full Changelog: 0.1.0...0.2.0
0.1.0
First release of swift-fixture — a macro for generating fixture data in tests.
Added
@Fixturemacro that synthesizes astatic func fixture(...)factory with a default for every stored property (override only what a test needs), and also synthesizes the type'sFixtureconformance so nested@Fixturetypes compose automatically. Works on structs and enums.@FixtureCaseto mark which enum casestatic var fixtureshould use, overriding the default of the first declared case.@FixtureValue(_:)to override the default value@Fixtureuses for an individual stored property.Fixtureprotocol with built-in conformances for common standard-library and Foundation types.- Opt-in package traits for first-class fixtures of external types:
Tagged(pointfree's swift-tagged) andIdentifiedCollections(pointfree's swift-identified-collectionsIdentifiedArray). - DocC documentation, published on the Swift Package Index.