From 5c448687e14fb49d1f6828a74c5ee9781c8c5607 Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Sat, 7 Mar 2015 13:33:16 -0600 Subject: [PATCH] fix ValueTest/zeroes* --- src/test_lib_json/main.cpp | 44 +++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index c7d938e..c6be13d 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -1,3 +1,4 @@ +#include // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. @@ -213,6 +214,31 @@ JSONTEST_FIXTURE(ValueTest, objects) { JSONTEST_ASSERT_EQUAL(false, did); } +JSONTEST_FIXTURE(ValueTest, nulls) { + static char const keyWithNulls[] = "key\0with\0nulls"; + std::string const strKeyWithNulls(keyWithNulls, sizeof keyWithNulls); + object1_[strKeyWithNulls] = "object1_[keyWithNulls]"; + Json::Value::Members f = object1_.getMemberNames(); + std::cout << "size:" << f.size() << "\n"; + for (int i=0; i