summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlqt/tst_qmlqt.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-11-05 00:53:00 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-11-05 00:53:00 (GMT)
commitaa6f6174374e0abfe94f37ccefce2d0e2b5fe13e (patch)
tree2848c48829255e8a2e85cc50bd84cc6a2a27939c /tests/auto/declarative/qmlqt/tst_qmlqt.cpp
parentf3cce7a770f25c42d5c85b012df338fc712f5b2e (diff)
parent9e5c80bd52467afa481775fe9695bac7edcf7324 (diff)
downloadQt-aa6f6174374e0abfe94f37ccefce2d0e2b5fe13e.zip
Qt-aa6f6174374e0abfe94f37ccefce2d0e2b5fe13e.tar.gz
Qt-aa6f6174374e0abfe94f37ccefce2d0e2b5fe13e.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/declarative/qmlqt/tst_qmlqt.cpp')
-rw-r--r--tests/auto/declarative/qmlqt/tst_qmlqt.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlqt/tst_qmlqt.cpp b/tests/auto/declarative/qmlqt/tst_qmlqt.cpp
index 10402ae..cc9b94d 100644
--- a/tests/auto/declarative/qmlqt/tst_qmlqt.cpp
+++ b/tests/auto/declarative/qmlqt/tst_qmlqt.cpp
@@ -64,6 +64,7 @@ private slots:
void lighter();
void darker();
void tint();
+ void closestAngle();
void playSound();
void openUrlExternally();
@@ -249,6 +250,23 @@ void tst_qmlqt::tint()
delete object;
}
+void tst_qmlqt::closestAngle()
+{
+ QmlComponent component(&engine, TEST_FILE("closestangle.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<qreal>(object->property("testSame")), 1.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("testLess")), 1.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("testMore")), 1.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("testFail")), 0.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("test5")), 1.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("test6")), 1.11);
+ QCOMPARE(qvariant_cast<qreal>(object->property("test7")), 1.11);
+
+ delete object;
+}
+
void tst_qmlqt::playSound()
{
QEXPECT_FAIL("", "How do we test this?", Abort);