diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 5e4a576846..f4e8d31f5a 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -68,6 +68,7 @@ private slots: void enumConversion(); void enumFromBadSingleton(); void enumLookup(); + void enumMarkedAsFlag(); void enumProblems(); void enumScope(); void enums(); @@ -1291,6 +1292,17 @@ void tst_QmlCppCodegen::enumLookup() QCOMPARE(o->property("ready").toBool(), true); } +void tst_QmlCppCodegen::enumMarkedAsFlag() +{ + QQmlEngine engine; + + QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/enumMarkedAsFlag.qml"_s)); + QVERIFY2(c.isReady(), qPrintable(c.errorString())); + QScopedPointer<QObject> o(c.create()); + + QCOMPARE(o->property("flagValue").toInt(), 3); +} + void tst_QmlCppCodegen::enumProblems() { QQmlEngine engine; |
