summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp')
-rw-r--r--tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp
index 01cb54b..80373fe 100644
--- a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp
+++ b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp
@@ -38,6 +38,7 @@ private slots:
void objectPropertiesTriggerReeval();
void deferredProperties();
void extensionObjects();
+ void enums();
private:
QmlEngine engine;
@@ -366,6 +367,24 @@ void tst_qmlbindengine::extensionObjects()
QCOMPARE(object->baseProperty(), 92);
}
+void tst_qmlbindengine::enums()
+{
+ QmlComponent component(&engine, TEST_FILE("enums.1.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("a").toInt(), 0);
+ QCOMPARE(object->property("b").toInt(), 1);
+ QCOMPARE(object->property("c").toInt(), 2);
+ QCOMPARE(object->property("d").toInt(), 3);
+ QCOMPARE(object->property("e").toInt(), 0);
+ QCOMPARE(object->property("f").toInt(), 1);
+ QCOMPARE(object->property("g").toInt(), 2);
+ QCOMPARE(object->property("h").toInt(), 3);
+ QCOMPARE(object->property("i").toInt(), 19);
+ QCOMPARE(object->property("j").toInt(), 19);
+}
+
QTEST_MAIN(tst_qmlbindengine)
#include "tst_qmlbindengine.moc"