From b25f6926ded030959d1931ec0a834b1a9e5f27e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Fri, 17 Oct 2014 08:50:12 +0300 Subject: Added invalid value tests for QML autotests Plus fixed a QML documentation bug, and added a missing inheritance to docs. Task-number: QTRD-3383 Change-Id: I1f7c56c49b829fee2cfd0731bbcc7e248a06a0c0 Reviewed-by: Miikka Heikkinen --- tests/auto/qmltest/custom3d/tst_customvolume.qml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/auto/qmltest/custom3d') diff --git a/tests/auto/qmltest/custom3d/tst_customvolume.qml b/tests/auto/qmltest/custom3d/tst_customvolume.qml index 89717d5d..08c15013 100644 --- a/tests/auto/qmltest/custom3d/tst_customvolume.qml +++ b/tests/auto/qmltest/custom3d/tst_customvolume.qml @@ -57,6 +57,10 @@ Item { id: change } + Custom3DVolume { + id: invalid + } + TestCase { name: "Custom3DVolume Initial" @@ -160,4 +164,19 @@ Item { compare(change.visible, false) } } + + TestCase { + name: "Custom3DVolume Invalid" + + function test_invalid() { + invalid.alphaMultiplier = -1.0 + compare(invalid.alphaMultiplier, 1.0) + invalid.sliceFrameGaps = Qt.vector3d(-0.1, -0.1, -0.1) + compare(invalid.sliceFrameGaps, Qt.vector3d(0.01, 0.01, 0.01)) + invalid.sliceFrameThicknesses = Qt.vector3d(-0.1, -0.1, -0.1) + compare(invalid.sliceFrameThicknesses, Qt.vector3d(0.01, 0.01, 0.01)) + invalid.sliceFrameWidths = Qt.vector3d(-0.1, -0.1, -0.1) + compare(invalid.sliceFrameWidths, Qt.vector3d(0.01, 0.01, 0.01)) + } + } } -- cgit v1.2.3