Skip to content

v0.4.0

Compare
Choose a tag to compare
@JosiahWitt JosiahWitt released this 21 Feb 12:50
· 16 commits to master since this release
2e6f290

Changes

  • Global
    • Renamed ensurepkg to ensuring and ensurepkg.Ensure to ensuring.E in a backwards compatible way. ensurepkg is marked as deprecated, and you are encourage to find and replace all references at your earliest convenience. ensurepkg may be removed in an upcoming release.
  • ensure.RunTableByIndex:
    • The underlying implementation was refactored from the ground up to make it much more testable and extensible in the future
    • Mocks can be completely ignored using the `ensure:"-"` tag, in addition to the existing `ensure:"ignoreunused"` tag for making them optional
    • ⚠️ Breaking Change: Unused mocks are now an error unless they are ignored (`ensure:"-"`) or optional (`ensure:"ignoreunused"`)
    • Warnings are no longer issued, since unused mocks are now an error
    • Supports embedded pointer fields in structs and mocks instead of only embedded non-pointer fields
    • Correctly handles "shadowed" fields in embedded fields in both Subject and Mocks
    • Duplicate mocks are now supported, but will cause errors when matching a Subject, unless one of them is ignored (`ensure:"-"`) or optional (`ensure:"ignoreunused"`)