aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmltest
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@theqtcompany.com>2015-06-02 14:49:23 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-15 09:31:15 +0000
commitd05f1d8ead078a0b93e0de63f74e7b3c71105a9d (patch)
tree3805ff306d86c54719a2a7b71ac4e134bf5e98b9 /tests/auto/qmltest
parent58a5aa3a09c39355081e45c34d6cc02dd8ac5733 (diff)
QuickTest: Enable use of BLACKLIST file
So qml test functions can be blacklisted. Qml test functions have the following format: TestCaseName::functionName. Change-Id: Ifcaa8d77d8f0956472aa568dc6dbfcbdde4e5063 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'tests/auto/qmltest')
-rw-r--r--tests/auto/qmltest/BLACKLIST5
-rw-r--r--tests/auto/qmltest/selftests/tst_selftests.qml26
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/qmltest/BLACKLIST b/tests/auto/qmltest/BLACKLIST
new file mode 100644
index 0000000000..cd8b1181e0
--- /dev/null
+++ b/tests/auto/qmltest/BLACKLIST
@@ -0,0 +1,5 @@
+# Blacklist for testing
+[SelfTests::test_blacklisted_fail]
+*
+[SelfTests::test_blacklistWithData:test2]
+*
diff --git a/tests/auto/qmltest/selftests/tst_selftests.qml b/tests/auto/qmltest/selftests/tst_selftests.qml
index 0d09f9536a..a372107e26 100644
--- a/tests/auto/qmltest/selftests/tst_selftests.qml
+++ b/tests/auto/qmltest/selftests/tst_selftests.qml
@@ -278,4 +278,30 @@ TestCase {
}
verify(caught)
}
+
+ function test_blacklisted_fail()
+ {
+ verify(false)
+ }
+
+ function test_blacklistWithData_data() {
+ return [
+ {
+ tag: "test1",
+ success: true
+ },
+ {
+ tag: "test2",
+ success: false
+ },
+ {
+ tag: "test3",
+ success: true
+ }
+ ]
+ }
+
+ function test_blacklistWithData(row) {
+ verify(row.success)
+ }
}