aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeqt
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-01-16 13:35:07 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-16 15:07:33 +0100
commit04f06f35a99cf83dd573718816a016345aa439dc (patch)
tree898a5fa72ef531760ff75cc6ff80572cfd7af7c4 /tests/auto/declarative/qdeclarativeqt
parent32834c4933daabe8831b82bc97b1614e8b86940d (diff)
Console API: Autotest reshuffling
Move the console tests from qdeclarativeqt to qdeclarativeconsole, and the test for the QML_CONSOLE_EXTENDED property to debugger/qdebugmessageservice. Change-Id: I704bd0a4a28aa1b0eb51df67d32fd6865b114d41 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
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.cpp35
2 files changed, 0 insertions, 71 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..2734792a4a 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -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()
{