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.