Releases: fluentassert/verify
1.2.0
1.1.0
1.0.0
This release contains breaking changes.
The repository is moved to github.com/fluentassert/verify
and the f
package is renamed to verify
.
The main additions are the new assertions for bool
, constraints.Ordered
, constraints.Float
, constraints.Integer
, string
, error
, []T
, map[K]V
, func()
types.
Added
- Add
True
,False
, assertion functions. - Add
Nil
,NotNil
, assertion functions. - Add
NoError
,IsError
assertion functions. - Add
Panics
,NoPanic
assertion functions. - Add
Eventually
,EventuallyChan
assertion functions. - Add
Ordered
function which provides following assertions, in addition toComparable
, viaFluentOrdered
type:Lesser
LesserOrEqual
GreaterOrEqual
Greater
- Add
String
function which provides following assertions, in addition toOrdered
, viaFluentString
type:Empty
NotEmpty
Contain
NotContain
Prefix
NoPrefix
Sufix
NoSufix
EqualFold
NotEqualFold
MatchRegex
NotMatchRegex
- Add
Number
function which provides following assertions, in addition toOrdered
, viaFluentNumber
type:InDelta
NotInDelta
InEpsilon
NotInEpsilon
- Add
Error
function which provides following assertions, in addition toAny
andString
(for error message), viaFluentObj
andFluentString
types:Is
IsNot
As
NotAs
- Add
Slice
function which provides following assertions, in addition toAny
, viaFluentSlice
type:Empty
NotEmpty
Equivalent
NotEquivalent
Contain
NotContain
Any
All
None
- Add
Map
function which provides following assertions, in addition toAny
, viaFlientMap
type:Empty
NotEmpty
Contain
NotContain
ContainPair
NotContainPair
Any
All
None
- Add
FailureMessage.Prefix
method together withAnd
andOr
functions to facilitate creating complex assertions.
Changed
- The
f
package is renamed toverify
. - Rename
Obj
andFluentObj
toAny
andFluentAny
. - Rename
Comparable
andFluentComparable
toObj
andFluentObj
. - Change the
Check
assertion forany
object so that the provided function has to returnFailureMessage
instead of astring
. Zero
andNonZero
methods are moved toFluentComparable
.- Better failure messages.
1.0.0-rc.3
Removed
- Remove
constraints
package.
1.0.0-rc.2
Changed
- Rename
NumberFloat
toFluentNumber
.
1.0.0-rc.1
This release contains breaking changes.
The repository is moved to github.com/fluentassert/verify
and the f
package is renamed to verify
.
The main additions are the new assertions for bool
, constraints.Ordered
, constraints.Float
, constraints.Integer
, string
, error
, []T
, map[K]V
, func()
types.
Added
- Add
True
,False
, assertion functions. - Add
Nil
,NotNil
, assertion functions. - Add
NoError
,IsError
assertion functions. - Add
Panics
,NoPanic
assertion functions. - Add
Eventually
,EventuallyChan
assertion functions. - Add
Ordered
function which provides following assertions, in addition toComparable
, viaFluentOrdered
type:Lesser
LesserOrEqual
GreaterOrEqual
Greater
- Add
String
function which provides following assertions, in addition toOrdered
, viaFluentString
type:Empty
NotEmpty
Contain
NotContain
Prefix
NoPrefix
Sufix
NoSufix
EqualFold
NotEqualFold
MatchRegex
NotMatchRegex
- Add
Number
function which provides following assertions, in addition toOrdered
, viaFluentNumber
type:InDelta
NotInDelta
InEpsilon
NotInEpsilon
- Add
Error
function which provides following assertions, in addition toAny
andString
(for error message), viaFluentObj
andFluentString
types:Is
IsNot
As
NotAs
- Add
Slice
function which provides following assertions, in addition toAny
, viaFluentSlice
type:Empty
NotEmpty
Equivalent
NotEquivalent
Contain
NotContain
Any
All
None
- Add
Map
function which provides following assertions, in addition toAny
, viaFlientMap
type:Empty
NotEmpty
Contain
NotContain
ContainPair
NotContainPair
Any
All
None
- Add
FailureMessage.Prefix
method together withAnd
andOr
functions to facilitate creating complex assertions.
Changed
- The
f
package is renamed toverify
. - Rename
Obj
andFluentObj
toAny
andFluentAny
. - Rename
Comparable
andFluentComparable
toObj
andFluentObj
. - Change the
Check
assertion forany
object so that the provided function has to returnFailureMessage
instead of astring
. Zero
andNonZero
methods are moved toFluentComparable
.- Better failure messages.
0.2.0
This release is a complete rewrite. It is not compatible with the previous release.
The new API is type-safe and easier to extend.
The next release is supposed to provide assertions for constraints.Ordered
, string
, error
, []T
, map[K]V
, func()
.
Added
- Add
FailureMessage
which encapsulates the failure message and methods for error reporting. - Add
Obj
function which provides following assertions viaFluentObject
type:Check
Should
ShouldNot
DeepEqual
NotDeepEqual
Zero
NonZero
- Add
Comparable
function which provides following assertions,
in addition toObj
, viaFluentComparable
type:Equal
NotEqual
Changed
- Require Go 1.18.
Fixed
- Fix error reporting line (use
t.Helper()
when available).
Removed
- Remove all previous functions and types (API rewrite).
0.1.0
First release after the experiential phase.
Added
- Add
f.Assert
that can be used instead oft.Error
methods. - Add
f.Require
that can be used instead oft.Fatal
methods. - Add
Should
assertion that can be used with custom predicates. - Add
Eq
assertion that checks ifgot
is deeply equal towant
. - Add
Nil
assertion that checks ifgot
isnil
. - Add
Err
assertion that checks ifgot
is anerror
. - Add
Panic
assertion that checks if callinggot
results in a panic. - Add
NoPanic
assertion that checks if callinggot
returns without panicking.