if (value->IsObject() && !value->IsFunction()
&& !value->IsArray() && !value->IsDate()
&& !value->IsRegExp()) {
- result = QLatin1String("Object");
+ result.append(QLatin1String("Object"));
} else {
v8::Local<v8::String> jsstr = value->ToString();
- result.append(V8ENGINE()->toString(jsstr));
+ QString tmp = V8ENGINE()->toString(jsstr);
if (value->IsArray())
- result = QString(QLatin1String("[%1]")).arg(result);
+ result.append(QString::fromLatin1("[%1]").arg(tmp));
+ else
+ result.append(tmp);
}
}
console.log(f)
console.log(root)
console.log(g)
+ console.log(1, "pong!", new Object)
+ console.log(1, ["ping","pong"], new Object, 2)
console.log(exception) //This has to be at the end
}
}
QTest::ignoreMessage(QtDebugMsg, qPrintable(testBoolean.arg(startLineNumber++)));
QTest::ignoreMessage(QtDebugMsg, qPrintable(testObject.arg(startLineNumber++)));
QTest::ignoreMessage(QtDebugMsg, qPrintable(testObject.arg(startLineNumber++)));
+ QString testMix = QString::fromLatin1("1 pong! Object (%1:%2)").arg(testFileUrl.toString());
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(testMix.arg(startLineNumber++)));
+ testMix = QString::fromLatin1("1 [ping,pong] Object 2 (%1:%2)").arg(testFileUrl.toString());
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(testMix.arg(startLineNumber++)));
QString testException = QString(QLatin1String("%1:%2: ReferenceError: Can't find variable: exception")).arg(testFileUrl.toString());
QTest::ignoreMessage(QtWarningMsg, qPrintable(testException.arg(startLineNumber++)));