summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexei Rousskikh <ext-alexei.rousskikh@nokia.com>2012-02-17 16:14:11 -0500
committerAndrew Christian <andrew.christian@nokia.com>2012-02-21 18:05:20 +0100
commitd3314a364be2e46190ecf93dfeb44484d55d6fc1 (patch)
tree17bafb41b1f18b22222e92cb1199183a78f68b72 /tests
parent7073c61891b6b0bb92aea512692a7686568656f4 (diff)
better error handling while loading of schemas
Change-Id: I1233adc436c4def39b3a4ff76c35bd2cbb6caf7e Reviewed-by: Andrew Christian <andrew.christian@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/jsonschema/tst_jsonschema.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/jsonschema/tst_jsonschema.cpp b/tests/auto/jsonschema/tst_jsonschema.cpp
index fc493f8..10eefa1 100644
--- a/tests/auto/jsonschema/tst_jsonschema.cpp
+++ b/tests/auto/jsonschema/tst_jsonschema.cpp
@@ -210,8 +210,9 @@ void tst_JsonSchema::testItemsValidation()
array.removeAt(0); // [2]
QVERIFY(!validate(array, "{ \"type\" : \"array\", \"items\" : { \"type\" : \"string\" } }")); // INVALID
- array[0] = QLatin1String("foo");
- array[1] = QLatin1String("two"); //["foo", "two"]
+ array = QJsonArray();
+ array.append(QLatin1String("foo"));
+ array.append(QLatin1String("two")); //["foo", "two"]
// should fail!!!!!
//fix QVERIFY(!validate(array, "{ \"type\" : \"array\", \"items\" : [{ \"type\" : \"string\" }, { \"type\" : \"number\" }] }"));
}