Add the missing test file and give it a proper name.

Change-Id: Icb9bc2aab99d52b5ffbd6153ce94d64a494330d8
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
This commit is contained in:
Lars Knoll 2012-01-26 12:12:44 +01:00 committed by Qt by Nokia
parent d3fdc132fe
commit 34e8dd5d6f
2 changed files with 19 additions and 3 deletions

View File

@ -0,0 +1,15 @@
{
"firstName": "John",
"lastName" : "Smith",
"age" : 25,
"address" : {
"streetAddress": "21 2nd Street",
"city" : "New York",
"state" : "NY",
"postalCode" : "10021"
},
"phoneNumber": [
{ "type" : "home", "number": "212 555-1234" },
{ "type" : "fax", "number": "646 555-4567" }
]
}

View File

@ -1337,6 +1337,7 @@ void TestQtJson::validation()
QVERIFY(!testJson.isEmpty());
QJsonDocument doc = QJsonDocument::fromJson(testJson);
QVERIFY(!doc.isNull());
QByteArray binary = doc.toBinaryData();
@ -1351,13 +1352,13 @@ void TestQtJson::validation()
}
QFile file2(QLatin1String(SRCDIR "foo.json"));
// QVERIFY(file2.open(QFile::ReadOnly)); // ### the file is missing o_O
QFile file2(QLatin1String(SRCDIR "test3.json"));
file2.open(QFile::ReadOnly);
testJson = file2.readAll();
// QVERIFY(!testJson.isEmpty());
QVERIFY(!testJson.isEmpty());
doc = QJsonDocument::fromJson(testJson);
QVERIFY(!doc.isNull());
binary = doc.toBinaryData();