summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/MacOsFW/test
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-12-08 19:07:55 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-12-13 12:50:18 (GMT)
commitd7868687c814cded6319dd0cfd9fff5c737bf0f0 (patch)
tree3a1bbf5210e0ca59bc2b19b736fd747dcad4ed13 /Tests/QtAutogen/MacOsFW/test
parentb8ef28ae1f442144f55e23b8defffe01aa350c44 (diff)
downloadCMake-d7868687c814cded6319dd0cfd9fff5c737bf0f0.zip
CMake-d7868687c814cded6319dd0cfd9fff5c737bf0f0.tar.gz
CMake-d7868687c814cded6319dd0cfd9fff5c737bf0f0.tar.bz2
Autogen: Tests: Separate MacOsFW test
Diffstat (limited to 'Tests/QtAutogen/MacOsFW/test')
-rw-r--r--Tests/QtAutogen/MacOsFW/test/CMakeLists.txt19
-rw-r--r--Tests/QtAutogen/MacOsFW/test/testMacosFWLib.cpp42
-rw-r--r--Tests/QtAutogen/MacOsFW/test/testMacosFWLib.h7
3 files changed, 68 insertions, 0 deletions
diff --git a/Tests/QtAutogen/MacOsFW/test/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/test/CMakeLists.txt
new file mode 100644
index 0000000..521c184
--- /dev/null
+++ b/Tests/QtAutogen/MacOsFW/test/CMakeLists.txt
@@ -0,0 +1,19 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../src
+)
+include_directories(SYSTEM
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Widgets_INCLUDE_DIRS}
+)
+
+set(testname AutomocMacosFWLib)
+add_executable(${testname} testMacosFWLib.cpp)
+set_target_properties(${testname} PROPERTIES AUTOMOC TRUE)
+target_link_libraries(${testname}
+ Qt5::Core
+ Qt5::Widgets
+ Qt5::Test
+ macos_fw_lib
+)
diff --git a/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.cpp b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.cpp
new file mode 100644
index 0000000..3476d61
--- /dev/null
+++ b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.cpp
@@ -0,0 +1,42 @@
+#include <QObject>
+#include <QString>
+
+#include "macos_fw_lib.h"
+#include "testMacosFWLib.h"
+
+class TestMacosFWLib : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init() {}
+ void cleanup() {}
+
+ void testQtVersion();
+};
+
+void TestMacosFWLib::initTestCase()
+{
+}
+
+void TestMacosFWLib::cleanupTestCase()
+{
+}
+
+void TestMacosFWLib::testQtVersion()
+{
+ MacosFWLib* testLib = new MacosFWLib();
+ QVERIFY(testLib->qtVersionString().contains("5."));
+ testLib->deleteLater();
+}
+
+int main(int argc, char* argv[])
+{
+ QApplication app(argc, argv, false);
+ MacosFWLib testObject;
+ return QTest::qExec(&testObject, argc, argv);
+}
+
+#include "testMacosFWLib.moc"
diff --git a/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.h b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.h
new file mode 100644
index 0000000..1fe8dae
--- /dev/null
+++ b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.h
@@ -0,0 +1,7 @@
+#ifndef TESTMACOSFWLIB_H
+#define TESTMACOSFWLIB_H
+
+#include "qapplication.h"
+#include <QtTest/QtTest>
+
+#endif // TESTMACOSFWLIB_H