early attempt doing qml tests; so far only build main app
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
add_subdirectory(qmltests)
|
||||
@@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
include(QmlTest)
|
||||
|
||||
add_qml_test(. QmlTestTest)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
#include <QtQuickTest/quicktest.h>
|
||||
|
||||
QUICK_TEST_MAIN(math)
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import QtQuick 2.3
|
||||
import QtTest 1.0
|
||||
|
||||
TestCase {
|
||||
name: "MathTests Test"
|
||||
|
||||
function test_math() {
|
||||
compare(2 + 2, 4, "2 + 2 = 4")
|
||||
}
|
||||
|
||||
function test_fail() {
|
||||
compare(2 + 2, 5, "2 + 2 = 5")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import QtQuick 2.3
|
||||
import QtTest 1.0
|
||||
|
||||
TestCase {
|
||||
name: "QmlTest Test"
|
||||
|
||||
function test_add() {
|
||||
compare(2 + 2, 4, "2 + 2 = 4")
|
||||
}
|
||||
|
||||
function test_fail() {
|
||||
compare(2 + 2, 5, "2 + 2 = 5")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user