mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 10:03:51 +01:00
Supplement the testcase for comparing the Array and Null (#1031)
* supplement the testcase for comparing the Array and Null * update testcase
This commit is contained in:
parent
d448610770
commit
00c2c9f6e4
@ -1391,6 +1391,8 @@ void ValueTest::checkIs(const Json::Value& value, const IsCheck& check) {
|
||||
|
||||
JSONTEST_FIXTURE(ValueTest, compareNull) {
|
||||
JSONTEST_ASSERT_PRED(checkIsEqual(Json::Value(), Json::Value()));
|
||||
JSONTEST_ASSERT_PRED(checkIsEqual(Json::Value::nullSingleton(), Json::Value()));
|
||||
JSONTEST_ASSERT_PRED(checkIsEqual(Json::Value::nullSingleton(), Json::Value::nullSingleton()));
|
||||
}
|
||||
|
||||
JSONTEST_FIXTURE(ValueTest, compareInt) {
|
||||
@ -1445,10 +1447,13 @@ JSONTEST_FIXTURE(ValueTest, compareArray) {
|
||||
l2bArray.append(10);
|
||||
JSONTEST_ASSERT_PRED(checkIsLess(emptyArray, l1aArray));
|
||||
JSONTEST_ASSERT_PRED(checkIsLess(emptyArray, l2aArray));
|
||||
JSONTEST_ASSERT_PRED(checkIsLess(l1aArray, l2aArray));
|
||||
JSONTEST_ASSERT_PRED(checkIsLess(l1aArray, l1bArray));
|
||||
JSONTEST_ASSERT_PRED(checkIsLess(l1bArray, l2aArray));
|
||||
JSONTEST_ASSERT_PRED(checkIsLess(l2aArray, l2bArray));
|
||||
JSONTEST_ASSERT_PRED(checkIsEqual(emptyArray, Json::Value(emptyArray)));
|
||||
JSONTEST_ASSERT_PRED(checkIsEqual(l1aArray, Json::Value(l1aArray)));
|
||||
JSONTEST_ASSERT_PRED(checkIsEqual(l1bArray, Json::Value(l1bArray)));
|
||||
JSONTEST_ASSERT_PRED(checkIsEqual(l2aArray, Json::Value(l2aArray)));
|
||||
JSONTEST_ASSERT_PRED(checkIsEqual(l2bArray, Json::Value(l2bArray)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user