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
@@ -89,15 +89,18 @@ using testing::Mock;
|
|
89
89
|
using testing::NaggyMock;
|
90
90
|
using testing::Ne;
|
91
91
|
using testing::Return;
|
92
|
+
using testing::SaveArg;
|
92
93
|
using testing::Sequence;
|
93
94
|
using testing::SetArgPointee;
|
94
95
|
using testing::internal::ExpectationTester;
|
95
96
|
using testing::internal::FormatFileLocation;
|
97
|
+
using testing::internal::kAllow;
|
96
98
|
using testing::internal::kErrorVerbosity;
|
99
|
+
using testing::internal::kFail;
|
97
100
|
using testing::internal::kInfoVerbosity;
|
101
|
+
using testing::internal::kWarn;
|
98
102
|
using testing::internal::kWarningVerbosity;
|
99
103
|
using testing::internal::linked_ptr;
|
100
|
-
using testing::internal::string;
|
101
104
|
|
102
105
|
#if GTEST_HAS_STREAM_REDIRECTION
|
103
106
|
using testing::HasSubstr;
|
@@ -692,6 +695,60 @@ TEST(ExpectCallSyntaxTest, WarnsOnTooFewActions) {
|
|
692
695
|
b.DoB();
|
693
696
|
}
|
694
697
|
|
698
|
+
TEST(ExpectCallSyntaxTest, WarningIsErrorWithFlag) {
|
699
|
+
int original_behavior = testing::GMOCK_FLAG(default_mock_behavior);
|
700
|
+
|
701
|
+
testing::GMOCK_FLAG(default_mock_behavior) = kAllow;
|
702
|
+
CaptureStdout();
|
703
|
+
{
|
704
|
+
MockA a;
|
705
|
+
a.DoA(0);
|
706
|
+
}
|
707
|
+
std::string output = GetCapturedStdout();
|
708
|
+
EXPECT_TRUE(output.empty()) << output;
|
709
|
+
|
710
|
+
testing::GMOCK_FLAG(default_mock_behavior) = kWarn;
|
711
|
+
CaptureStdout();
|
712
|
+
{
|
713
|
+
MockA a;
|
714
|
+
a.DoA(0);
|
715
|
+
}
|
716
|
+
std::string warning_output = GetCapturedStdout();
|
717
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output);
|
718
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call",
|
719
|
+
warning_output);
|
720
|
+
|
721
|
+
testing::GMOCK_FLAG(default_mock_behavior) = kFail;
|
722
|
+
EXPECT_NONFATAL_FAILURE({
|
723
|
+
MockA a;
|
724
|
+
a.DoA(0);
|
725
|
+
}, "Uninteresting mock function call");
|
726
|
+
|
727
|
+
// Out of bounds values are converted to kWarn
|
728
|
+
testing::GMOCK_FLAG(default_mock_behavior) = -1;
|
729
|
+
CaptureStdout();
|
730
|
+
{
|
731
|
+
MockA a;
|
732
|
+
a.DoA(0);
|
733
|
+
}
|
734
|
+
warning_output = GetCapturedStdout();
|
735
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output);
|
736
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call",
|
737
|
+
warning_output);
|
738
|
+
testing::GMOCK_FLAG(default_mock_behavior) = 3;
|
739
|
+
CaptureStdout();
|
740
|
+
{
|
741
|
+
MockA a;
|
742
|
+
a.DoA(0);
|
743
|
+
}
|
744
|
+
warning_output = GetCapturedStdout();
|
745
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output);
|
746
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call",
|
747
|
+
warning_output);
|
748
|
+
|
749
|
+
testing::GMOCK_FLAG(default_mock_behavior) = original_behavior;
|
750
|
+
}
|
751
|
+
|
695
752
|
#endif // GTEST_HAS_STREAM_REDIRECTION
|
696
753
|
|
697
754
|
// Tests the semantics of ON_CALL().
|
@@ -1954,7 +2011,7 @@ class MockC {
|
|
1954
2011
|
public:
|
1955
2012
|
MockC() {}
|
1956
2013
|
|
1957
|
-
MOCK_METHOD6(VoidMethod, void(bool cond, int n, string s, void* p,
|
2014
|
+
MOCK_METHOD6(VoidMethod, void(bool cond, int n, std::string s, void* p,
|
1958
2015
|
const Printable& x, Unprintable y));
|
1959
2016
|
MOCK_METHOD0(NonVoidMethod, int()); // NOLINT
|
1960
2017
|
|
@@ -1970,7 +2027,7 @@ class VerboseFlagPreservingFixture : public testing::Test {
|
|
1970
2027
|
~VerboseFlagPreservingFixture() { GMOCK_FLAG(verbose) = saved_verbose_flag_; }
|
1971
2028
|
|
1972
2029
|
private:
|
1973
|
-
const string saved_verbose_flag_;
|
2030
|
+
const std::string saved_verbose_flag_;
|
1974
2031
|
|
1975
2032
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(VerboseFlagPreservingFixture);
|
1976
2033
|
};
|
@@ -2062,8 +2119,8 @@ class GMockVerboseFlagTest : public VerboseFlagPreservingFixture {
|
|
2062
2119
|
// contain the given function name in the stack trace. When it's
|
2063
2120
|
// false, the output should be empty.)
|
2064
2121
|
void VerifyOutput(const std::string& output, bool should_print,
|
2065
|
-
const string& expected_substring,
|
2066
|
-
const string& function_name) {
|
2122
|
+
const std::string& expected_substring,
|
2123
|
+
const std::string& function_name) {
|
2067
2124
|
if (should_print) {
|
2068
2125
|
EXPECT_THAT(output.c_str(), HasSubstr(expected_substring));
|
2069
2126
|
# ifndef NDEBUG
|
@@ -2113,11 +2170,13 @@ class GMockVerboseFlagTest : public VerboseFlagPreservingFixture {
|
|
2113
2170
|
// Tests how the flag affects uninteresting calls on a naggy mock.
|
2114
2171
|
void TestUninterestingCallOnNaggyMock(bool should_print) {
|
2115
2172
|
NaggyMock<MockA> a;
|
2116
|
-
const string note =
|
2173
|
+
const std::string note =
|
2117
2174
|
"NOTE: You can safely ignore the above warning unless this "
|
2118
2175
|
"call should not happen. Do not suppress it by blindly adding "
|
2119
2176
|
"an EXPECT_CALL() if you don't mean to enforce the call. "
|
2120
|
-
"See
|
2177
|
+
"See "
|
2178
|
+
"https://github.com/google/googletest/blob/master/googlemock/docs/"
|
2179
|
+
"CookBook.md#"
|
2121
2180
|
"knowing-when-to-expect for details.";
|
2122
2181
|
|
2123
2182
|
// A void-returning function.
|
@@ -2623,9 +2682,78 @@ TEST(SynchronizationTest, CanCallMockMethodInAction) {
|
|
2623
2682
|
// EXPECT_CALL() did not specify an action.
|
2624
2683
|
}
|
2625
2684
|
|
2685
|
+
TEST(ParameterlessExpectationsTest, CanSetExpectationsWithoutMatchers) {
|
2686
|
+
MockA a;
|
2687
|
+
int do_a_arg0 = 0;
|
2688
|
+
ON_CALL(a, DoA).WillByDefault(SaveArg<0>(&do_a_arg0));
|
2689
|
+
int do_a_47_arg0 = 0;
|
2690
|
+
ON_CALL(a, DoA(47)).WillByDefault(SaveArg<0>(&do_a_47_arg0));
|
2691
|
+
|
2692
|
+
a.DoA(17);
|
2693
|
+
EXPECT_THAT(do_a_arg0, 17);
|
2694
|
+
EXPECT_THAT(do_a_47_arg0, 0);
|
2695
|
+
a.DoA(47);
|
2696
|
+
EXPECT_THAT(do_a_arg0, 17);
|
2697
|
+
EXPECT_THAT(do_a_47_arg0, 47);
|
2698
|
+
|
2699
|
+
ON_CALL(a, Binary).WillByDefault(Return(true));
|
2700
|
+
ON_CALL(a, Binary(_, 14)).WillByDefault(Return(false));
|
2701
|
+
EXPECT_THAT(a.Binary(14, 17), true);
|
2702
|
+
EXPECT_THAT(a.Binary(17, 14), false);
|
2703
|
+
}
|
2704
|
+
|
2705
|
+
TEST(ParameterlessExpectationsTest, CanSetExpectationsForOverloadedMethods) {
|
2706
|
+
MockB b;
|
2707
|
+
ON_CALL(b, DoB()).WillByDefault(Return(9));
|
2708
|
+
ON_CALL(b, DoB(5)).WillByDefault(Return(11));
|
2709
|
+
|
2710
|
+
EXPECT_THAT(b.DoB(), 9);
|
2711
|
+
EXPECT_THAT(b.DoB(1), 0); // default value
|
2712
|
+
EXPECT_THAT(b.DoB(5), 11);
|
2713
|
+
}
|
2714
|
+
|
2715
|
+
struct MockWithConstMethods {
|
2716
|
+
public:
|
2717
|
+
MOCK_CONST_METHOD1(Foo, int(int));
|
2718
|
+
MOCK_CONST_METHOD2(Bar, int(int, const char*));
|
2719
|
+
};
|
2720
|
+
|
2721
|
+
TEST(ParameterlessExpectationsTest, CanSetExpectationsForConstMethods) {
|
2722
|
+
MockWithConstMethods mock;
|
2723
|
+
ON_CALL(mock, Foo).WillByDefault(Return(7));
|
2724
|
+
ON_CALL(mock, Bar).WillByDefault(Return(33));
|
2725
|
+
|
2726
|
+
EXPECT_THAT(mock.Foo(17), 7);
|
2727
|
+
EXPECT_THAT(mock.Bar(27, "purple"), 33);
|
2728
|
+
}
|
2729
|
+
|
2730
|
+
class MockConstOverload {
|
2731
|
+
public:
|
2732
|
+
MOCK_METHOD1(Overloaded, int(int));
|
2733
|
+
MOCK_CONST_METHOD1(Overloaded, int(int));
|
2734
|
+
};
|
2735
|
+
|
2736
|
+
TEST(ParameterlessExpectationsTest,
|
2737
|
+
CanSetExpectationsForConstOverloadedMethods) {
|
2738
|
+
MockConstOverload mock;
|
2739
|
+
ON_CALL(mock, Overloaded(_)).WillByDefault(Return(7));
|
2740
|
+
ON_CALL(mock, Overloaded(5)).WillByDefault(Return(9));
|
2741
|
+
ON_CALL(Const(mock), Overloaded(5)).WillByDefault(Return(11));
|
2742
|
+
ON_CALL(Const(mock), Overloaded(7)).WillByDefault(Return(13));
|
2743
|
+
|
2744
|
+
EXPECT_THAT(mock.Overloaded(1), 7);
|
2745
|
+
EXPECT_THAT(mock.Overloaded(5), 9);
|
2746
|
+
EXPECT_THAT(mock.Overloaded(7), 7);
|
2747
|
+
|
2748
|
+
const MockConstOverload& const_mock = mock;
|
2749
|
+
EXPECT_THAT(const_mock.Overloaded(1), 0);
|
2750
|
+
EXPECT_THAT(const_mock.Overloaded(5), 11);
|
2751
|
+
EXPECT_THAT(const_mock.Overloaded(7), 13);
|
2752
|
+
}
|
2753
|
+
|
2626
2754
|
} // namespace
|
2627
2755
|
|
2628
|
-
// Allows the user to define
|
2756
|
+
// Allows the user to define their own main and then invoke gmock_main
|
2629
2757
|
// from it. This might be necessary on some platforms which require
|
2630
2758
|
// specific setup and teardown.
|
2631
2759
|
#if GMOCK_RENAME_MAIN
|
@@ -2634,7 +2762,6 @@ int gmock_main(int argc, char **argv) {
|
|
2634
2762
|
int main(int argc, char **argv) {
|
2635
2763
|
#endif // GMOCK_RENAME_MAIN
|
2636
2764
|
testing::InitGoogleMock(&argc, argv);
|
2637
|
-
|
2638
2765
|
// Ensures that the tests pass no matter what value of
|
2639
2766
|
// --gmock_catch_leaked_mocks and --gmock_verbose the user specifies.
|
2640
2767
|
testing::GMOCK_FLAG(catch_leaked_mocks) = true;
|
@@ -90,8 +90,10 @@
|
|
90
90
|
// Field
|
91
91
|
// Property
|
92
92
|
// ResultOf(function)
|
93
|
+
// ResultOf(callback)
|
93
94
|
// Pointee
|
94
95
|
// Truly(predicate)
|
96
|
+
// AddressSatisfies
|
95
97
|
// AllOf
|
96
98
|
// AnyOf
|
97
99
|
// Not
|
@@ -120,13 +122,15 @@
|
|
120
122
|
# include <errno.h>
|
121
123
|
#endif
|
122
124
|
|
123
|
-
#include "gmock/internal/gmock-port.h"
|
124
|
-
#include "gtest/gtest.h"
|
125
125
|
#include <iostream>
|
126
126
|
#include <vector>
|
127
127
|
|
128
|
+
#include "gtest/gtest.h"
|
129
|
+
#include "gtest/internal/gtest-port.h"
|
130
|
+
|
128
131
|
using testing::_;
|
129
132
|
using testing::A;
|
133
|
+
using testing::Action;
|
130
134
|
using testing::AllOf;
|
131
135
|
using testing::AnyOf;
|
132
136
|
using testing::Assign;
|
@@ -148,6 +152,8 @@ using testing::Invoke;
|
|
148
152
|
using testing::InvokeArgument;
|
149
153
|
using testing::InvokeWithoutArgs;
|
150
154
|
using testing::IsNull;
|
155
|
+
using testing::IsSubsetOf;
|
156
|
+
using testing::IsSupersetOf;
|
151
157
|
using testing::Le;
|
152
158
|
using testing::Lt;
|
153
159
|
using testing::Matcher;
|
@@ -592,6 +598,22 @@ TEST(LinkTest, TestMatcherElementsAreArray) {
|
|
592
598
|
ON_CALL(mock, VoidFromVector(ElementsAreArray(arr))).WillByDefault(Return());
|
593
599
|
}
|
594
600
|
|
601
|
+
// Tests the linkage of the IsSubsetOf matcher.
|
602
|
+
TEST(LinkTest, TestMatcherIsSubsetOf) {
|
603
|
+
Mock mock;
|
604
|
+
char arr[] = {'a', 'b'};
|
605
|
+
|
606
|
+
ON_CALL(mock, VoidFromVector(IsSubsetOf(arr))).WillByDefault(Return());
|
607
|
+
}
|
608
|
+
|
609
|
+
// Tests the linkage of the IsSupersetOf matcher.
|
610
|
+
TEST(LinkTest, TestMatcherIsSupersetOf) {
|
611
|
+
Mock mock;
|
612
|
+
char arr[] = {'a', 'b'};
|
613
|
+
|
614
|
+
ON_CALL(mock, VoidFromVector(IsSupersetOf(arr))).WillByDefault(Return());
|
615
|
+
}
|
616
|
+
|
595
617
|
// Tests the linkage of the ContainerEq matcher.
|
596
618
|
TEST(LinkTest, TestMatcherContainerEq) {
|
597
619
|
Mock mock;
|
@@ -31,11 +31,11 @@
|
|
31
31
|
|
32
32
|
"""Tests the text output of Google C++ Mocking Framework.
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
To update the golden file:
|
35
|
+
gmock_output_test.py --build_dir=BUILD/DIR --gengolden
|
36
|
+
# where BUILD/DIR contains the built gmock_output_test_ file.
|
37
|
+
gmock_output_test.py --gengolden
|
38
|
+
gmock_output_test.py
|
39
39
|
"""
|
40
40
|
|
41
41
|
__author__ = 'wan@google.com (Zhanyong Wan)'
|
@@ -176,5 +176,8 @@ if __name__ == '__main__':
|
|
176
176
|
golden_file = open(GOLDEN_PATH, 'wb')
|
177
177
|
golden_file.write(output)
|
178
178
|
golden_file.close()
|
179
|
+
# Suppress the error "googletest was imported but a call to its main()
|
180
|
+
# was never detected."
|
181
|
+
os._exit(0)
|
179
182
|
else:
|
180
183
|
gmock_test_utils.Main()
|
@@ -39,6 +39,12 @@
|
|
39
39
|
|
40
40
|
#include "gtest/gtest.h"
|
41
41
|
|
42
|
+
// Silence C4100 (unreferenced formal parameter)
|
43
|
+
#ifdef _MSC_VER
|
44
|
+
# pragma warning(push)
|
45
|
+
# pragma warning(disable:4100)
|
46
|
+
#endif
|
47
|
+
|
42
48
|
using testing::_;
|
43
49
|
using testing::AnyNumber;
|
44
50
|
using testing::Ge;
|
@@ -47,6 +53,7 @@ using testing::NaggyMock;
|
|
47
53
|
using testing::Ref;
|
48
54
|
using testing::Return;
|
49
55
|
using testing::Sequence;
|
56
|
+
using testing::Value;
|
50
57
|
|
51
58
|
class MockFoo {
|
52
59
|
public:
|
@@ -268,6 +275,15 @@ TEST_F(GMockOutputTest, CatchesLeakedMocks) {
|
|
268
275
|
// Both foo1 and foo2 are deliberately leaked.
|
269
276
|
}
|
270
277
|
|
278
|
+
MATCHER_P2(IsPair, first, second, "") {
|
279
|
+
return Value(arg.first, first) && Value(arg.second, second);
|
280
|
+
}
|
281
|
+
|
282
|
+
TEST_F(GMockOutputTest, PrintsMatcher) {
|
283
|
+
const testing::Matcher<int> m1 = Ge(48);
|
284
|
+
EXPECT_THAT((std::pair<int, bool>(42, true)), IsPair(m1, true));
|
285
|
+
}
|
286
|
+
|
271
287
|
void TestCatchesLeakedMocksInAdHocTests() {
|
272
288
|
MockFoo* foo = new MockFoo;
|
273
289
|
|
@@ -280,7 +296,6 @@ void TestCatchesLeakedMocksInAdHocTests() {
|
|
280
296
|
|
281
297
|
int main(int argc, char **argv) {
|
282
298
|
testing::InitGoogleMock(&argc, argv);
|
283
|
-
|
284
299
|
// Ensures that the tests pass no matter what value of
|
285
300
|
// --gmock_catch_leaked_mocks and --gmock_verbose the user specifies.
|
286
301
|
testing::GMOCK_FLAG(catch_leaked_mocks) = true;
|
@@ -289,3 +304,7 @@ int main(int argc, char **argv) {
|
|
289
304
|
TestCatchesLeakedMocksInAdHocTests();
|
290
305
|
return RUN_ALL_TESTS();
|
291
306
|
}
|
307
|
+
|
308
|
+
#ifdef _MSC_VER
|
309
|
+
# pragma warning(pop)
|
310
|
+
#endif
|
@@ -288,6 +288,12 @@ Stack trace:
|
|
288
288
|
[ OK ] GMockOutputTest.ExplicitActionsRunOutWithDefaultAction
|
289
289
|
[ RUN ] GMockOutputTest.CatchesLeakedMocks
|
290
290
|
[ OK ] GMockOutputTest.CatchesLeakedMocks
|
291
|
+
[ RUN ] GMockOutputTest.PrintsMatcher
|
292
|
+
FILE:#: Failure
|
293
|
+
Value of: (std::pair<int, bool>(42, true))
|
294
|
+
Expected: is pair (is >= 48, true)
|
295
|
+
Actual: (42, true) (of type std::pair<int, bool>)
|
296
|
+
[ FAILED ] GMockOutputTest.PrintsMatcher
|
291
297
|
[ FAILED ] GMockOutputTest.UnexpectedCall
|
292
298
|
[ FAILED ] GMockOutputTest.UnexpectedCallToVoidFunction
|
293
299
|
[ FAILED ] GMockOutputTest.ExcessiveCall
|
@@ -302,9 +308,10 @@ Stack trace:
|
|
302
308
|
[ FAILED ] GMockOutputTest.MismatchArgumentsAndWith
|
303
309
|
[ FAILED ] GMockOutputTest.UnexpectedCallWithDefaultAction
|
304
310
|
[ FAILED ] GMockOutputTest.ExcessiveCallWithDefaultAction
|
311
|
+
[ FAILED ] GMockOutputTest.PrintsMatcher
|
305
312
|
|
306
313
|
|
307
314
|
FILE:#: ERROR: this mock object should be deleted but never is. Its address is @0x#.
|
308
315
|
FILE:#: ERROR: this mock object should be deleted but never is. Its address is @0x#.
|
309
316
|
FILE:#: ERROR: this mock object should be deleted but never is. Its address is @0x#.
|
310
|
-
ERROR: 3 leaked mock objects found at program exit.
|
317
|
+
ERROR: 3 leaked mock objects found at program exit. Expectations on a mock object is verified when the object is destructed. Leaking a mock means that its expectations aren't verified, which is usually a test bug. If you really intend to leak a mock, you can suppress this error using testing::Mock::AllowLeak(mock_object), or you may use a fake or stub instead of a mock.
|
@@ -33,12 +33,13 @@
|
|
33
33
|
// threads concurrently.
|
34
34
|
|
35
35
|
#include "gmock/gmock.h"
|
36
|
+
|
36
37
|
#include "gtest/gtest.h"
|
37
38
|
|
38
39
|
namespace testing {
|
39
40
|
namespace {
|
40
41
|
|
41
|
-
// From
|
42
|
+
// From "gtest/internal/gtest-port.h".
|
42
43
|
using ::testing::internal::ThreadWithParam;
|
43
44
|
|
44
45
|
// The maximum number of test threads (not including helper threads)
|
@@ -51,7 +52,7 @@ const int kRepeat = 50;
|
|
51
52
|
class MockFoo {
|
52
53
|
public:
|
53
54
|
MOCK_METHOD1(Bar, int(int n)); // NOLINT
|
54
|
-
MOCK_METHOD2(Baz, char(const char* s1, const
|
55
|
+
MOCK_METHOD2(Baz, char(const char* s1, const std::string& s2)); // NOLINT
|
55
56
|
};
|
56
57
|
|
57
58
|
// Helper for waiting for the given thread to finish and then deleting it.
|
@@ -37,9 +37,11 @@
|
|
37
37
|
|
38
38
|
#include <string>
|
39
39
|
#include "gtest/gtest.h"
|
40
|
+
#include "gtest/internal/custom/gtest.h"
|
40
41
|
|
41
42
|
#if !defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
|
42
43
|
|
44
|
+
using testing::GMOCK_FLAG(default_mock_behavior);
|
43
45
|
using testing::GMOCK_FLAG(verbose);
|
44
46
|
using testing::InitGoogleMock;
|
45
47
|
|
@@ -50,9 +52,9 @@ void TestInitGoogleMock(const Char* (&argv)[M], const Char* (&new_argv)[N],
|
|
50
52
|
const ::std::string& expected_gmock_verbose) {
|
51
53
|
const ::std::string old_verbose = GMOCK_FLAG(verbose);
|
52
54
|
|
53
|
-
int argc = M;
|
55
|
+
int argc = M - 1;
|
54
56
|
InitGoogleMock(&argc, const_cast<Char**>(argv));
|
55
|
-
ASSERT_EQ(N, argc) << "The new argv has wrong number of elements.";
|
57
|
+
ASSERT_EQ(N - 1, argc) << "The new argv has wrong number of elements.";
|
56
58
|
|
57
59
|
for (int i = 0; i < N; i++) {
|
58
60
|
EXPECT_STREQ(new_argv[i], argv[i]);
|
@@ -103,6 +105,26 @@ TEST(InitGoogleMockTest, ParsesSingleFlag) {
|
|
103
105
|
TestInitGoogleMock(argv, new_argv, "info");
|
104
106
|
}
|
105
107
|
|
108
|
+
TEST(InitGoogleMockTest, ParsesMultipleFlags) {
|
109
|
+
int old_default_behavior = GMOCK_FLAG(default_mock_behavior);
|
110
|
+
const wchar_t* argv[] = {
|
111
|
+
L"foo.exe",
|
112
|
+
L"--gmock_verbose=info",
|
113
|
+
L"--gmock_default_mock_behavior=2",
|
114
|
+
NULL
|
115
|
+
};
|
116
|
+
|
117
|
+
const wchar_t* new_argv[] = {
|
118
|
+
L"foo.exe",
|
119
|
+
NULL
|
120
|
+
};
|
121
|
+
|
122
|
+
TestInitGoogleMock(argv, new_argv, "info");
|
123
|
+
EXPECT_EQ(2, GMOCK_FLAG(default_mock_behavior));
|
124
|
+
EXPECT_NE(2, old_default_behavior);
|
125
|
+
GMOCK_FLAG(default_mock_behavior) = old_default_behavior;
|
126
|
+
}
|
127
|
+
|
106
128
|
TEST(InitGoogleMockTest, ParsesUnrecognizedFlag) {
|
107
129
|
const char* argv[] = {
|
108
130
|
"foo.exe",
|
@@ -177,6 +199,26 @@ TEST(WideInitGoogleMockTest, ParsesSingleFlag) {
|
|
177
199
|
TestInitGoogleMock(argv, new_argv, "info");
|
178
200
|
}
|
179
201
|
|
202
|
+
TEST(WideInitGoogleMockTest, ParsesMultipleFlags) {
|
203
|
+
int old_default_behavior = GMOCK_FLAG(default_mock_behavior);
|
204
|
+
const wchar_t* argv[] = {
|
205
|
+
L"foo.exe",
|
206
|
+
L"--gmock_verbose=info",
|
207
|
+
L"--gmock_default_mock_behavior=2",
|
208
|
+
NULL
|
209
|
+
};
|
210
|
+
|
211
|
+
const wchar_t* new_argv[] = {
|
212
|
+
L"foo.exe",
|
213
|
+
NULL
|
214
|
+
};
|
215
|
+
|
216
|
+
TestInitGoogleMock(argv, new_argv, "info");
|
217
|
+
EXPECT_EQ(2, GMOCK_FLAG(default_mock_behavior));
|
218
|
+
EXPECT_NE(2, old_default_behavior);
|
219
|
+
GMOCK_FLAG(default_mock_behavior) = old_default_behavior;
|
220
|
+
}
|
221
|
+
|
180
222
|
TEST(WideInitGoogleMockTest, ParsesUnrecognizedFlag) {
|
181
223
|
const wchar_t* argv[] = {
|
182
224
|
L"foo.exe",
|