diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2016-12-16 11:56:10 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2016-12-16 13:26:17 +0000 |
commit | adf92555202f3e02da502a2d29d126c72f0a19ee (patch) | |
tree | 57bf5b3fcd600247aa75bd6076934f396f8afb99 /tests/auto | |
parent | 712f495eb347084598758d7c40dd09265155a5b2 (diff) |
tst_container: 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: I6d446a7aacf22c66de97d320dc050c9ec10600a0
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/controls/data/tst_container.qml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/controls/data/tst_container.qml b/tests/auto/controls/data/tst_container.qml index 3c7032c7..52c624c0 100644 --- a/tests/auto/controls/data/tst_container.qml +++ b/tests/auto/controls/data/tst_container.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -62,7 +62,7 @@ TestCase { } function test_implicitSize() { - var control = container.createObject(testCase) + var control = createTemporaryObject(container, testCase) verify(control) compare(control.implicitWidth, 0) @@ -79,7 +79,5 @@ TestCase { control.padding = 100 compare(control.implicitWidth, 210) compare(control.implicitHeight, 220) - - control.destroy() } } |