Skip to content

Invoke "assert" via macro and more robust testing

Compare
Choose a tag to compare
@rouson rouson released this 11 Nov 04:37
· 24 commits to main since this release

This release adds the include/assert_macros.h file containing preprocessor macros that guarantee the complete removal of assert subroutine calls when a macro is used and the compile-time flag -DASSERTIONS is not present or -DASSERTIONS=0 is present. The new macros may appear in code in the following forms:

  • call_assert(assertion),
  • call_assert_describe(assertion, description), and
  • call_assert_diagnose(assertion, description, diagnostic_data),

where assertion, description, and diagnostic_data correspond to the assert subroutine's dummy arguments. In the first form above, the macro automatically generates a description actual argument including the file name and line number of the macro's point of use in the source code.

This release also handles other chores, fixes an issue that caused some tests to report passing for incorrect reasons, and works around an issue with LLVM flang 19.1.1.

What's Changed

New Contributors

Full Changelog: 1.7.0...2.0.0