Debugger: Print debuggee output for failing v8 autotests
authorKai Koehne <kai.koehne@nokia.com>
Mon, 14 Nov 2011 12:46:13 +0000 (13:46 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 16 Nov 2011 15:56:20 +0000 (16:56 +0100)
Change-Id: I80f963042f0d2e30f5a715fca3b60a66751efbb4
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp

index a81b681..ffeb822 100644 (file)
@@ -131,6 +131,17 @@ const char *JSFILE = "test.js";
     jsonVal.setProperty(SEQ,QJSValue(seq++)); \
     jsonVal.setProperty(TYPE,REQUEST);
 
+
+#undef QVERIFY
+#define QVERIFY(statement) \
+do {\
+    if (!QTest::qVerify((statement), #statement, "", __FILE__, __LINE__)) {\
+        qDebug().nospace() << "\nDEBUGGEE OUTPUT:\n" << process->output();\
+        return;\
+    }\
+} while (0)
+
+
 class QJSDebugClient;
 
 class tst_QDeclarativeDebugJS : public QObject