Skip to content

Releases: JosiahWitt/ensure

v0.4.0 Beta 1

05 Feb 16:45
1a31428
Compare
Choose a tag to compare
v0.4.0 Beta 1 Pre-release
Pre-release

Since v0.4.0 is going to be a larger release, we're starting with a short series of beta releases.

Changes

  • ensure.RunTableByIndex:
    • The underlying implementation was refactored from the ground up to make it much more extensible and testable 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"`)

Support Go 1.20

04 Feb 19:50
2d23fe6
Compare
Choose a tag to compare
Merge pull request #67 from JosiahWitt/go1.20

Support Go 1.20

CLI: Support Go 1.20

04 Feb 19:50
2d23fe6
Compare
Choose a tag to compare
Merge pull request #67 from JosiahWitt/go1.20

Support Go 1.20

Internal minor refactors

03 Feb 01:33
effd066
Compare
Choose a tag to compare

This release should have no external changes. It is purely an internal refactor preparing for a future release.

Enhance IsNil, IsError, and MatchesAllErrors

22 Dec 22:01
ba674f9
Compare
Choose a tag to compare

Now nil is handled correctly for slices, maps, channels, and functions in IsNil, IsError, and MatchesAllErrors.

CLI: Small bugfix

22 Dec 22:01
ba674f9
Compare
Choose a tag to compare

No longer passes in the empty string to os.DirFS in the CLI.

Print UTF-8 Byte Slices as Strings

04 Oct 12:54
24acd28
Compare
Choose a tag to compare

Now if Equals is provided actual and expected UTF-8 []bytes, it prints them as strings. This is useful for things like the output from json.Marshal, which is always a UTF-8 byte slice.

CLI: Go 1.19 Support

01 Oct 17:47
1ced25f
Compare
Choose a tag to compare

Go 1.19 changed two spaces to a tab to indicate a code block in a doc comment. This release updates the CLI to generate doc comments in that format.

CLI: Upgrade dependencies

19 May 18:54
efa1e83
Compare
Choose a tag to compare
Merge pull request #55 from JosiahWitt/upgrade-cli-deps

Upgrade CLI dependencies to fix issue loading packages

CLI: Support generating mocks for generic interfaces

02 May 00:43
ea61135
Compare
Choose a tag to compare

ensure mocks generate now supports generic interfaces!