rj_schema 0.2.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rj_schema/rapidjson/CMakeLists.txt +9 -4
- data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +10 -0
- data/ext/rj_schema/rapidjson/appveyor.yml +22 -9
- data/ext/rj_schema/rapidjson/bin/data/abcde.txt +1 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/address.json +139 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/allOf_address.json +7 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/anyOf_address.json +7 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/oneOf_address.json +7 -0
- data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +2 -2
- data/ext/rj_schema/rapidjson/doc/dom.md +1 -0
- data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +1 -0
- data/ext/rj_schema/rapidjson/doc/faq.md +3 -3
- data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +8 -8
- data/ext/rj_schema/rapidjson/doc/internals.md +1 -1
- data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +2 -2
- data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +1 -1
- data/ext/rj_schema/rapidjson/doc/sax.md +1 -1
- data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +2 -2
- data/ext/rj_schema/rapidjson/doc/stream.md +1 -1
- data/ext/rj_schema/rapidjson/doc/tutorial.md +1 -1
- data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +7 -6
- data/ext/rj_schema/rapidjson/example/CMakeLists.txt +1 -0
- data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +118 -0
- data/ext/rj_schema/rapidjson/example/sortkeys/sortkeys.cpp +62 -0
- data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +6 -6
- data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/document.h +124 -35
- data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +49 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +56 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/clzll.h +71 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +3 -17
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +20 -13
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +4 -3
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +50 -35
- data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +63 -5
- data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +63 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +67 -53
- data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +318 -164
- data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +10 -10
- data/ext/rj_schema/rapidjson/readme.md +51 -1
- data/ext/rj_schema/rapidjson/readme.zh-cn.md +2 -2
- data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/perftest/perftest.h +1 -1
- data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +2 -2
- data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +75 -1
- data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +1 -0
- data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/clzlltest.cpp +34 -0
- data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +19 -19
- data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +45 -2
- data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +10 -10
- data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +8 -8
- data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +157 -16
- data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +113 -75
- data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +2 -1
- data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +593 -78
- data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +5 -5
- data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/unittest.h +4 -1
- data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +12 -12
- data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/BUILD.bazel +175 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +18 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CONTRIBUTING.md +160 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/LICENSE +28 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/Makefile.am +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +16 -35
- data/ext/rj_schema/rapidjson/thirdparty/gtest/WORKSPACE +8 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/appveyor.yml +104 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-autotools.sh +44 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-bazel.sh +36 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-linux.sh +41 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-osx.sh +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/get-nprocessors.sh +48 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-linux.sh +49 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-osx.sh +39 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/log-config.sh +51 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/travis.sh +44 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/configure.ac +16 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +72 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +53 -42
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock.pc.in +9 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock_main.pc.in +9 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +4 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +6 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +117 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +7 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +20 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +83 -26
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +262 -68
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +45 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +650 -366
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +76 -20
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +308 -229
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +18 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +87 -26
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +33 -16
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +1209 -353
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +33 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +159 -88
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +3 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +16 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +71 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +7 -11
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +69 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +69 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +83 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +63 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +63 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +76 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +4 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +3 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +36 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +210 -135
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +108 -48
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +23 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/BUILD.bazel +123 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +166 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +64 -62
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +43 -18
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +11 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +91 -36
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +33 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +1286 -167
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +85 -83
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +102 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +136 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +24 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +8 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +20 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +8 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +3 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +44 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +5 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +40 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +60 -31
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +232 -171
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest.pc.in +9 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest_main.pc.in +10 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +54 -16
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Pkgconfig.md +146 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +6 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{AdvancedGuide.md → advanced.md} +260 -26
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{FAQ.md → faq.md} +62 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Primer.md → primer.md} +43 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Samples.md → samples.md} +0 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +53 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +30 -36
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +8 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +140 -51
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +2 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +4 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +126 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +6 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +8 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +6 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +4 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +13 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +98 -59
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +34 -41
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +3 -10
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +9 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +8 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +232 -99
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +3 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +17 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +17 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.sln +55 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj +149 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.sln +55 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj +149 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj +154 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj +162 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj +199 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters +26 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj +191 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters +26 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj +188 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj +180 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +6 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +7 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +5 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +3 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +10 -22
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +10 -10
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +226 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +5 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +21 -29
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +85 -67
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +93 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +1 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +1 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +622 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/BUILD.bazel +396 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +12 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +2 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +6 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +1 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +84 -29
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +1 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +11 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +165 -63
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +13 -13
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_assert_by_exception_test.cc +119 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +1 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +6 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +20 -18
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_outfiles_test.py +162 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_output_unittest.py +611 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_test_utils.py +60 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +4 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +11 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +17 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +104 -66
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +2 -19
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +12 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test.py +65 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test_.cc +44 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +4 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +240 -149
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +15 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +100 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +25 -23
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +4 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +47 -0
- data/ext/rj_schema/rapidjson/travis-doxygen.sh +13 -6
- data/ext/rj_schema/rj_schema.cpp +161 -17
- data/lib/rj_schema.rb +1 -1
- metadata +63 -58
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +0 -525
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +0 -3250
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +0 -11
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +0 -624
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +0 -534
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +0 -3342
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +0 -556
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +0 -3432
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +0 -2096
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +0 -886
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +0 -497
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +0 -2178
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +0 -1038
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +0 -501
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +0 -2181
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +0 -1082
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +0 -501
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +0 -129
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +0 -129
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +0 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +0 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -21,7 +21,7 @@ using namespace rapidjson;
|
|
21
21
|
|
22
22
|
class FileStreamTest : public ::testing::Test {
|
23
23
|
public:
|
24
|
-
FileStreamTest() : filename_(), json_(), length_() {}
|
24
|
+
FileStreamTest() : filename_(), json_(), length_(), abcde_() {}
|
25
25
|
virtual ~FileStreamTest();
|
26
26
|
|
27
27
|
virtual void SetUp() {
|
@@ -49,6 +49,24 @@ public:
|
|
49
49
|
size_t readLength = fread(json_, 1, length_, fp);
|
50
50
|
json_[readLength] = '\0';
|
51
51
|
fclose(fp);
|
52
|
+
|
53
|
+
const char *abcde_paths[] = {
|
54
|
+
"data/abcde.txt",
|
55
|
+
"bin/data/abcde.txt",
|
56
|
+
"../bin/data/abcde.txt",
|
57
|
+
"../../bin/data/abcde.txt",
|
58
|
+
"../../../bin/data/abcde.txt"
|
59
|
+
};
|
60
|
+
fp = 0;
|
61
|
+
for (size_t i = 0; i < sizeof(abcde_paths) / sizeof(abcde_paths[0]); i++) {
|
62
|
+
fp = fopen(abcde_paths[i], "rb");
|
63
|
+
if (fp) {
|
64
|
+
abcde_ = abcde_paths[i];
|
65
|
+
break;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
ASSERT_TRUE(fp != 0);
|
69
|
+
fclose(fp);
|
52
70
|
}
|
53
71
|
|
54
72
|
virtual void TearDown() {
|
@@ -64,6 +82,7 @@ protected:
|
|
64
82
|
const char* filename_;
|
65
83
|
char *json_;
|
66
84
|
size_t length_;
|
85
|
+
const char* abcde_;
|
67
86
|
};
|
68
87
|
|
69
88
|
FileStreamTest::~FileStreamTest() {}
|
@@ -86,6 +105,30 @@ TEST_F(FileStreamTest, FileReadStream) {
|
|
86
105
|
fclose(fp);
|
87
106
|
}
|
88
107
|
|
108
|
+
TEST_F(FileStreamTest, FileReadStream_Peek4) {
|
109
|
+
FILE *fp = fopen(abcde_, "rb");
|
110
|
+
ASSERT_TRUE(fp != 0);
|
111
|
+
char buffer[4];
|
112
|
+
FileReadStream s(fp, buffer, sizeof(buffer));
|
113
|
+
|
114
|
+
const char* c = s.Peek4();
|
115
|
+
for (int i = 0; i < 4; i++)
|
116
|
+
EXPECT_EQ('a' + i, c[i]);
|
117
|
+
EXPECT_EQ(0u, s.Tell());
|
118
|
+
|
119
|
+
for (int i = 0; i < 5; i++) {
|
120
|
+
EXPECT_EQ(static_cast<size_t>(i), s.Tell());
|
121
|
+
EXPECT_EQ('a' + i, s.Peek());
|
122
|
+
EXPECT_EQ('a' + i, s.Peek());
|
123
|
+
EXPECT_EQ('a' + i, s.Take());
|
124
|
+
}
|
125
|
+
EXPECT_EQ(5u, s.Tell());
|
126
|
+
EXPECT_EQ(0, s.Peek());
|
127
|
+
EXPECT_EQ(0, s.Take());
|
128
|
+
|
129
|
+
fclose(fp);
|
130
|
+
}
|
131
|
+
|
89
132
|
TEST_F(FileStreamTest, FileWriteStream) {
|
90
133
|
char filename[L_tmpnam];
|
91
134
|
FILE* fp = TempFile(filename);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -35,21 +35,21 @@ static void TestStringStream() {
|
|
35
35
|
{
|
36
36
|
StringStreamType iss;
|
37
37
|
BasicIStreamWrapper<StringStreamType> is(iss);
|
38
|
-
EXPECT_EQ(
|
38
|
+
EXPECT_EQ(0u, is.Tell());
|
39
39
|
if (sizeof(Ch) == 1) {
|
40
40
|
EXPECT_EQ(0, is.Peek4());
|
41
|
-
EXPECT_EQ(
|
41
|
+
EXPECT_EQ(0u, is.Tell());
|
42
42
|
}
|
43
43
|
EXPECT_EQ(0, is.Peek());
|
44
44
|
EXPECT_EQ(0, is.Take());
|
45
|
-
EXPECT_EQ(
|
45
|
+
EXPECT_EQ(0u, is.Tell());
|
46
46
|
}
|
47
47
|
|
48
48
|
{
|
49
49
|
Ch s[] = { 'A', 'B', 'C', '\0' };
|
50
50
|
StringStreamType iss(s);
|
51
51
|
BasicIStreamWrapper<StringStreamType> is(iss);
|
52
|
-
EXPECT_EQ(
|
52
|
+
EXPECT_EQ(0u, is.Tell());
|
53
53
|
if (sizeof(Ch) == 1) {
|
54
54
|
EXPECT_EQ(0, is.Peek4()); // less than 4 bytes
|
55
55
|
}
|
@@ -59,7 +59,7 @@ static void TestStringStream() {
|
|
59
59
|
EXPECT_EQ('A' + i, is.Peek());
|
60
60
|
EXPECT_EQ('A' + i, is.Take());
|
61
61
|
}
|
62
|
-
EXPECT_EQ(
|
62
|
+
EXPECT_EQ(3u, is.Tell());
|
63
63
|
EXPECT_EQ(0, is.Peek());
|
64
64
|
EXPECT_EQ(0, is.Take());
|
65
65
|
}
|
@@ -72,7 +72,7 @@ static void TestStringStream() {
|
|
72
72
|
const Ch* c = is.Peek4();
|
73
73
|
for (int i = 0; i < 4; i++)
|
74
74
|
EXPECT_EQ('A' + i, c[i]);
|
75
|
-
EXPECT_EQ(
|
75
|
+
EXPECT_EQ(0u, is.Tell());
|
76
76
|
}
|
77
77
|
for (int i = 0; i < 5; i++) {
|
78
78
|
EXPECT_EQ(static_cast<size_t>(i), is.Tell());
|
@@ -80,7 +80,7 @@ static void TestStringStream() {
|
|
80
80
|
EXPECT_EQ('A' + i, is.Peek());
|
81
81
|
EXPECT_EQ('A' + i, is.Take());
|
82
82
|
}
|
83
|
-
EXPECT_EQ(
|
83
|
+
EXPECT_EQ(5u, is.Tell());
|
84
84
|
EXPECT_EQ(0, is.Peek());
|
85
85
|
EXPECT_EQ(0, is.Take());
|
86
86
|
}
|
@@ -129,7 +129,7 @@ TEST(IStreamWrapper, ifstream) {
|
|
129
129
|
Document d;
|
130
130
|
EXPECT_TRUE(!d.ParseStream(eis).HasParseError());
|
131
131
|
EXPECT_TRUE(d.IsObject());
|
132
|
-
EXPECT_EQ(
|
132
|
+
EXPECT_EQ(5u, d.MemberCount());
|
133
133
|
}
|
134
134
|
|
135
135
|
TEST(IStreamWrapper, fstream) {
|
@@ -140,7 +140,7 @@ TEST(IStreamWrapper, fstream) {
|
|
140
140
|
Document d;
|
141
141
|
EXPECT_TRUE(!d.ParseStream(eis).HasParseError());
|
142
142
|
EXPECT_TRUE(d.IsObject());
|
143
|
-
EXPECT_EQ(
|
143
|
+
EXPECT_EQ(5u, d.MemberCount());
|
144
144
|
}
|
145
145
|
|
146
146
|
// wifstream/wfstream only works on C++11 with codecvt_utf16
|
@@ -1,15 +1,15 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
|
-
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
2
|
+
//
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
7
7
|
//
|
8
8
|
// http://opensource.org/licenses/MIT
|
9
9
|
//
|
10
|
-
// Unless required by applicable law or agreed to in writing, software distributed
|
11
|
-
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
12
|
-
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
10
|
+
// Unless required by applicable law or agreed to in writing, software distributed
|
11
|
+
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
12
|
+
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
13
13
|
// specific language governing permissions and limitations under the License.
|
14
14
|
|
15
15
|
#include "unittest.h"
|
@@ -61,7 +61,7 @@ static void VerifyValue(T value, void(*f)(T, char*), char* (*g)(T, char*)) {
|
|
61
61
|
|
62
62
|
f(value, buffer1);
|
63
63
|
*g(value, buffer2) = '\0';
|
64
|
-
|
64
|
+
|
65
65
|
|
66
66
|
EXPECT_STREQ(buffer1, buffer2);
|
67
67
|
}
|
@@ -79,12 +79,12 @@ static void Verify(void(*f)(T, char*), char* (*g)(T, char*)) {
|
|
79
79
|
do {
|
80
80
|
VerifyValue<T>(i - 1, f, g);
|
81
81
|
VerifyValue<T>(i, f, g);
|
82
|
-
if (std::numeric_limits<T>::min() < 0) {
|
82
|
+
if ((std::numeric_limits<T>::min)() < 0) {
|
83
83
|
VerifyValue<T>(Traits<T>::Negate(i), f, g);
|
84
84
|
VerifyValue<T>(Traits<T>::Negate(i + 1), f, g);
|
85
85
|
}
|
86
86
|
last = i;
|
87
|
-
if (i > static_cast<T>(std::numeric_limits<T>::max() / static_cast<T>(power)))
|
87
|
+
if (i > static_cast<T>((std::numeric_limits<T>::max)() / static_cast<T>(power)))
|
88
88
|
break;
|
89
89
|
i *= static_cast<T>(power);
|
90
90
|
} while (last < i);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Tencent is pleased to support the open source community by making RapidJSON available.
|
2
2
|
//
|
3
|
-
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
3
|
+
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
|
4
4
|
//
|
5
5
|
// Licensed under the MIT License (the "License"); you may not use this file except
|
6
6
|
// in compliance with the License. You may obtain a copy of the License at
|
@@ -15,7 +15,10 @@
|
|
15
15
|
#include "unittest.h"
|
16
16
|
#include "rapidjson/pointer.h"
|
17
17
|
#include "rapidjson/stringbuffer.h"
|
18
|
+
#include "rapidjson/ostreamwrapper.h"
|
18
19
|
#include <sstream>
|
20
|
+
#include <map>
|
21
|
+
#include <algorithm>
|
19
22
|
|
20
23
|
using namespace rapidjson;
|
21
24
|
|
@@ -503,7 +506,7 @@ TEST(Pointer, Assignment) {
|
|
503
506
|
EXPECT_STREQ("0", q.GetTokens()[1].name);
|
504
507
|
EXPECT_EQ(0u, q.GetTokens()[1].index);
|
505
508
|
EXPECT_NE(&p.GetAllocator(), &q.GetAllocator());
|
506
|
-
q = q;
|
509
|
+
q = static_cast<const Pointer &>(q);
|
507
510
|
EXPECT_TRUE(q.IsValid());
|
508
511
|
EXPECT_EQ(2u, q.GetTokenCount());
|
509
512
|
EXPECT_EQ(3u, q.GetTokens()[0].length);
|
@@ -529,6 +532,36 @@ TEST(Pointer, Assignment) {
|
|
529
532
|
}
|
530
533
|
}
|
531
534
|
|
535
|
+
TEST(Pointer, Swap) {
|
536
|
+
Pointer p("/foo/0");
|
537
|
+
Pointer q(&p.GetAllocator());
|
538
|
+
|
539
|
+
q.Swap(p);
|
540
|
+
EXPECT_EQ(&q.GetAllocator(), &p.GetAllocator());
|
541
|
+
EXPECT_TRUE(p.IsValid());
|
542
|
+
EXPECT_TRUE(q.IsValid());
|
543
|
+
EXPECT_EQ(0u, p.GetTokenCount());
|
544
|
+
EXPECT_EQ(2u, q.GetTokenCount());
|
545
|
+
EXPECT_EQ(3u, q.GetTokens()[0].length);
|
546
|
+
EXPECT_STREQ("foo", q.GetTokens()[0].name);
|
547
|
+
EXPECT_EQ(1u, q.GetTokens()[1].length);
|
548
|
+
EXPECT_STREQ("0", q.GetTokens()[1].name);
|
549
|
+
EXPECT_EQ(0u, q.GetTokens()[1].index);
|
550
|
+
|
551
|
+
// std::swap compatibility
|
552
|
+
std::swap(p, q);
|
553
|
+
EXPECT_EQ(&p.GetAllocator(), &q.GetAllocator());
|
554
|
+
EXPECT_TRUE(q.IsValid());
|
555
|
+
EXPECT_TRUE(p.IsValid());
|
556
|
+
EXPECT_EQ(0u, q.GetTokenCount());
|
557
|
+
EXPECT_EQ(2u, p.GetTokenCount());
|
558
|
+
EXPECT_EQ(3u, p.GetTokens()[0].length);
|
559
|
+
EXPECT_STREQ("foo", p.GetTokens()[0].name);
|
560
|
+
EXPECT_EQ(1u, p.GetTokens()[1].length);
|
561
|
+
EXPECT_STREQ("0", p.GetTokens()[1].name);
|
562
|
+
EXPECT_EQ(0u, p.GetTokens()[1].index);
|
563
|
+
}
|
564
|
+
|
532
565
|
TEST(Pointer, Append) {
|
533
566
|
{
|
534
567
|
Pointer p;
|
@@ -634,13 +667,16 @@ TEST(Pointer, Get) {
|
|
634
667
|
EXPECT_TRUE(Pointer("/abc").Get(d) == 0);
|
635
668
|
size_t unresolvedTokenIndex;
|
636
669
|
EXPECT_TRUE(Pointer("/foo/2").Get(d, &unresolvedTokenIndex) == 0); // Out of boundary
|
637
|
-
EXPECT_EQ(
|
670
|
+
EXPECT_EQ(1u, unresolvedTokenIndex);
|
638
671
|
EXPECT_TRUE(Pointer("/foo/a").Get(d, &unresolvedTokenIndex) == 0); // "/foo" is an array, cannot query by "a"
|
639
|
-
EXPECT_EQ(
|
672
|
+
EXPECT_EQ(1u, unresolvedTokenIndex);
|
640
673
|
EXPECT_TRUE(Pointer("/foo/0/0").Get(d, &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
|
641
|
-
EXPECT_EQ(
|
674
|
+
EXPECT_EQ(2u, unresolvedTokenIndex);
|
642
675
|
EXPECT_TRUE(Pointer("/foo/0/a").Get(d, &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
|
643
|
-
EXPECT_EQ(
|
676
|
+
EXPECT_EQ(2u, unresolvedTokenIndex);
|
677
|
+
|
678
|
+
Pointer::Token tokens[] = { { "foo ...", 3, kPointerInvalidIndex } };
|
679
|
+
EXPECT_EQ(&d["foo"], Pointer(tokens, 1).Get(d));
|
644
680
|
}
|
645
681
|
|
646
682
|
TEST(Pointer, GetWithDefault) {
|
@@ -867,7 +903,7 @@ TEST(Pointer, Set_NoAllocator) {
|
|
867
903
|
#endif
|
868
904
|
}
|
869
905
|
|
870
|
-
TEST(Pointer,
|
906
|
+
TEST(Pointer, Swap_Value) {
|
871
907
|
Document d;
|
872
908
|
d.Parse(kJson);
|
873
909
|
Document::AllocatorType& a = d.GetAllocator();
|
@@ -876,7 +912,7 @@ TEST(Pointer, Swap) {
|
|
876
912
|
EXPECT_STREQ("bar", d["foo"][1].GetString());
|
877
913
|
}
|
878
914
|
|
879
|
-
TEST(Pointer,
|
915
|
+
TEST(Pointer, Swap_Value_NoAllocator) {
|
880
916
|
Document d;
|
881
917
|
d.Parse(kJson);
|
882
918
|
Pointer("/foo/0").Swap(d, *Pointer("/foo/1").Get(d));
|
@@ -959,13 +995,13 @@ TEST(Pointer, GetValueByPointer) {
|
|
959
995
|
|
960
996
|
size_t unresolvedTokenIndex;
|
961
997
|
EXPECT_TRUE(GetValueByPointer(d, "/foo/2", &unresolvedTokenIndex) == 0); // Out of boundary
|
962
|
-
EXPECT_EQ(
|
998
|
+
EXPECT_EQ(1u, unresolvedTokenIndex);
|
963
999
|
EXPECT_TRUE(GetValueByPointer(d, "/foo/a", &unresolvedTokenIndex) == 0); // "/foo" is an array, cannot query by "a"
|
964
|
-
EXPECT_EQ(
|
1000
|
+
EXPECT_EQ(1u, unresolvedTokenIndex);
|
965
1001
|
EXPECT_TRUE(GetValueByPointer(d, "/foo/0/0", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
|
966
|
-
EXPECT_EQ(
|
1002
|
+
EXPECT_EQ(2u, unresolvedTokenIndex);
|
967
1003
|
EXPECT_TRUE(GetValueByPointer(d, "/foo/0/a", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
|
968
|
-
EXPECT_EQ(
|
1004
|
+
EXPECT_EQ(2u, unresolvedTokenIndex);
|
969
1005
|
|
970
1006
|
// const version
|
971
1007
|
const Value& v = d;
|
@@ -973,13 +1009,13 @@ TEST(Pointer, GetValueByPointer) {
|
|
973
1009
|
EXPECT_EQ(&d["foo"][0], GetValueByPointer(v, "/foo/0"));
|
974
1010
|
|
975
1011
|
EXPECT_TRUE(GetValueByPointer(v, "/foo/2", &unresolvedTokenIndex) == 0); // Out of boundary
|
976
|
-
EXPECT_EQ(
|
1012
|
+
EXPECT_EQ(1u, unresolvedTokenIndex);
|
977
1013
|
EXPECT_TRUE(GetValueByPointer(v, "/foo/a", &unresolvedTokenIndex) == 0); // "/foo" is an array, cannot query by "a"
|
978
|
-
EXPECT_EQ(
|
1014
|
+
EXPECT_EQ(1u, unresolvedTokenIndex);
|
979
1015
|
EXPECT_TRUE(GetValueByPointer(v, "/foo/0/0", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
|
980
|
-
EXPECT_EQ(
|
1016
|
+
EXPECT_EQ(2u, unresolvedTokenIndex);
|
981
1017
|
EXPECT_TRUE(GetValueByPointer(v, "/foo/0/a", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
|
982
|
-
EXPECT_EQ(
|
1018
|
+
EXPECT_EQ(2u, unresolvedTokenIndex);
|
983
1019
|
|
984
1020
|
}
|
985
1021
|
|
@@ -1493,6 +1529,111 @@ TEST(Pointer, Ambiguity) {
|
|
1493
1529
|
}
|
1494
1530
|
}
|
1495
1531
|
|
1532
|
+
TEST(Pointer, ResolveOnObject) {
|
1533
|
+
Document d;
|
1534
|
+
EXPECT_FALSE(d.Parse("{\"a\": 123}").HasParseError());
|
1535
|
+
|
1536
|
+
{
|
1537
|
+
Value::ConstObject o = static_cast<const Document&>(d).GetObject();
|
1538
|
+
EXPECT_EQ(123, Pointer("/a").Get(o)->GetInt());
|
1539
|
+
}
|
1540
|
+
|
1541
|
+
{
|
1542
|
+
Value::Object o = d.GetObject();
|
1543
|
+
Pointer("/a").Set(o, 456, d.GetAllocator());
|
1544
|
+
EXPECT_EQ(456, Pointer("/a").Get(o)->GetInt());
|
1545
|
+
}
|
1546
|
+
}
|
1547
|
+
|
1548
|
+
TEST(Pointer, ResolveOnArray) {
|
1549
|
+
Document d;
|
1550
|
+
EXPECT_FALSE(d.Parse("[1, 2, 3]").HasParseError());
|
1551
|
+
|
1552
|
+
{
|
1553
|
+
Value::ConstArray a = static_cast<const Document&>(d).GetArray();
|
1554
|
+
EXPECT_EQ(2, Pointer("/1").Get(a)->GetInt());
|
1555
|
+
}
|
1556
|
+
|
1557
|
+
{
|
1558
|
+
Value::Array a = d.GetArray();
|
1559
|
+
Pointer("/1").Set(a, 123, d.GetAllocator());
|
1560
|
+
EXPECT_EQ(123, Pointer("/1").Get(a)->GetInt());
|
1561
|
+
}
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
TEST(Pointer, LessThan) {
|
1565
|
+
static const struct {
|
1566
|
+
const char *str;
|
1567
|
+
bool valid;
|
1568
|
+
} pointers[] = {
|
1569
|
+
{ "/a/b", true },
|
1570
|
+
{ "/a", true },
|
1571
|
+
{ "/d/1", true },
|
1572
|
+
{ "/d/2/z", true },
|
1573
|
+
{ "/d/2/3", true },
|
1574
|
+
{ "/d/2", true },
|
1575
|
+
{ "/a/c", true },
|
1576
|
+
{ "/e/f~g", false },
|
1577
|
+
{ "/d/2/zz", true },
|
1578
|
+
{ "/d/1", true },
|
1579
|
+
{ "/d/2/z", true },
|
1580
|
+
{ "/e/f~~g", false },
|
1581
|
+
{ "/e/f~0g", true },
|
1582
|
+
{ "/e/f~1g", true },
|
1583
|
+
{ "/e/f.g", true },
|
1584
|
+
{ "", true }
|
1585
|
+
};
|
1586
|
+
static const char *ordered_pointers[] = {
|
1587
|
+
"",
|
1588
|
+
"/a",
|
1589
|
+
"/a/b",
|
1590
|
+
"/a/c",
|
1591
|
+
"/d/1",
|
1592
|
+
"/d/1",
|
1593
|
+
"/d/2",
|
1594
|
+
"/e/f.g",
|
1595
|
+
"/e/f~1g",
|
1596
|
+
"/e/f~0g",
|
1597
|
+
"/d/2/3",
|
1598
|
+
"/d/2/z",
|
1599
|
+
"/d/2/z",
|
1600
|
+
"/d/2/zz",
|
1601
|
+
NULL, // was invalid "/e/f~g"
|
1602
|
+
NULL // was invalid "/e/f~~g"
|
1603
|
+
};
|
1604
|
+
typedef MemoryPoolAllocator<> AllocatorType;
|
1605
|
+
typedef GenericPointer<Value, AllocatorType> PointerType;
|
1606
|
+
typedef std::multimap<PointerType, size_t> PointerMap;
|
1607
|
+
PointerMap map;
|
1608
|
+
PointerMap::iterator it;
|
1609
|
+
AllocatorType allocator;
|
1610
|
+
size_t i;
|
1611
|
+
|
1612
|
+
EXPECT_EQ(sizeof(pointers) / sizeof(pointers[0]),
|
1613
|
+
sizeof(ordered_pointers) / sizeof(ordered_pointers[0]));
|
1614
|
+
|
1615
|
+
for (i = 0; i < sizeof(pointers) / sizeof(pointers[0]); ++i) {
|
1616
|
+
it = map.insert(PointerMap::value_type(PointerType(pointers[i].str, &allocator), i));
|
1617
|
+
if (!it->first.IsValid()) {
|
1618
|
+
EXPECT_EQ(++it, map.end());
|
1619
|
+
}
|
1620
|
+
}
|
1621
|
+
|
1622
|
+
for (i = 0, it = map.begin(); it != map.end(); ++it, ++i) {
|
1623
|
+
EXPECT_TRUE(it->second < sizeof(pointers) / sizeof(pointers[0]));
|
1624
|
+
EXPECT_EQ(it->first.IsValid(), pointers[it->second].valid);
|
1625
|
+
EXPECT_TRUE(i < sizeof(ordered_pointers) / sizeof(ordered_pointers[0]));
|
1626
|
+
EXPECT_EQ(it->first.IsValid(), !!ordered_pointers[i]);
|
1627
|
+
if (it->first.IsValid()) {
|
1628
|
+
std::stringstream ss;
|
1629
|
+
OStreamWrapper os(ss);
|
1630
|
+
EXPECT_TRUE(it->first.Stringify(os));
|
1631
|
+
EXPECT_EQ(ss.str(), pointers[it->second].str);
|
1632
|
+
EXPECT_EQ(ss.str(), ordered_pointers[i]);
|
1633
|
+
}
|
1634
|
+
}
|
1635
|
+
}
|
1636
|
+
|
1496
1637
|
// https://github.com/Tencent/rapidjson/issues/483
|
1497
1638
|
namespace myjson {
|
1498
1639
|
|