Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #241 @ChrisKitching described that tests on out of source builds fail because the test executable can't find the JSON files it needs. It's great that he noticed this and provided a fix for it, I totally missed this issue when I rewrote the CMake lists file.
In #242 the issue is fixed by installing the test executable and test files. There are two problems with this approach:
In this PR I defined two CMake/CTest test configurations.
json_unit_default
for running the default tests by executingjson_unit
without any argumentsjson_unit_all
for running all the tests by executingjson_unit
with the
"*"
argumentSo the tests can be now executed by building the
test
target:or by running
ctest
in the build directory.The tests can be selectively executed as well with
ctest
:or