Skip to content

Releases: Kaeldehta/swift-fixtures

0.2.0

17 Jun 12:03
d201e8b

Choose a tag to compare

What's Changed

⚠️ Breaking

  • Renamed the module FixtureFixtures. Update your imports to import Fixtures. (#7)

✨ Features

  • @Fixture now supports types with custom initializers. (#10)

📝 Docs

  • Added CONTEXT.md and 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

16 Jun 22:21

Choose a tag to compare

First release of swift-fixture — a macro for generating fixture data in tests.

Added

  • @Fixture macro that synthesizes a static func fixture(...) factory with a default for every stored property (override only what a test needs), and also synthesizes the type's Fixture conformance so nested @Fixture types compose automatically. Works on structs and enums.
  • @FixtureCase to mark which enum case static var fixture should use, overriding the default of the first declared case.
  • @FixtureValue(_:) to override the default value @Fixture uses for an individual stored property.
  • Fixture protocol 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) and IdentifiedCollections (pointfree's swift-identified-collections IdentifiedArray).
  • DocC documentation, published on the Swift Package Index.