-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moved from Catch to doctest for unit tests #1439
Merged
Merged
Changes from 7 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2f44ac1
moved from Catch to doctest for unit tests
onqtam 3340162
fixing osx builds - had forgotten to define this for the object file …
onqtam a2c074f
this should really fix the XCode 6/7 builds
onqtam 365944b
Merge branch 'develop' into doctest
onqtam 155d196
Update CMakeLists.txt
onqtam 2b34609
Merge branch 'develop' of https://github.com/nlohmann/json into doctest
onqtam ff51a32
updated doctest to version 2.3.1 released today
onqtam 0caf986
reverted the removal of this if/else branching - this is the easiest …
onqtam 82af0ec
Merge branch 'develop' into doctest
onqtam 5d511a6
fixed a bunch of warnings from the Makefile from the root of the repo
onqtam a0000c3
finished the last of the warnings
onqtam b4def6d
tabs instead of spaces...
onqtam 64873fb
Merge branch 'develop' into doctest
onqtam da5b783
fixing the remaining of the pedantic gcc/clang target warnings
onqtam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you do not need the
if
here? This may be an issue for CMake versions prior 3.8.0.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct - I assumed initially that the
3.8
check was forcxx_range_for
but it was indeed ifcxx_std_11
is supported. Adding it back again.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it was without that check up until commit 4fd9b52 and it used to work - guess people didn't try the tests with a CMake version older than 3.8.
For doctest 2.x C++11 is actually mandatory. For new compilers such as gcc 7/8 C++11 is on by default, but for older ones like 4.x/5 (and maybe 6) C++11 has to be explicitly stated. So I'll add
-std=c++0x
to theCXX_FLAGS
property for the target if cmake < 3.8 (or theCXX_STANDARD
property)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get it -
cxx_range_for
is not for that particular feature but for "c++0x" support in general - and was one of the first C++11 features to be added to compilers socxx_range_for
was added as a compile feature long beforecxx_std_11
...... So I'll just revert the code to have that same exact if/else so I don't have to deal withCXX_STANDARD