mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
add QJsonDocument operators test case
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3667e796ce
commit
7d95e3b7c1
1 changed files with 12 additions and 1 deletions
|
@ -41,6 +41,7 @@ private slots:
|
|||
void read();
|
||||
void write();
|
||||
void error();
|
||||
void eq_not_eq();
|
||||
};
|
||||
|
||||
void tst_QJsonDocument::init()
|
||||
|
@ -139,7 +140,17 @@ void tst_QJsonDocument::error()
|
|||
QCOMPARE(jsondoc.errorString(), QLatin1String("Data map is empty"));
|
||||
QVERIFY(jsondoc.isNull());
|
||||
|
||||
// TODO: indermediate error test
|
||||
// TODO: indermediate error test, e.g. maximum depth reached
|
||||
}
|
||||
|
||||
void tst_QJsonDocument::eq_not_eq()
|
||||
{
|
||||
QJsonDocument nulljsondoc;
|
||||
QJsonDocument nulljsondoc2;
|
||||
QCOMPARE(nulljsondoc, nulljsondoc2);
|
||||
|
||||
QJsonDocument jsondoc = QJsonDocument::fromVariant(testjsondata);
|
||||
QVERIFY(nulljsondoc != jsondoc);
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QJsonDocument)
|
||||
|
|
Loading…
Add table
Reference in a new issue