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
Add support for GTest based UnitTests #119
Conversation
| include(FindGTest OPTIONAL) | ||
| if(GTEST_FOUND) | ||
| include_directories(${GTEST_INCLUDE_DIRS}) | ||
| enable_testing() |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
LGTM |
|
Looks good. I'm alright with this. |
|
I'm not terribly happy that you put up to 3 statements on one line (almost missed the EQ in the last test and wanted to complain about it)...but then again, yay, tests! \o/ |
|
.Yeah, I'm not a fan of the 3 statements per line either... I found it more readable than the alternative 3 lines though. I could in theory templatize that, but I'd prefer to keep tests simple. I could fix it if you suggest a better way. @neobrain expressed concerns about having tests built by default. At this point I think it is not a huge problem and we can revisit this decision later if tests start taking a long time to build. Ideally we would build tests only when running "make test", but I can't find a good way to do that (might have to ask on a CMake ML). Opinion on that? |
…with a very simple test file.
|
Now tests are not built by default and are only built when trying to run the testsuite with "make unittests". Unfortunately, because cmake is a dumb tool, "make test" is and will be broken - there is no way around that at the moment (according to CMake devs). |
|
LGTM |
Add support for GTest based UnitTests

No support for MSVC at the moment. Fairly basic but should be enough to start adding tests for a few things.