aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeqt
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-01-25 14:43:07 +1000
committerMichael Brasser <michael.brasser@nokia.com>2012-01-25 14:43:07 +1000
commitc3601a8db91bc777ea859d6a796dfab6a218675e (patch)
treed2a4f6c83bec3cddcce020966cccac72be3aa04a /tests/auto/declarative/qdeclarativeqt
parent35794301d188b731a7b596d92fc632fff58586c0 (diff)
parent149f6afe321ce59aebe4ce2f9dddd1881d0ac22b (diff)
Merge branch 'master' into animation-refactorwip/animation-refactor
Conflicts: tests/auto/declarative/declarative.pro Change-Id: Ie339be2989fac553d351f3077869f1847367b504
Diffstat (limited to 'tests/auto/declarative/qdeclarativeqt')
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/console.qml36
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp37
2 files changed, 1 insertions, 72 deletions
diff --git a/tests/auto/declarative/qdeclarativeqt/data/console.qml b/tests/auto/declarative/qdeclarativeqt/data/console.qml
deleted file mode 100644
index 634239c31f..0000000000
--- a/tests/auto/declarative/qdeclarativeqt/data/console.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-import QtQuick 2.0
-
-QtObject {
- id: root
- Component.onCompleted: {
- var a = [1, 2]
- var b = {a: "hello", d: 1 }
- var c
- var d = 12
- var e = function() { return 5;}
- var f = true
- var g = {toString: function() { throw new Error('toString'); }}
-
- console.profile("profile1")
- console.time("timer1")
- console.log("completed", "ok")
- console.log("completed ok")
- console.debug("completed ok")
- console.warn("completed ok")
- console.error("completed ok")
- console.log(a)
- console.log(b)
- console.log(c)
- console.log(d)
- console.log(e)
- console.log(f)
- console.log(root)
- console.log(g)
- console.log(1, "pong!", new Object)
- console.log(1, ["ping","pong"], new Object, 2)
- console.trace()
- console.timeEnd("timer1")
- console.profileEnd("profile1")
- console.log(exception) //This has to be at the end
- }
-}
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 6a03af503f..18283f0f3c 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -78,7 +78,6 @@ private slots:
void createComponent();
void createComponent_pragmaLibrary();
void createQmlObject();
- void console();
void dateTimeConversion();
void dateTimeFormatting();
void dateTimeFormatting_data();
@@ -453,40 +452,6 @@ void tst_qdeclarativeqt::createQmlObject()
delete object;
}
-void tst_qdeclarativeqt::console()
-{
- QUrl testUrl = testFileUrl("console.qml");
- QString testException = QString(QLatin1String("%1:%2: ReferenceError: Can't find variable: exception")).arg(testUrl.toString()).arg(34);
- QString testTrace = QString(QLatin1String("onCompleted (%1:%2:%3)\n")).arg(testUrl.toString()).arg(31).arg(17);
- QTest::ignoreMessage(QtDebugMsg, qPrintable(testTrace));
- QTest::ignoreMessage(QtDebugMsg, "Profiling started.");
- QTest::ignoreMessage(QtDebugMsg, "Profiling ended.");
- QTest::ignoreMessage(QtDebugMsg, "completed ok");
- QTest::ignoreMessage(QtDebugMsg, "completed ok");
- QTest::ignoreMessage(QtDebugMsg, "completed ok");
- QTest::ignoreMessage(QtWarningMsg, "completed ok");
- QTest::ignoreMessage(QtCriticalMsg, "completed ok");
-
- QTest::ignoreMessage(QtDebugMsg, "[1,2]");
- QTest::ignoreMessage(QtDebugMsg, "Object");
- QTest::ignoreMessage(QtDebugMsg, "undefined");
- QTest::ignoreMessage(QtDebugMsg, "12");
- QTest::ignoreMessage(QtDebugMsg, "function () { return 5;}");
- QTest::ignoreMessage(QtDebugMsg, "true");
- QTest::ignoreMessage(QtDebugMsg, "Object");
- QTest::ignoreMessage(QtDebugMsg, "Object");
- QTest::ignoreMessage(QtDebugMsg, "1 pong! Object");
- QTest::ignoreMessage(QtDebugMsg, "1 [ping,pong] Object 2");
-
-
- QTest::ignoreMessage(QtWarningMsg, qPrintable(testException));
-
-
- QDeclarativeComponent component(&engine, testUrl);
- QObject *object = component.create();
- QVERIFY(object != 0);
- delete object;
-}
void tst_qdeclarativeqt::dateTimeConversion()
{