-
Notifications
You must be signed in to change notification settings - Fork 273
unit test Makefiles: add missing source files #2877
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
Conversation
Title amended and similar fixes applied to unit/. |
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.
Is there some way we can stop this from happening in future?
fed1c42
to
28dd969
Compare
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 don't know if possible - but an extra check to check the unit tests from cmake report the same number of passes as make would catch this.
@tautschnig Does the commit " fixup! Visual Studio does not strip trailing zeros in hexfloat mode" only change formatting? If so, it should be renamed. |
Sorry, I should have added the "work-in-progress" label earlier: the Windows tests are failing, and I'm adding commits to debug this. Will clean up the history once I've reached a state where all tests are passing. I am also looking into (portable?) ways of sanity checking the number of tests being run. |
8b4ba92
to
c7b3b6f
Compare
@owen-jones-diffblue @thk123 Could you please take another look as I have added code to sanity-check the number of tests being run. |
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.
All seems good - one idea but non-blocking, can always improve in future
c7b3b6f
to
da50bcf
Compare
8c49bc2
to
640cf4c
Compare
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.
Awesome! Bit confused about the exceptions though?
unit/Makefile
Outdated
CATCH_TEST = unit_tests$(EXEEXT) | ||
N_CATCH_TESTS = $(shell \ | ||
cat $$(find . -name "*.cpp" \ | ||
-and -not -name "miniBDD_new.cpp" \ |
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.
❓ How come we exclude this? This seems to be a legitimate catch test?
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.
Hmm, maybe we should. The relationship to miniBDD.cpp is a bit weird, though.
unit/Makefile
Outdated
N_CATCH_TESTS = $(shell \ | ||
cat $$(find . -name "*.cpp" \ | ||
-and -not -name "miniBDD_new.cpp" \ | ||
-and -not -name "catch_example.cpp") | \ |
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.
Isn't this run though? Included in the Makefile.
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.
Can we maybe just remove that example by now?
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'm in favour of removing it
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.
Yeah - docs probably make more sense that a live example!
unit/Makefile
Outdated
N_CATCH_TESTS = $(shell \ | ||
cat $$(find . -name "*.cpp" \ | ||
-and -not -name "miniBDD_new.cpp" \ | ||
-and -not -name "catch_example.cpp") | \ |
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'm in favour of removing it
640cf4c
to
708eeff
Compare
I'm sorry, this has grown way more than I had expected it would. Please let me know if I should refactor this into multiple PRs. Reviewing commit-by-commit should still be reasonable. |
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'm happy but I'd probably punt the bdd test change into a separate PR just as I don't understand it well enough to review it.
a94b01a
to
49328be
Compare
We now have ample examples of unit tests.
49328be
to
bd55a28
Compare
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.
Passed Diffblue compatibility checks (cbmc commit: bd55a28).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85124505
No description provided.