Skip to content

Commit 2cf939e

Browse files
dota17baylesj
authored andcommitted
change Value::null to Value::nullSingleton() (open-source-parsers#1000)
1 parent 7b28698 commit 2cf939e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test_lib_json/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ JSONTEST_FIXTURE(ValueTest, arrayIssue252) {
304304
int count = 5;
305305
Json::Value root;
306306
Json::Value item;
307-
root["array"] = Json::Value::nullRef;
307+
root["array"] = Json::Value::nullSingleton();
308308
for (int i = 0; i < count; i++) {
309309
item["a"] = i;
310310
item["b"] = i;
@@ -337,7 +337,7 @@ JSONTEST_FIXTURE(ValueTest, null) {
337337
JSONTEST_ASSERT_EQUAL(0.0, null_.asFloat());
338338
JSONTEST_ASSERT_STRING_EQUAL("", null_.asString());
339339

340-
JSONTEST_ASSERT_EQUAL(Json::Value::null, null_);
340+
JSONTEST_ASSERT_EQUAL(Json::Value::nullSingleton(), null_);
341341

342342
// Test using a Value in a boolean context (false iff null)
343343
JSONTEST_ASSERT_EQUAL(null_, false);
@@ -1749,7 +1749,7 @@ JSONTEST_FIXTURE(ValueTest, zeroesInKeys) {
17491749
JSONTEST_ASSERT(!root.isMember("h"));
17501750
JSONTEST_ASSERT(root.isMember(binary));
17511751
JSONTEST_ASSERT_STRING_EQUAL(
1752-
"there", root.get(binary, Json::Value::nullRef).asString());
1752+
"there", root.get(binary, Json::Value::nullSingleton()).asString());
17531753
Json::Value removed;
17541754
bool did;
17551755
did = root.removeMember(binary.data(), binary.data() + binary.length(),
@@ -1762,7 +1762,7 @@ JSONTEST_FIXTURE(ValueTest, zeroesInKeys) {
17621762
JSONTEST_ASSERT_STRING_EQUAL("there", removed.asString()); // still
17631763
JSONTEST_ASSERT(!root.isMember(binary));
17641764
JSONTEST_ASSERT_STRING_EQUAL(
1765-
"", root.get(binary, Json::Value::nullRef).asString());
1765+
"", root.get(binary, Json::Value::nullSingleton()).asString());
17661766
}
17671767
}
17681768

0 commit comments

Comments
 (0)