The most over-engineered C++ assertion library
Fixed:
LIBASSERT_USE_MAGIC_ENUM
handling in libassert-config.cmakeOther:
Fixed:
T::value_type
is a class named value_type
with a constructor https://github.com/jeremy-rifkin/libassert/issues/90
assert-gtest.hpp
https://github.com/jeremy-rifkin/libassert/issues/87
Other:
Changes since v1:
Assertion macros:
ASSERT
/VERIFY
nomenclature with DEBUG_ASSERT
and ASSERT
DEBUG_ASSERT_VAL
, ASSERT_VAL
, and ASSUME_VAL
variants that return valuesPANIC
and UNREACHABLE
LIBASSERT_PREFIX_ASSERTIONS
option to only add assertion macros with a LIBASSERT_
prefixAssertion behavior:
libassert::verification_failure
Custom failure handlers:
libassert::set_failure_handler
LIBASSERT_SAFE_COMPARISONS
to opt into safe signed-unsigned comparisonsAssertion information:
libassert::assertion_printer
libassert::assertion_info
with much more comprehensive information and methods for working with assertion
informationTesting library support:
Library structure:
libassert::utility
and libassert::config
namespaceslibassert::assert
<libasssert/assert.hpp>
Configuration:
libassert::set_separator
libassert::set_color_output
and libassert::set_rgb_output
libassert::set_color_scheme
Stringification:
operator<<(std::ostream, const T&)
LIBASSERT_NO_STRINGIFY_SMART_POINTER_OBJECTS
optionLIBASSERT_USE_FMT
Utilities:
libassert::enable_virtual_terminal_processing_if_needed()
to the public interfacelibassert::isatty
to the public interface as well as stdin/stdout/stderr constantslibassert::stacktrace
to take color scheme and skip parameterslibassert::replace_rgb
libassert::strip_colors
Output:
Analysis:
std::__cxx11::
to to std::
`anonymous namespace'
to (anonymous namespace)
Bug fixes:
Internal improvements:
binary_diagnostics_descriptor
, assert_static_parameters
, and assertion_info
LIBASSERT_STATIC
if using the project with cmake and a static buildASSERT
vs LIBASSERT
for the library's macro prefixChanges:
LIBASSERT_USE_FMT
libassert::enable_virtual_terminal_processing_if_needed()
to the public interfacelibassert::isatty
to the public interface as well as stdin/stdout/stderr constantslibassert::generate_stringification
to libassert::stringify
libassert::set_separator
libassert::set_color_scheme
libassert::stacktrace
to take color scheme and skip parametersLIBASSERT_PREFIX_ASSERTIONS
option to only add assertion macros with a LIBASSERT_
prefix`anonymous namespace'
LIBASSERT_NO_STRINGIFY_SMART_POINTER_OBJECTS
optionbinary_diagnostics_descriptor
, assert_static_parameters
, and assertion_info
This is the first pre-release for version 2. Version 2 is an overhaul of the library taking lessons learned.
Major changes:
ASSERT
/VERIFY
nomenclature with DEBUG_ASSERT
and ASSERT
NO_ASSERT_RELEASE_EVAL
DEBUG_ASSERT_VAL
, ASSERT_VAL
, and ASSUME_VAL
variants that return valuesPANIC
and UNREACHABLE
operator<<(std::ostream, const T&)
libassert::set_failure_handler
LIBASSERT_SAFE_COMPARISONS
to opt into safe signed-unsigned comparisonsbinary_diagnostics_descriptor
extra_diagnostics
struct trying to do too muchassertion_printer
to assertion_info
assertion_info
structassertion_info
structstd::__cxx11::
is simplified to std::
Core changes:
ASSERT_STATIC
if using the project with cmake and a static buildREADME.md
CONTRIBUTING.md
ASSERT
vs LIBASSERT
for the library's macro prefixassert
vs libassert
for referring to the librarylibassert::assert
<libasssert/assert.hpp>
Small patch release that bumps the stack tracing back-end, part of getting vcpkg issues ironed out.
Small release, mainly logistics and infrastructure changes:
Changelog:
libassert::config::set_rgb_output
to control whether 24-bit ansi color sequences are used for coloringASSERT(foo && "Message")
/Zc:preprocessor
ASSERT(a + b);
)>>
Changelog:
-DNO_ASSERT_RELEASE_EVAL
to make ASSERT
behave more like traditional C assertlibassert::
libassert::detail::stringify
libassert 1.0 🎉
Changelog:
CHECK
to DEBUG_ASSERT
and ASSERT
no longer provides an optimizer hint in release. For the hint use
ASSUME
- I gave the naming a lot of thought and decided on making naming state intent clearly&&
and ||
expressions because of short-circuiting (decided this behavior was
too surprising), this can be re-enabled if desired with -DASSERT_DECOMPOSE_BINARY_LOGICAL
#define
the lowercase assert
alias, this alias can be enabled with
-DASSERT_LOWERCASE
-DNCOLOR
in favor of asserts::config::set_color_output
and asserts::utils::strip_colors
. This allows
easiest customization of the color printing behavior and making string replacements in this code path is not a
performance concernthis
parameter)class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>>,int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>>>,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>> const ,int>>>
std::map<std::string, int, std::less<std::string>>
-DASSERT_USE_MAGIC_ENUM
)Internal Development: