diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-08-20 15:25:22 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-11-02 12:28:15 +0000 |
commit | 681ff5542ca4d2405d19ddd9809b0a8cf2d697e8 (patch) | |
tree | 9b8359f55fb749a3e9575501a612cf12b9ca78e8 /tests/testlibs | |
parent | 7b2433fd6fefe7642268da3aa270bbc86e81a7b8 (diff) |
In order to work with the new CI system, we need to link with testlib.
Change-Id: I285d651c2e1189a79153a6d942c10522305f2f3c
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'tests/testlibs')
-rw-r--r-- | tests/testlibs/testmain.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/testlibs/testmain.cpp b/tests/testlibs/testmain.cpp index 3f77fc0..a7aa848 100644 --- a/tests/testlibs/testmain.cpp +++ b/tests/testlibs/testmain.cpp @@ -15,8 +15,32 @@ */ #include <gtest/gtest.h> +#include <QtTest/QtTest> + +class TEST_NAME : public QObject +{ + Q_OBJECT + +public: + TEST_NAME(); +private slots: + void runAllTests(); +}; + +TEST_NAME::TEST_NAME() +{ +} + +void TEST_NAME::runAllTests() +{ + int retVal = RUN_ALL_TESTS(); + QCOMPARE(retVal, 0); +} int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + TEST_NAME gTest; + return QTest::qExec(&gTest, argc, argv); } + +#include "testmain.moc" |