Skip to content

Latest commit

 

History

History
270 lines (182 loc) · 8.95 KB

File metadata and controls

270 lines (182 loc) · 8.95 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Common Changelog, and this project adheres to Semantic Versioning.

0.14.0 - 2026-03-15

we now have field-by-field recursive comparison

Added

  • add a field-by-field recursive comparison feature (PR #79)

  • add the ability to map a subject to its debug- or display-string representation (PR #77)

Changed

  • Breaking: rename assertions has_debug_message to has_debug_string (PR #75)
  • Breaking: rename assertions has_display_message to has_display_string (PR #76)

0.13.1 - 2026-02-15

Added

  • doc: provide an example on how to write a custom assertion method with reusing existing assertions

Changed

  • doc: custom assertion in example AssertOver18 is implemented for generic S: Borrow<Person>

0.13.0 - 2026-02-15

Custom assertion methods without expectations

Added

  • write custom assertion methods without the need to implement a custom expectation as well (PR #74)

0.12.0 - 2026-01-10

Asserting some elements in a collection or an iterator

Added

  • verify that at least one element of an iterator or collection satisfies assertions (PR #73)
  • assert some elements of an iterator against a predicate (PR #71)

Changed

  • Breaking: rename method each_item() to each_element() (PR #72)

0.11.0 - 2025-12-27

Pick elements of collections or iterators for assertion

Added

  • add new filter assertions for collections and iterators to pick specific elements for assertion (PR #70)

0.10.0 - 2025-11-09

Added

  • add a new assertion that assures that the type and value are as expected (PR #66)

Changed

  • do not print "assertion failed" with every assertion failure (PR #65)

Documented

  • add an example of a helper function for asserting fields of a custom struct reusing existing assertions (PR #67)

0.9.0 - 2025-06-28

"Does not contain" assertions for strings, collections and iterators and expectation combinators (not, all, any)

Added

  • assert types formatted for debug and display (PR #56)
  • provide "does not..." assertions for strings (PR #53)
  • does_not_contain assertion for collections and iterators (PR #57)
  • does_not_contain_any_of assertion for collection and iterators (PR #58)
  • Breaking: provide Not expectation combinator and revise failure messages (PR #52)
  • provide expectation combinators All and Any (PR #54)
  • Breaking: provide constructor functions for all expectations (including the combinators) (PR #55)

0.8.0 - 2025-06-08

Asserting big and accurate numbers

Added

  • Number assertions for num_bigint::BigInt and num_bigint::BigUint (PR #46)
  • Number assertions for bigdecimal::BigDecimal and bigdecimal::BigDecimalRef (PR #48)
  • Number assertions for rust_decimal::Decimal (PR #47)
  • Decimal number specific assertions has_scale_of, has_precision_of and is_integer (PR #49)
  • Assertions for properties and classification of characters (char) (PR #45)

Fixed

  • Assertions for Result are not available for borrowed &Result (PR #43)
  • Assertions for Option are not available for borrowed &Option (PR #42)

Development

  • Use a fake environment for testing functionality that depends on environment variables (PR #50)

0.7.0 - 2025-06-02

Assertions for Error types

Added

  • Provide assertions for types that implement std::error::Error (PR #38)
  • Add examples to the rustdoc of every assertion method (PR #39)

Fixed

  • Missing #[track_caller] annotations on some assertion methods (PR #40)
  • Delete the trait RangeLike as it is unused (PR #41)

0.6.0 - 2025-05-10

Assertions for map-like types (HashMap, BTreeMap) and assert items of collections/iterators

Added

  • Provide assertions for map-like types (PR #31)
  • Assert each item in a collection or iterator (PR #35)
  • Support dynamically composed expression in Spec (PR #33)
  • Support dynamically composed description in Spec (PR #34)

Changed

  • Compile time error when assertions for closures are chained (PR #36)
  • Remove implementation of Default for DoesPanic (PR #37)

Fixed

  • assert_that_code does not highlight diffs in failure (PR #30)

0.5.0 - 2025-04-26

Soft assertions

Added

  • Support for soft assertions (PR #28)
  • Respect NO_COLOR environment variable colored feature (PR #23)
  • Provide matches regex assertion for strings (PR #24)
  • Accept any type of range in range assertions (PR #21)
  • Doc: mark api elements gated behind a feature flag in rust doc (PR #22)

Changed

  • Breaking: Rename crate feature float_cmp to float-cmp (PR #26)
    The functionality of the crate feature remains the same.
    Replace any occurrence of the crate feature float_cmp with float-cmp.
  • Read diff format configuration only once per test run (PR #27)

Fixed

  • assert_that_code does not highlight diffs in failure messages (PR #30)

0.4.0 - 2025-04-20

More assertions provided

Added

  • Provide assertions for the length of CString and CStr (PR #13)
  • Provide assertions for the number of characters in strings (PR #14)
  • Provide more assertions for the length of strings and collections (PR #15)
  • Provide additional assertions for the order of values (PR #16)
  • Provide additional assertions for integers and floats (PR #17)

Changed

  • Breaking: Rename crate feature float to float_cmp (PR #18)
    The functionality of the crate feature remains the same.
    Replace any occurrence of the crate feature float with float_cmp.

0.3.0 - 2025-04-14

Color-highlighted diffs in assertion failures

Added

  • Color highlighted differences between expected and actual values (PR #10)

Changed

  • Move 'within margin of...' in failure message for is_close_to to separate line (PR #8)
  • Set must_use attributes only to methods returning Self (PR #7)
  • Remove (nearly) useless const for fn (PR #6)

0.2.0 - 2025-03-23

Added

  • Assertion has_error_message asserting the string representation of an error type in a Result.

Fixed

  • Wrong assertions listed for the Result type in README
  • Some broken links in the README

0.1.0 - 2025-03-22

First release