From f78ca8adb35a6ce95563e7e6b80c22705eaf57ef Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 4 Dec 2009 15:14:25 +1000 Subject: test bug --- tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp index fb8bfb3..c3c7977 100644 --- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp +++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp @@ -106,6 +106,7 @@ private slots: void signalTriggeredBindings(); void listProperties(); void exceptionClearsOnReeval(); + void exceptionProducesWarning(); void transientErrors(); void shutdownErrors(); void externalScript(); @@ -909,6 +910,18 @@ void tst_qmlecmascript::exceptionClearsOnReeval() QCOMPARE(object->property("test").toBool(), true); } +void tst_qmlecmascript::exceptionProducesWarning() +{ + QmlComponent component(&engine, TEST_FILE("exceptionProducesWarning.qml")); + QString url = component.url().toString(); + + QString warning = "Expected error - QTBUG-6507"; + + QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); + MyQmlObject *object = qobject_cast(component.create()); + QVERIFY(object != 0); +} + static int transientErrorsMsgCount = 0; static void transientErrorsMsgHandler(QtMsgType, const char *) { -- cgit v0.12