aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index d06266a360..ea7259c597 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -320,6 +320,7 @@ private slots:
void idsAsLValues();
void qtbug_34792();
void noCaptureWhenWritingProperty();
+ void singletonWithEnum();
private:
// static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
@@ -7510,6 +7511,18 @@ void tst_qqmlecmascript::noCaptureWhenWritingProperty()
QCOMPARE(obj->property("somePropertyEvaluated").toBool(), false);
}
+void tst_qqmlecmascript::singletonWithEnum()
+{
+ QQmlComponent component(&engine, testFileUrl("singletontype/singletonWithEnum.qml"));
+ QScopedPointer<QObject> obj(component.create());
+ if (obj.isNull())
+ qDebug() << component.errors().first().toString();
+ QVERIFY(!obj.isNull());
+ QVariant prop = obj->property("testValue");
+ QVERIFY(prop.type() == QVariant::Int);
+ QCOMPARE(prop.toInt(), int(SingletonWithEnum::TestValue));
+}
+
QTEST_MAIN(tst_qqmlecmascript)
#include "tst_qqmlecmascript.moc"