diff options
Diffstat (limited to 'tests/auto/corelib/json/tst_qtjson.cpp')
-rw-r--r-- | tests/auto/corelib/json/tst_qtjson.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp index c79e7273c0..8ff6c8be6b 100644 --- a/tests/auto/corelib/json/tst_qtjson.cpp +++ b/tests/auto/corelib/json/tst_qtjson.cpp @@ -1546,7 +1546,7 @@ void tst_QtJson::fromJsonErrors() QJsonDocument doc = QJsonDocument::fromJson(json, &error); QVERIFY(doc.isEmpty()); QCOMPARE(error.error, QJsonParseError::IllegalUTF8String); - QCOMPARE(error.offset, 14); + QCOMPARE(error.offset, 12); } { QJsonParseError error; @@ -1570,7 +1570,7 @@ void tst_QtJson::fromJsonErrors() QJsonDocument doc = QJsonDocument::fromJson(json, &error); QVERIFY(doc.isEmpty()); QCOMPARE(error.error, QJsonParseError::IllegalUTF8String); - QCOMPARE(error.offset, 15); + QCOMPARE(error.offset, 13); } { QJsonParseError error; @@ -1985,11 +1985,11 @@ void tst_QtJson::testDebugStream() // QJsonObject QJsonObject object; - QTest::ignoreMessage(QtDebugMsg, "QJsonObject() "); + QTest::ignoreMessage(QtDebugMsg, "QJsonObject()"); qDebug() << object; object.insert(QLatin1String("foo"), QLatin1String("bar")); - QTest::ignoreMessage(QtDebugMsg, "QJsonObject({\"foo\": \"bar\"}) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonObject({\"foo\": \"bar\"})"); qDebug() << object; } @@ -1997,12 +1997,12 @@ void tst_QtJson::testDebugStream() // QJsonArray QJsonArray array; - QTest::ignoreMessage(QtDebugMsg, "QJsonArray() "); + QTest::ignoreMessage(QtDebugMsg, "QJsonArray()"); qDebug() << array; array.append(1); array.append(QLatin1String("foo")); - QTest::ignoreMessage(QtDebugMsg, "QJsonArray([1,\"foo\"]) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonArray([1,\"foo\"])"); qDebug() << array; } @@ -2010,19 +2010,19 @@ void tst_QtJson::testDebugStream() // QJsonDocument QJsonDocument doc; - QTest::ignoreMessage(QtDebugMsg, "QJsonDocument() "); + QTest::ignoreMessage(QtDebugMsg, "QJsonDocument()"); qDebug() << doc; QJsonObject object; object.insert(QLatin1String("foo"), QLatin1String("bar")); doc.setObject(object); - QTest::ignoreMessage(QtDebugMsg, "QJsonDocument({\"foo\": \"bar\"}) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonDocument({\"foo\": \"bar\"})"); qDebug() << doc; QJsonArray array; array.append(1); array.append(QLatin1String("foo")); - QTest::ignoreMessage(QtDebugMsg, "QJsonDocument([1,\"foo\"]) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonDocument([1,\"foo\"])"); doc.setArray(array); qDebug() << doc; } @@ -2032,36 +2032,36 @@ void tst_QtJson::testDebugStream() QJsonValue value; - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(null) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(null)"); qDebug() << value; value = QJsonValue(true); // bool - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(bool, true) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(bool, true)"); qDebug() << value; value = QJsonValue((double)4.2); // double - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 4.2) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 4.2)"); qDebug() << value; value = QJsonValue((int)42); // int - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 42) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 42)"); qDebug() << value; value = QJsonValue(QLatin1String("foo")); // string - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(string, \"foo\") "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(string, \"foo\")"); qDebug() << value; QJsonArray array; array.append(1); array.append(QLatin1String("foo")); value = QJsonValue(array); // array - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(array, QJsonArray([1,\"foo\"]) ) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(array, QJsonArray([1,\"foo\"]) )"); qDebug() << value; QJsonObject object; object.insert(QLatin1String("foo"), QLatin1String("bar")); value = QJsonValue(object); // object - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(object, QJsonObject({\"foo\": \"bar\"}) ) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(object, QJsonObject({\"foo\": \"bar\"}) )"); qDebug() << value; } } |