Closed svuorela closed 10 years ago
An empty file or empty QByteArray gets parsed as valid json.
According to json specs, a piece of json needs to have an object or an array.
Adding a line like
QTest::newRow("no data") << QByteArray("");
to
void TestParser::parseInvalidObject_data()
makes the test fail. I would expect it to pass.
Fixed with 0b7a5858f937672859616666ba5add736931a2e1
An empty file or empty QByteArray gets parsed as valid json.
According to json specs, a piece of json needs to have an object or an array.
Adding a line like
to
makes the test fail. I would expect it to pass.