aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-12-20 12:55:15 +0100
committerMitch Curtis <mitch.curtis@qt.io>2016-12-20 11:58:46 +0000
commit80a40af6febb6d00b0c30b35e14345c8584a2659 (patch)
treeb91c0490a86fc6b006fa1091f2320d570db53d59 /tests
parent377d11bd65268667a7f593b7844b331afbd06989 (diff)
tst_toolseparator: use TestCase's new createTemporaryObject functions
This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: I65bba3a7ed3ee43756450fef17da6be6219afd70 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_toolseparator.qml8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/auto/controls/data/tst_toolseparator.qml b/tests/auto/controls/data/tst_toolseparator.qml
index 47eb933f..a4b66803 100644
--- a/tests/auto/controls/data/tst_toolseparator.qml
+++ b/tests/auto/controls/data/tst_toolseparator.qml
@@ -55,12 +55,10 @@ TestCase {
}
function test_size() {
- var control = toolSeparator.createObject(testCase);
+ var control = createTemporaryObject(toolSeparator, testCase);
verify(control);
verify(control.width > 1);
verify(control.height > 1);
-
- control.destroy();
}
Component {
@@ -69,7 +67,7 @@ TestCase {
}
function test_orientation() {
- var control = toolSeparator.createObject(testCase);
+ var control = createTemporaryObject(toolSeparator, testCase);
verify(control);
compare(control.horizontal, false);
compare(control.vertical, true);
@@ -93,7 +91,5 @@ TestCase {
compare(control.horizontal, false);
compare(control.vertical, true);
compare(orientationSpy.count, 2);
-
- control.destroy();
}
}