aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests/dice
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2019-07-11 22:57:21 +0200
committerRenaud G <renaud@rolisteam.org>2019-07-11 23:28:42 +0200
commit48c470b72cf32c49dc146f5859d67708759997b2 (patch)
tree4205c6ef6b95830edb507cc8ee68bb1bf7c00ab4 /tests/dice
parent69373b4ec96b7d510e16fccfa1b9f2a2ec790508 (diff)
downloadOneRoll-48c470b72cf32c49dc146f5859d67708759997b2.tar.gz
OneRoll-48c470b72cf32c49dc146f5859d67708759997b2.zip
rework diceparser to run unit tests
Diffstat (limited to 'tests/dice')
-rw-r--r--tests/dice/CMakeLists.txt17
-rw-r--r--tests/dice/Dice.pro25
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/dice/CMakeLists.txt b/tests/dice/CMakeLists.txt
new file mode 100644
index 0000000..a0f27fd
--- /dev/null
+++ b/tests/dice/CMakeLists.txt
@@ -0,0 +1,17 @@
+cmake_minimum_required(VERSION 3.5)
+project(tst_diceParser)
+
+enable_testing(true)
+
+# Tell CMake to run moc when necessary:
+set(CMAKE_AUTOMOC ON)
+
+# As moc files are generated in the binary dir, tell CMake
+# to always look for includes there:
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+find_package(Qt5Test REQUIRED)
+
+add_test(tst_diceParser tst_dice.cpp)
+
+target_link_libraries(foo Qt5::Test)
diff --git a/tests/dice/Dice.pro b/tests/dice/Dice.pro
new file mode 100644
index 0000000..9d24f91
--- /dev/null
+++ b/tests/dice/Dice.pro
@@ -0,0 +1,25 @@
+include(../tests.pri)
+
+SOURCES += \
+ tst_dice.cpp
+
+TEMPLATE = app
+TARGET= tst_diceParser
+MOC_DIR=trash
+OBJECTS_DIR=trash
+
+CONFIG+=testcase
+
+QT += testlib quick qml widgets
+
+INCLUDEPATH += $$ROLISTEAMSRC/diceparser/
+INCLUDEPATH += $$ROLISTEAMSRC/diceparser/node
+INCLUDEPATH += $$ROLISTEAMSRC/diceparser/result
+
+
+include($$ROLISTEAMSRC/diceparser/diceparser.pri)
+
+HEADERS -= ../../../rolisteam/client/diceparser/qmltypesregister.h
+SOURCES -= ../../../rolisteam/client/diceparser/qmltypesregister.cpp
+
+