boostorg / test

The reference C++ unit testing framework (TDD, xUnit, C++03/11/14/17)
http://boost.org/libs/test
Boost Software License 1.0
182 stars 141 forks source link

Include negated assertion_result messages: #395

Open krwalker opened 1 year ago

krwalker commented 1 year ago

Given a helper function isEqualCaseInsensitive() returning helpful detail in the assertion_result message, negation in a BOOST_CHECK() results in that detail being discarded.

This feature preserves that detail in the negated case.

For example:

BOOST_CHECK(isEqualCaseInsensitive('z', 'Z')) included detail like [z isEqualCaseInsensitiveTo Z]

BOOST_CHECK(!isEqualCaseInsensitive('z', 'Z')) discarded that detail until this revision, which now includes it: NOT([z isEqualCaseInsensitiveTo Z])