Invoke "assert" via macro and more robust testing
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)
, andcall_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
- Feature: offer macros for invoking the assert subroutine only when -DDEBUG is passed by @rouson in #29
- Install library by @rouson in #30
- doc(README): fix typo in fpm command by @rouson in #32
- Fix warnings on multi-include by @bonachea in #33
- Macro docs by @bonachea in #38
- UC License update by @bonachea in #39
- Fix GitHub deploy-docs.yml workflow by @bonachea in #40
- Change assertion enforcement control knob to ASSERTIONS=1/0 by @bonachea in #41
- Auto description by @bonachea in #42
- Cray Fortran fixes by @bonachea in #45
- Assert always by @bonachea in #43
- Repair the non-functional false-assertion test by @bonachea in #44
- Fix issue #46: workaround some compile errors with flang-new 19.1.1 by @bonachea in #47
New Contributors
Full Changelog: 1.7.0...2.0.0