diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-03-09 13:09:07 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-12 23:28:31 +0100 |
commit | 31aa6012bfb575dd85a5083353fd10487dcbcdaa (patch) | |
tree | 2dd3cf309fa3908b5a74c6686fc55cede031e7b3 /tests/auto/qml/v4/data/mathMin.qml | |
parent | 5f1ebe4df09a4899aa32a1c19c368e5260b5b246 (diff) |
Add additional v4 tests.
Change-Id: Id33eb50e4a01f3450515f6e666e18cb018f1706e
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tests/auto/qml/v4/data/mathMin.qml')
-rw-r--r-- | tests/auto/qml/v4/data/mathMin.qml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/qml/v4/data/mathMin.qml b/tests/auto/qml/v4/data/mathMin.qml new file mode 100644 index 0000000000..7d2a561623 --- /dev/null +++ b/tests/auto/qml/v4/data/mathMin.qml @@ -0,0 +1,41 @@ +import QtQuick 2.0 + +Item { + property real test1: Math.min(i1.p1, i1.p2) + property real test2: Math.min(i1.p2, i1.p3) + + property real subtest3: Math.min() + property real subtest4: Math.min(i1.p4) + property bool test3: subtest3 === Infinity + property bool test4: isNaN(subtest4) + + property real subtest5: Math.min(i1.p5, i1.p1) + property bool test5: isNaN(subtest5) + property real test6: Math.min(i1.p6, i1.p3) + + property real subtest7: Math.min(i1.p7, i1.p2) + property bool test7: subtest7 === Number.NEGATIVE_INFINITY + property real test8: Math.min(i1.p8, i1.p2) + + property real subtest9: Math.min(i1.p10, i1.p9) + property bool test9: subtest9 === 0 && (1/subtest9) === -Infinity + + property real test10: Math.min(i1.p11, i1.p1) + property real test11: Math.min(i1.p11, i1.p2) + property real test12: Math.min(i1.p1, i1.p2, i1.p3) + + QtObject { + id: i1 + property real p1: -3.7 + property real p2: 4.4 + property int p3: 95 + property real p4: Number.NaN + property string p5: "hello world" + property string p6: "82.6" + property real p7: Number.NEGATIVE_INFINITY + property real p8: Number.POSITIVE_INFINITY + property real p9: 0 + property real p10: -0 + property var p11: null + } + } |