test: Add build system support and a main function for unit tests
authorManuel Nickschas <sputnick@quassel-irc.org>
Mon, 24 Sep 2018 18:36:21 +0000 (20:36 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 18 Nov 2018 10:06:43 +0000 (11:06 +0100)
Add a new CMake option BUILD_TESTING (defaults to OFF) that, if
enabled, will build unit tests and related requirements.

Add a new library Quassel::Test::Main that provides a main function
for test cases.

Add a new CMake macro quassel_add_test for making the adding of test
cases convenient by hiding most of the boilerplate.

Test cases should #include "testglobal.h", so they automatically have
access to GTest/GMock macros as well as the imported main function.


No differences found