Releases: lostatc/xpct
Releases · lostatc/xpct
v0.5.1
- Add new method
MatchFailure::unwrap
. - Add new method
MatchFailure::into_inner
.
v0.5.0
- Add
eq_diff
matcher for testing for equality and producing a diff if the values are not equal. - Organize matchers in
xpct::matchers
into submodules. - Add
Formatter::indented
for indenting arbitrary text in formatters. - Add support for indenting strings with a hanging indent via
Formatter::indented_hanging
andFormattedOutput::indented_hanging
. - Support indenting text via arbitrary prefix strings instead of just leading whitespace when using
Formatter::indented
andFormattedOutput::indented
. - Add
whitespace
function to generate whitespace for indenting strings. - Remove
FormattedFailure::into_indented
. - Remove
file_location!
macro. - Make
Format
takeself
by reference instead of by value. - Update
match_regex
to accept animpl AsRef<str>
instead of a&str
. - Fix text styling applying to the whitespace when indenting text. Previously, if you applied a style like underline, the leading whitespace would be underlined.
- Improve output formatting when
Debug
impls contain newlines. - Increase the MSRV to 1.70.0.
v0.4.0
- Added an
Expectation
type andExpectationFormat
formatter. - Updated several matchers to return an
Expectation
instead of()
as their failure output. - Renamed
SimpleMatch
toMatch
. - Renamed
Match
toTransformMatch
. - Renamed
Matcher::new
toMatcher::transform
. - Renamed
Matcher::neg
toMatcher::transform_neg
. - Renamed
Matcher::simple
toMatcher::new
. - Renamed
Matcher::simple_neg
toMatcher::neg
. - Renamed
NonZeroInt::into_non_zero
toNonZeroInt::non_zero
and changed its signature. - Added
match_elements
matcher. - Exposed
InfallibleFormat
as public API. - Created a separate
BeEmpty
matcher. Previously,be_empty
was implemented usingHaveLenMatcher
. - Fixed a bug in the failure output of
have_len
. - Revised many examples in the documentation and user guide.
v0.3.1
v0.3.0
- Replace
expect
function withAssertion::new
. - Make
FileExistsMode
non-exhaustive. - Remove
Assertion::with_ctx
andAssertion::with_fmt
. - Rename
ResultFormat
toMatcherFormat
. - Add
be_zero
matcher. - Change the output of
SomeFailuresFormat
to only show which matchers failed as opposed to also showing which matchers succeeded. - Add missing
Debug
impl toApproxEqTimeMatcher
.
v0.2.4
v0.2.3
v0.2.2
- Improve documentation for
FormattedOutput
andFormattedFailure
. - Add
FormattedFailure::into_indented
.
v0.2.1
- Add a MSRV to Cargo.toml and a MSRV policy to the README.
- Add
ChainAssertion::iter_map
andChainAssertion::iter_try_map
for parity withAssertion
.
v0.2.0
- Expand and clarify the user docs, in particular the Cargo Features, Writing Custom Matchers, and Writing Custom Formatters pages.
- Add
into
andtry_into
matchers to go with the already existing methodsAssertion::into
andAssertion::try_into
. - Create
Assertion::iter_map
andAssertion::iter_try_map
to pair with the existing matchersiter_map
anditer_try_map
. - Replace some explicit type parameters with
into Trait
parameters.