This repository was archived by the owner on Feb 17, 2025. It is now read-only.
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,IsErrorassertion functions. - Add
Panics,NoPanicassertion functions. - Add
Eventually,EventuallyChanassertion functions. - Add
Orderedfunction which provides following assertions, in addition toComparable, viaFluentOrderedtype:LesserLesserOrEqualGreaterOrEqualGreater
- Add
Stringfunction which provides following assertions, in addition toOrdered, viaFluentStringtype:EmptyNotEmptyContainNotContainPrefixNoPrefixSufixNoSufixEqualFoldNotEqualFoldMatchRegexNotMatchRegex
- Add
Numberfunction which provides following assertions, in addition toOrdered, viaFluentNumbertype:InDeltaNotInDeltaInEpsilonNotInEpsilon
- Add
Errorfunction which provides following assertions, in addition toAnyandString(for error message), viaFluentObjandFluentStringtypes:IsIsNotAsNotAs
- Add
Slicefunction which provides following assertions, in addition toAny, viaFluentSlicetype:EmptyNotEmptyEquivalentNotEquivalentContainNotContainAnyAllNone
- Add
Mapfunction which provides following assertions, in addition toAny, viaFlientMaptype:EmptyNotEmptyContainNotContainContainPairNotContainPairAnyAllNone
- Add
FailureMessage.Prefixmethod together withAndandOrfunctions to facilitate creating complex assertions.
Changed
- The
fpackage is renamed toverify. - Rename
ObjandFluentObjtoAnyandFluentAny. - Rename
ComparableandFluentComparabletoObjandFluentObj. - Change the
Checkassertion foranyobject so that the provided function has to returnFailureMessageinstead of astring. ZeroandNonZeromethods are moved toFluentComparable.- Better failure messages.