What's Changed
- Modified the add test function as follows:
- Renamed
asertion_add_test
toadd_cmake_script_test
. - Added a new
DEFINITIONS
option to specify predefined variables for the test scripts. - Modified the created test to process the given script directly, without using the
Assertion.cmake
module. This effectively removes support for theAssertion.cmake
module to include other modules when executed in script mode. - Allowed the test file to be specified using an absolute path.
- Asserted that the test file exists before adding the test.
- Prevented the function from being executed in script mode.
- Renamed
- Removed the
assert_fatal_error
function and replaced it with a newassert_call
function, which behaves similarly but also supports asserting warnings. - Modified the
assert_execute_process
function as follows:- Renamed the
OUTPUT
option toEXPECT_OUTPUT
. - Renamed the
ERROR
option toEXPECT_ERROR
. - Added support to specify a comparator when asserting output and error.
- Added a new
EXPECT_FAIL
option to assert whether the executed process failed, without asserting the error message.
- Renamed the
- Removed automatic policy settings from the
assert
function, requiring policies or the CMake version to be specified prior to including the module. - Added a new
ASSERTION_VERSION
variable, which contains the version of the includedAssertion.cmake
module. - Removed the
ASSERTION_LIST_DIR
variable; this can now be obtained using theRESULT
option in theinclude
function instead. - Code improvements and other bug fixes.
- Updated function documentation and usage guide.
- Development changes:
- Utilized CMake presets and updated build rules.
- Added support for packaging the project using CPack.
- Organized and refactored unit tests.
- Updated GitHub Actions workflow configuration.
- Updated development dependencies.
Full Changelog: v1.0.0...v2.0.0