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
File without changes
|
@@ -29,7 +29,7 @@
|
|
29
29
|
//
|
30
30
|
// Author: wan@google.com (Zhanyong Wan)
|
31
31
|
//
|
32
|
-
// The Google C++ Testing Framework (Google Test)
|
32
|
+
// The Google C++ Testing and Mocking Framework (Google Test)
|
33
33
|
//
|
34
34
|
// This header file defines the public API for death tests. It is
|
35
35
|
// #included by gtest.h so a user doesn't need to include this
|
@@ -102,7 +102,7 @@ GTEST_API_ bool InDeathTestChild();
|
|
102
102
|
// On POSIX-compliant systems (*nix), we use the <regex.h> library,
|
103
103
|
// which uses the POSIX extended regex syntax.
|
104
104
|
//
|
105
|
-
// On other platforms (e.g. Windows), we only support a simple regex
|
105
|
+
// On other platforms (e.g. Windows or Mac), we only support a simple regex
|
106
106
|
// syntax implemented as part of Google Test. This limited
|
107
107
|
// implementation should be enough most of the time when writing
|
108
108
|
// death tests; though it lacks many features you can find in PCRE
|
@@ -198,7 +198,7 @@ class GTEST_API_ ExitedWithCode {
|
|
198
198
|
const int exit_code_;
|
199
199
|
};
|
200
200
|
|
201
|
-
# if !GTEST_OS_WINDOWS
|
201
|
+
# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
|
202
202
|
// Tests that an exit code describes an exit due to termination by a
|
203
203
|
// given signal.
|
204
204
|
class GTEST_API_ KilledBySignal {
|
@@ -272,6 +272,54 @@ class GTEST_API_ KilledBySignal {
|
|
272
272
|
# endif // NDEBUG for EXPECT_DEBUG_DEATH
|
273
273
|
#endif // GTEST_HAS_DEATH_TEST
|
274
274
|
|
275
|
+
// This macro is used for implementing macros such as
|
276
|
+
// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
|
277
|
+
// death tests are not supported. Those macros must compile on such systems
|
278
|
+
// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
|
279
|
+
// systems that support death tests. This allows one to write such a macro
|
280
|
+
// on a system that does not support death tests and be sure that it will
|
281
|
+
// compile on a death-test supporting system. It is exposed publicly so that
|
282
|
+
// systems that have death-tests with stricter requirements than
|
283
|
+
// GTEST_HAS_DEATH_TEST can write their own equivalent of
|
284
|
+
// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED.
|
285
|
+
//
|
286
|
+
// Parameters:
|
287
|
+
// statement - A statement that a macro such as EXPECT_DEATH would test
|
288
|
+
// for program termination. This macro has to make sure this
|
289
|
+
// statement is compiled but not executed, to ensure that
|
290
|
+
// EXPECT_DEATH_IF_SUPPORTED compiles with a certain
|
291
|
+
// parameter iff EXPECT_DEATH compiles with it.
|
292
|
+
// regex - A regex that a macro such as EXPECT_DEATH would use to test
|
293
|
+
// the output of statement. This parameter has to be
|
294
|
+
// compiled but not evaluated by this macro, to ensure that
|
295
|
+
// this macro only accepts expressions that a macro such as
|
296
|
+
// EXPECT_DEATH would accept.
|
297
|
+
// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
|
298
|
+
// and a return statement for ASSERT_DEATH_IF_SUPPORTED.
|
299
|
+
// This ensures that ASSERT_DEATH_IF_SUPPORTED will not
|
300
|
+
// compile inside functions where ASSERT_DEATH doesn't
|
301
|
+
// compile.
|
302
|
+
//
|
303
|
+
// The branch that has an always false condition is used to ensure that
|
304
|
+
// statement and regex are compiled (and thus syntactically correct) but
|
305
|
+
// never executed. The unreachable code macro protects the terminator
|
306
|
+
// statement from generating an 'unreachable code' warning in case
|
307
|
+
// statement unconditionally returns or throws. The Message constructor at
|
308
|
+
// the end allows the syntax of streaming additional messages into the
|
309
|
+
// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
|
310
|
+
# define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator) \
|
311
|
+
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
|
312
|
+
if (::testing::internal::AlwaysTrue()) { \
|
313
|
+
GTEST_LOG_(WARNING) \
|
314
|
+
<< "Death tests are not supported on this platform.\n" \
|
315
|
+
<< "Statement '" #statement "' cannot be verified."; \
|
316
|
+
} else if (::testing::internal::AlwaysFalse()) { \
|
317
|
+
::testing::internal::RE::PartialMatch(".*", (regex)); \
|
318
|
+
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
|
319
|
+
terminator; \
|
320
|
+
} else \
|
321
|
+
::testing::Message()
|
322
|
+
|
275
323
|
// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
|
276
324
|
// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
|
277
325
|
// death tests are supported; otherwise they just issue a warning. This is
|
@@ -284,9 +332,9 @@ class GTEST_API_ KilledBySignal {
|
|
284
332
|
ASSERT_DEATH(statement, regex)
|
285
333
|
#else
|
286
334
|
# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
|
287
|
-
|
335
|
+
GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, )
|
288
336
|
# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
|
289
|
-
|
337
|
+
GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, return)
|
290
338
|
#endif
|
291
339
|
|
292
340
|
} // namespace testing
|
@@ -29,7 +29,7 @@
|
|
29
29
|
//
|
30
30
|
// Author: wan@google.com (Zhanyong Wan)
|
31
31
|
//
|
32
|
-
// The Google C++ Testing Framework (Google Test)
|
32
|
+
// The Google C++ Testing and Mocking Framework (Google Test)
|
33
33
|
//
|
34
34
|
// This header file defines the Message class.
|
35
35
|
//
|
@@ -196,7 +196,6 @@ class GTEST_API_ Message {
|
|
196
196
|
std::string GetString() const;
|
197
197
|
|
198
198
|
private:
|
199
|
-
|
200
199
|
#if GTEST_OS_SYMBIAN
|
201
200
|
// These are needed as the Nokia Symbian Compiler cannot decide between
|
202
201
|
// const T& and const T* in a function template. The Nokia compiler _can_
|
@@ -34,10 +34,11 @@
|
|
34
34
|
// Authors: vladl@google.com (Vlad Losev)
|
35
35
|
//
|
36
36
|
// Macros and functions for implementing parameterized tests
|
37
|
-
// in Google C++ Testing Framework (Google Test)
|
37
|
+
// in Google C++ Testing and Mocking Framework (Google Test)
|
38
38
|
//
|
39
39
|
// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
|
40
40
|
//
|
41
|
+
|
41
42
|
#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
|
42
43
|
#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
|
43
44
|
|
@@ -79,7 +80,7 @@ TEST_P(FooTest, HasBlahBlah) {
|
|
79
80
|
// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
|
80
81
|
// case with any set of parameters you want. Google Test defines a number
|
81
82
|
// of functions for generating test parameters. They return what we call
|
82
|
-
// (surprise!) parameter generators. Here is a
|
83
|
+
// (surprise!) parameter generators. Here is a summary of them, which
|
83
84
|
// are all in the testing namespace:
|
84
85
|
//
|
85
86
|
//
|
@@ -185,15 +186,10 @@ TEST_P(DerivedTest, DoesBlah) {
|
|
185
186
|
# include <utility>
|
186
187
|
#endif
|
187
188
|
|
188
|
-
// scripts/fuse_gtest.py depends on gtest's own header being #included
|
189
|
-
// *unconditionally*. Therefore these #includes cannot be moved
|
190
|
-
// inside #if GTEST_HAS_PARAM_TEST.
|
191
189
|
#include "gtest/internal/gtest-internal.h"
|
192
190
|
#include "gtest/internal/gtest-param-util.h"
|
193
191
|
#include "gtest/internal/gtest-param-util-generated.h"
|
194
192
|
|
195
|
-
#if GTEST_HAS_PARAM_TEST
|
196
|
-
|
197
193
|
namespace testing {
|
198
194
|
|
199
195
|
// Functions producing parameter generators.
|
@@ -273,7 +269,7 @@ internal::ParamGenerator<T> Range(T start, T end) {
|
|
273
269
|
// each with C-string values of "foo", "bar", and "baz":
|
274
270
|
//
|
275
271
|
// const char* strings[] = {"foo", "bar", "baz"};
|
276
|
-
// INSTANTIATE_TEST_CASE_P(StringSequence,
|
272
|
+
// INSTANTIATE_TEST_CASE_P(StringSequence, StringTest, ValuesIn(strings));
|
277
273
|
//
|
278
274
|
// This instantiates tests from test case StlStringTest
|
279
275
|
// each with STL strings with values "a" and "b":
|
@@ -1375,8 +1371,6 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
|
|
1375
1371
|
}
|
1376
1372
|
# endif // GTEST_HAS_COMBINE
|
1377
1373
|
|
1378
|
-
|
1379
|
-
|
1380
1374
|
# define TEST_P(test_case_name, test_name) \
|
1381
1375
|
class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
|
1382
1376
|
: public test_case_name { \
|
@@ -1390,8 +1384,8 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
|
|
1390
1384
|
#test_case_name, \
|
1391
1385
|
::testing::internal::CodeLocation(\
|
1392
1386
|
__FILE__, __LINE__))->AddTestPattern(\
|
1393
|
-
|
1394
|
-
|
1387
|
+
GTEST_STRINGIFY_(test_case_name), \
|
1388
|
+
GTEST_STRINGIFY_(test_name), \
|
1395
1389
|
new ::testing::internal::TestMetaFactory< \
|
1396
1390
|
GTEST_TEST_CLASS_NAME_(\
|
1397
1391
|
test_case_name, test_name)>()); \
|
@@ -1412,33 +1406,33 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
|
|
1412
1406
|
// type testing::TestParamInfo<class ParamType>, and return std::string.
|
1413
1407
|
//
|
1414
1408
|
// testing::PrintToStringParamName is a builtin test suffix generator that
|
1415
|
-
// returns the value of testing::PrintToString(GetParam()).
|
1416
|
-
// for std::string or C strings.
|
1409
|
+
// returns the value of testing::PrintToString(GetParam()).
|
1417
1410
|
//
|
1418
1411
|
// Note: test names must be non-empty, unique, and may only contain ASCII
|
1419
|
-
// alphanumeric characters or underscore.
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1412
|
+
// alphanumeric characters or underscore. Because PrintToString adds quotes
|
1413
|
+
// to std::string and C strings, it won't work for these types.
|
1414
|
+
|
1415
|
+
#define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator, ...) \
|
1416
|
+
static ::testing::internal::ParamGenerator<test_case_name::ParamType> \
|
1417
|
+
gtest_##prefix##test_case_name##_EvalGenerator_() { \
|
1418
|
+
return generator; \
|
1419
|
+
} \
|
1420
|
+
static ::std::string gtest_##prefix##test_case_name##_EvalGenerateName_( \
|
1421
|
+
const ::testing::TestParamInfo<test_case_name::ParamType>& info) { \
|
1422
|
+
return ::testing::internal::GetParamNameGen<test_case_name::ParamType>( \
|
1423
|
+
__VA_ARGS__)(info); \
|
1424
|
+
} \
|
1425
|
+
static int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
|
1426
|
+
::testing::UnitTest::GetInstance() \
|
1427
|
+
->parameterized_test_registry() \
|
1428
|
+
.GetTestCasePatternHolder<test_case_name>( \
|
1429
|
+
#test_case_name, \
|
1430
|
+
::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
1431
|
+
->AddTestCaseInstantiation( \
|
1432
|
+
#prefix, >est_##prefix##test_case_name##_EvalGenerator_, \
|
1433
|
+
>est_##prefix##test_case_name##_EvalGenerateName_, __FILE__, \
|
1434
|
+
__LINE__)
|
1439
1435
|
|
1440
1436
|
} // namespace testing
|
1441
1437
|
|
1442
|
-
#endif // GTEST_HAS_PARAM_TEST
|
1443
|
-
|
1444
1438
|
#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
|
data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump
CHANGED
@@ -33,7 +33,7 @@ $var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
|
|
33
33
|
// Authors: vladl@google.com (Vlad Losev)
|
34
34
|
//
|
35
35
|
// Macros and functions for implementing parameterized tests
|
36
|
-
// in Google C++ Testing Framework (Google Test)
|
36
|
+
// in Google C++ Testing and Mocking Framework (Google Test)
|
37
37
|
//
|
38
38
|
// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
|
39
39
|
//
|
@@ -78,7 +78,7 @@ TEST_P(FooTest, HasBlahBlah) {
|
|
78
78
|
// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
|
79
79
|
// case with any set of parameters you want. Google Test defines a number
|
80
80
|
// of functions for generating test parameters. They return what we call
|
81
|
-
// (surprise!) parameter generators. Here is a
|
81
|
+
// (surprise!) parameter generators. Here is a summary of them, which
|
82
82
|
// are all in the testing namespace:
|
83
83
|
//
|
84
84
|
//
|
@@ -184,15 +184,10 @@ TEST_P(DerivedTest, DoesBlah) {
|
|
184
184
|
# include <utility>
|
185
185
|
#endif
|
186
186
|
|
187
|
-
// scripts/fuse_gtest.py depends on gtest's own header being #included
|
188
|
-
// *unconditionally*. Therefore these #includes cannot be moved
|
189
|
-
// inside #if GTEST_HAS_PARAM_TEST.
|
190
187
|
#include "gtest/internal/gtest-internal.h"
|
191
188
|
#include "gtest/internal/gtest-param-util.h"
|
192
189
|
#include "gtest/internal/gtest-param-util-generated.h"
|
193
190
|
|
194
|
-
#if GTEST_HAS_PARAM_TEST
|
195
|
-
|
196
191
|
namespace testing {
|
197
192
|
|
198
193
|
// Functions producing parameter generators.
|
@@ -272,7 +267,7 @@ internal::ParamGenerator<T> Range(T start, T end) {
|
|
272
267
|
// each with C-string values of "foo", "bar", and "baz":
|
273
268
|
//
|
274
269
|
// const char* strings[] = {"foo", "bar", "baz"};
|
275
|
-
// INSTANTIATE_TEST_CASE_P(StringSequence,
|
270
|
+
// INSTANTIATE_TEST_CASE_P(StringSequence, StringTest, ValuesIn(strings));
|
276
271
|
//
|
277
272
|
// This instantiates tests from test case StlStringTest
|
278
273
|
// each with STL strings with values "a" and "b":
|
@@ -441,8 +436,6 @@ internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(
|
|
441
436
|
]]
|
442
437
|
# endif // GTEST_HAS_COMBINE
|
443
438
|
|
444
|
-
|
445
|
-
|
446
439
|
# define TEST_P(test_case_name, test_name) \
|
447
440
|
class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
|
448
441
|
: public test_case_name { \
|
@@ -456,8 +449,8 @@ internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(
|
|
456
449
|
#test_case_name, \
|
457
450
|
::testing::internal::CodeLocation(\
|
458
451
|
__FILE__, __LINE__))->AddTestPattern(\
|
459
|
-
|
460
|
-
|
452
|
+
GTEST_STRINGIFY_(test_case_name), \
|
453
|
+
GTEST_STRINGIFY_(test_name), \
|
461
454
|
new ::testing::internal::TestMetaFactory< \
|
462
455
|
GTEST_TEST_CLASS_NAME_(\
|
463
456
|
test_case_name, test_name)>()); \
|
@@ -485,14 +478,14 @@ internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(
|
|
485
478
|
// to std::string and C strings, it won't work for these types.
|
486
479
|
|
487
480
|
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator, ...) \
|
488
|
-
::testing::internal::ParamGenerator<test_case_name::ParamType> \
|
481
|
+
static ::testing::internal::ParamGenerator<test_case_name::ParamType> \
|
489
482
|
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
|
490
|
-
::std::string gtest_##prefix##test_case_name##_EvalGenerateName_( \
|
483
|
+
static ::std::string gtest_##prefix##test_case_name##_EvalGenerateName_( \
|
491
484
|
const ::testing::TestParamInfo<test_case_name::ParamType>& info) { \
|
492
485
|
return ::testing::internal::GetParamNameGen<test_case_name::ParamType> \
|
493
486
|
(__VA_ARGS__)(info); \
|
494
487
|
} \
|
495
|
-
int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
|
488
|
+
static int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
|
496
489
|
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
|
497
490
|
GetTestCasePatternHolder<test_case_name>(\
|
498
491
|
#test_case_name, \
|
@@ -505,6 +498,4 @@ internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(
|
|
505
498
|
|
506
499
|
} // namespace testing
|
507
500
|
|
508
|
-
#endif // GTEST_HAS_PARAM_TEST
|
509
|
-
|
510
501
|
#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
|
@@ -29,7 +29,7 @@
|
|
29
29
|
//
|
30
30
|
// Author: wan@google.com (Zhanyong Wan)
|
31
31
|
|
32
|
-
// Google Test - The Google C++ Testing Framework
|
32
|
+
// Google Test - The Google C++ Testing and Mocking Framework
|
33
33
|
//
|
34
34
|
// This file implements a universal value printer that can print a
|
35
35
|
// value of any type T:
|
@@ -46,6 +46,10 @@
|
|
46
46
|
// 2. operator<<(ostream&, const T&) defined in either foo or the
|
47
47
|
// global namespace.
|
48
48
|
//
|
49
|
+
// However if T is an STL-style container then it is printed element-wise
|
50
|
+
// unless foo::PrintTo(const T&, ostream*) is defined. Note that
|
51
|
+
// operator<<() is ignored for container types.
|
52
|
+
//
|
49
53
|
// If none of the above is defined, it will print the debug string of
|
50
54
|
// the value if it is a protocol buffer, or print the raw bytes in the
|
51
55
|
// value otherwise.
|
@@ -107,6 +111,11 @@
|
|
107
111
|
# include <tuple>
|
108
112
|
#endif
|
109
113
|
|
114
|
+
#if GTEST_HAS_ABSL
|
115
|
+
#include "absl/strings/string_view.h"
|
116
|
+
#include "absl/types/optional.h"
|
117
|
+
#endif // GTEST_HAS_ABSL
|
118
|
+
|
110
119
|
namespace testing {
|
111
120
|
|
112
121
|
// Definitions in the 'internal' and 'internal2' name spaces are
|
@@ -125,7 +134,11 @@ enum TypeKind {
|
|
125
134
|
kProtobuf, // a protobuf type
|
126
135
|
kConvertibleToInteger, // a type implicitly convertible to BiggestInt
|
127
136
|
// (e.g. a named or unnamed enum type)
|
128
|
-
|
137
|
+
#if GTEST_HAS_ABSL
|
138
|
+
kConvertibleToStringView, // a type implicitly convertible to
|
139
|
+
// absl::string_view
|
140
|
+
#endif
|
141
|
+
kOtherType // anything else
|
129
142
|
};
|
130
143
|
|
131
144
|
// TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called
|
@@ -137,7 +150,8 @@ class TypeWithoutFormatter {
|
|
137
150
|
public:
|
138
151
|
// This default version is called when kTypeKind is kOtherType.
|
139
152
|
static void PrintValue(const T& value, ::std::ostream* os) {
|
140
|
-
PrintBytesInObjectTo(
|
153
|
+
PrintBytesInObjectTo(static_cast<const unsigned char*>(
|
154
|
+
reinterpret_cast<const void*>(&value)),
|
141
155
|
sizeof(value), os);
|
142
156
|
}
|
143
157
|
};
|
@@ -151,10 +165,10 @@ template <typename T>
|
|
151
165
|
class TypeWithoutFormatter<T, kProtobuf> {
|
152
166
|
public:
|
153
167
|
static void PrintValue(const T& value, ::std::ostream* os) {
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
168
|
+
std::string pretty_str = value.ShortDebugString();
|
169
|
+
if (pretty_str.length() > kProtobufOneLinerMaxLength) {
|
170
|
+
pretty_str = "\n" + value.DebugString();
|
171
|
+
}
|
158
172
|
*os << ("<" + pretty_str + ">");
|
159
173
|
}
|
160
174
|
};
|
@@ -175,6 +189,19 @@ class TypeWithoutFormatter<T, kConvertibleToInteger> {
|
|
175
189
|
}
|
176
190
|
};
|
177
191
|
|
192
|
+
#if GTEST_HAS_ABSL
|
193
|
+
template <typename T>
|
194
|
+
class TypeWithoutFormatter<T, kConvertibleToStringView> {
|
195
|
+
public:
|
196
|
+
// Since T has neither operator<< nor PrintTo() but can be implicitly
|
197
|
+
// converted to absl::string_view, we print it as a absl::string_view.
|
198
|
+
//
|
199
|
+
// Note: the implementation is further below, as it depends on
|
200
|
+
// internal::PrintTo symbol which is defined later in the file.
|
201
|
+
static void PrintValue(const T& value, ::std::ostream* os);
|
202
|
+
};
|
203
|
+
#endif
|
204
|
+
|
178
205
|
// Prints the given value to the given ostream. If the value is a
|
179
206
|
// protocol message, its debug string is printed; if it's an enum or
|
180
207
|
// of a type implicitly convertible to BiggestInt, it's printed as an
|
@@ -202,10 +229,19 @@ class TypeWithoutFormatter<T, kConvertibleToInteger> {
|
|
202
229
|
template <typename Char, typename CharTraits, typename T>
|
203
230
|
::std::basic_ostream<Char, CharTraits>& operator<<(
|
204
231
|
::std::basic_ostream<Char, CharTraits>& os, const T& x) {
|
205
|
-
TypeWithoutFormatter<T,
|
206
|
-
|
207
|
-
|
208
|
-
|
232
|
+
TypeWithoutFormatter<T, (internal::IsAProtocolMessage<T>::value
|
233
|
+
? kProtobuf
|
234
|
+
: internal::ImplicitlyConvertible<
|
235
|
+
const T&, internal::BiggestInt>::value
|
236
|
+
? kConvertibleToInteger
|
237
|
+
:
|
238
|
+
#if GTEST_HAS_ABSL
|
239
|
+
internal::ImplicitlyConvertible<
|
240
|
+
const T&, absl::string_view>::value
|
241
|
+
? kConvertibleToStringView
|
242
|
+
:
|
243
|
+
#endif
|
244
|
+
kOtherType)>::PrintValue(x, &os);
|
209
245
|
return os;
|
210
246
|
}
|
211
247
|
|
@@ -364,11 +400,18 @@ class UniversalPrinter;
|
|
364
400
|
template <typename T>
|
365
401
|
void UniversalPrint(const T& value, ::std::ostream* os);
|
366
402
|
|
403
|
+
enum DefaultPrinterType {
|
404
|
+
kPrintContainer,
|
405
|
+
kPrintPointer,
|
406
|
+
kPrintFunctionPointer,
|
407
|
+
kPrintOther,
|
408
|
+
};
|
409
|
+
template <DefaultPrinterType type> struct WrapPrinterType {};
|
410
|
+
|
367
411
|
// Used to print an STL-style container when the user doesn't define
|
368
412
|
// a PrintTo() for it.
|
369
413
|
template <typename C>
|
370
|
-
void DefaultPrintTo(
|
371
|
-
false_type /* is not a pointer */,
|
414
|
+
void DefaultPrintTo(WrapPrinterType<kPrintContainer> /* dummy */,
|
372
415
|
const C& container, ::std::ostream* os) {
|
373
416
|
const size_t kMaxCount = 32; // The maximum number of elements to print.
|
374
417
|
*os << '{';
|
@@ -401,40 +444,34 @@ void DefaultPrintTo(IsContainer /* dummy */,
|
|
401
444
|
// implementation-defined. Therefore they will be printed as raw
|
402
445
|
// bytes.)
|
403
446
|
template <typename T>
|
404
|
-
void DefaultPrintTo(
|
405
|
-
true_type /* is a pointer */,
|
447
|
+
void DefaultPrintTo(WrapPrinterType<kPrintPointer> /* dummy */,
|
406
448
|
T* p, ::std::ostream* os) {
|
407
449
|
if (p == NULL) {
|
408
450
|
*os << "NULL";
|
409
451
|
} else {
|
410
|
-
//
|
411
|
-
// pointer
|
412
|
-
//
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
// pointer. Casting to UInt64 first solves the problem.
|
427
|
-
*os << reinterpret_cast<const void*>(
|
428
|
-
reinterpret_cast<internal::UInt64>(p));
|
429
|
-
}
|
452
|
+
// T is not a function type. We just call << to print p,
|
453
|
+
// relying on ADL to pick up user-defined << for their pointer
|
454
|
+
// types, if any.
|
455
|
+
*os << p;
|
456
|
+
}
|
457
|
+
}
|
458
|
+
template <typename T>
|
459
|
+
void DefaultPrintTo(WrapPrinterType<kPrintFunctionPointer> /* dummy */,
|
460
|
+
T* p, ::std::ostream* os) {
|
461
|
+
if (p == NULL) {
|
462
|
+
*os << "NULL";
|
463
|
+
} else {
|
464
|
+
// T is a function type, so '*os << p' doesn't do what we want
|
465
|
+
// (it just prints p as bool). We want to print p as a const
|
466
|
+
// void*.
|
467
|
+
*os << reinterpret_cast<const void*>(p);
|
430
468
|
}
|
431
469
|
}
|
432
470
|
|
433
471
|
// Used to print a non-container, non-pointer value when the user
|
434
472
|
// doesn't define PrintTo() for it.
|
435
473
|
template <typename T>
|
436
|
-
void DefaultPrintTo(
|
437
|
-
false_type /* is not a pointer */,
|
474
|
+
void DefaultPrintTo(WrapPrinterType<kPrintOther> /* dummy */,
|
438
475
|
const T& value, ::std::ostream* os) {
|
439
476
|
::testing_internal::DefaultPrintNonContainerTo(value, os);
|
440
477
|
}
|
@@ -452,11 +489,8 @@ void DefaultPrintTo(IsNotContainer /* dummy */,
|
|
452
489
|
// wants).
|
453
490
|
template <typename T>
|
454
491
|
void PrintTo(const T& value, ::std::ostream* os) {
|
455
|
-
// DefaultPrintTo() is overloaded. The type of its first
|
456
|
-
//
|
457
|
-
// STL-style container, the version for container will be called; if
|
458
|
-
// T is a pointer, the pointer version will be called; otherwise the
|
459
|
-
// generic version will be called.
|
492
|
+
// DefaultPrintTo() is overloaded. The type of its first argument
|
493
|
+
// determines which version will be picked.
|
460
494
|
//
|
461
495
|
// Note that we check for container types here, prior to we check
|
462
496
|
// for protocol message types in our operator<<. The rationale is:
|
@@ -468,13 +502,27 @@ void PrintTo(const T& value, ::std::ostream* os) {
|
|
468
502
|
// elements; therefore we check for container types here to ensure
|
469
503
|
// that our format is used.
|
470
504
|
//
|
471
|
-
//
|
472
|
-
//
|
473
|
-
//
|
474
|
-
//
|
475
|
-
//
|
476
|
-
//
|
477
|
-
DefaultPrintTo(
|
505
|
+
// Note that MSVC and clang-cl do allow an implicit conversion from
|
506
|
+
// pointer-to-function to pointer-to-object, but clang-cl warns on it.
|
507
|
+
// So don't use ImplicitlyConvertible if it can be helped since it will
|
508
|
+
// cause this warning, and use a separate overload of DefaultPrintTo for
|
509
|
+
// function pointers so that the `*os << p` in the object pointer overload
|
510
|
+
// doesn't cause that warning either.
|
511
|
+
DefaultPrintTo(
|
512
|
+
WrapPrinterType <
|
513
|
+
(sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) &&
|
514
|
+
!IsRecursiveContainer<T>::value
|
515
|
+
? kPrintContainer
|
516
|
+
: !is_pointer<T>::value
|
517
|
+
? kPrintOther
|
518
|
+
#if GTEST_LANG_CXX11
|
519
|
+
: std::is_function<typename std::remove_pointer<T>::type>::value
|
520
|
+
#else
|
521
|
+
: !internal::ImplicitlyConvertible<T, const void*>::value
|
522
|
+
#endif
|
523
|
+
? kPrintFunctionPointer
|
524
|
+
: kPrintPointer > (),
|
525
|
+
value, os);
|
478
526
|
}
|
479
527
|
|
480
528
|
// The following list of PrintTo() overloads tells
|
@@ -581,6 +629,17 @@ inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
|
|
581
629
|
}
|
582
630
|
#endif // GTEST_HAS_STD_WSTRING
|
583
631
|
|
632
|
+
#if GTEST_HAS_ABSL
|
633
|
+
// Overload for absl::string_view.
|
634
|
+
inline void PrintTo(absl::string_view sp, ::std::ostream* os) {
|
635
|
+
PrintTo(::std::string(sp), os);
|
636
|
+
}
|
637
|
+
#endif // GTEST_HAS_ABSL
|
638
|
+
|
639
|
+
#if GTEST_LANG_CXX11
|
640
|
+
inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }
|
641
|
+
#endif // GTEST_LANG_CXX11
|
642
|
+
|
584
643
|
#if GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_
|
585
644
|
// Helper function for printing a tuple. T must be instantiated with
|
586
645
|
// a tuple type.
|
@@ -710,6 +769,26 @@ class UniversalPrinter {
|
|
710
769
|
GTEST_DISABLE_MSC_WARNINGS_POP_()
|
711
770
|
};
|
712
771
|
|
772
|
+
#if GTEST_HAS_ABSL
|
773
|
+
|
774
|
+
// Printer for absl::optional
|
775
|
+
|
776
|
+
template <typename T>
|
777
|
+
class UniversalPrinter<::absl::optional<T>> {
|
778
|
+
public:
|
779
|
+
static void Print(const ::absl::optional<T>& value, ::std::ostream* os) {
|
780
|
+
*os << '(';
|
781
|
+
if (!value) {
|
782
|
+
*os << "nullopt";
|
783
|
+
} else {
|
784
|
+
UniversalPrint(*value, os);
|
785
|
+
}
|
786
|
+
*os << ')';
|
787
|
+
}
|
788
|
+
};
|
789
|
+
|
790
|
+
#endif // GTEST_HAS_ABSL
|
791
|
+
|
713
792
|
// UniversalPrintArray(begin, len, os) prints an array of 'len'
|
714
793
|
// elements, starting at address 'begin'.
|
715
794
|
template <typename T>
|
@@ -805,7 +884,7 @@ class UniversalTersePrinter<const char*> {
|
|
805
884
|
if (str == NULL) {
|
806
885
|
*os << "NULL";
|
807
886
|
} else {
|
808
|
-
UniversalPrint(string(str), os);
|
887
|
+
UniversalPrint(std::string(str), os);
|
809
888
|
}
|
810
889
|
}
|
811
890
|
};
|
@@ -856,7 +935,7 @@ void UniversalPrint(const T& value, ::std::ostream* os) {
|
|
856
935
|
UniversalPrinter<T1>::Print(value, os);
|
857
936
|
}
|
858
937
|
|
859
|
-
typedef ::std::vector<string> Strings;
|
938
|
+
typedef ::std::vector< ::std::string> Strings;
|
860
939
|
|
861
940
|
// TuplePolicy<TupleT> must provide:
|
862
941
|
// - tuple_size
|
@@ -976,6 +1055,16 @@ Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
|
|
976
1055
|
|
977
1056
|
} // namespace internal
|
978
1057
|
|
1058
|
+
#if GTEST_HAS_ABSL
|
1059
|
+
namespace internal2 {
|
1060
|
+
template <typename T>
|
1061
|
+
void TypeWithoutFormatter<T, kConvertibleToStringView>::PrintValue(
|
1062
|
+
const T& value, ::std::ostream* os) {
|
1063
|
+
internal::PrintTo(absl::string_view(value), os);
|
1064
|
+
}
|
1065
|
+
} // namespace internal2
|
1066
|
+
#endif
|
1067
|
+
|
979
1068
|
template <typename T>
|
980
1069
|
::std::string PrintToString(const T& value) {
|
981
1070
|
::std::stringstream ss;
|