Skip to content

v1.1.1

Compare
Choose a tag to compare
@corbym corbym released this 11 Apr 08:25
· 7 commits to master since this release

Splits up the Length, Empty and Nil matchers.

Unfortunately, for matchers that work on arrays, maps or pointers will still require the compiler to be told the type of the underlying value.
E.g.

// nil pointer, actual is declared as `*string`
then.AssertThat(testing, values.actual, is.NilPtr[string]())
//[]int actual 
then.AssertThat(stubTestingT, test.actual, has.Length[int](test.expected))
// map
then.AssertThat(t, map[string]bool{"hello": true}, has.MapLength[string, bool](1))

.. but vanilla Nil only works on errors and requires no boilerplate types:

then.AssertThat(stubTestingT, someError, is.Nil())

What's Changed

  • attempt to fix/lessen some problems mentioned in issue #9 by @corbym in #10

Full Changelog: v1.1.0...v1.1.1