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
@@ -94,12 +94,12 @@ const char* Plus1(const char* s) { return s + 1; }
|
|
94
94
|
|
95
95
|
void VoidUnary(int /* n */) { g_done = true; }
|
96
96
|
|
97
|
-
bool ByConstRef(const string& s) { return s == "Hi"; }
|
97
|
+
bool ByConstRef(const std::string& s) { return s == "Hi"; }
|
98
98
|
|
99
99
|
const double g_double = 0;
|
100
100
|
bool ReferencesGlobalDouble(const double& x) { return &x == &g_double; }
|
101
101
|
|
102
|
-
string ByNonConstRef(string& s) { return s += "+"; } // NOLINT
|
102
|
+
std::string ByNonConstRef(std::string& s) { return s += "+"; } // NOLINT
|
103
103
|
|
104
104
|
struct UnaryFunctor {
|
105
105
|
int operator()(bool x) { return x ? 1 : -1; }
|
@@ -119,9 +119,9 @@ int SumOfFirst2(int a, int b, Unused, Unused) { return a + b; }
|
|
119
119
|
|
120
120
|
void VoidFunctionWithFourArguments(char, int, float, double) { g_done = true; }
|
121
121
|
|
122
|
-
string Concat4(const char* s1, const char* s2, const char* s3,
|
123
|
-
|
124
|
-
return string(s1) + s2 + s3 + s4;
|
122
|
+
std::string Concat4(const char* s1, const char* s2, const char* s3,
|
123
|
+
const char* s4) {
|
124
|
+
return std::string(s1) + s2 + s3 + s4;
|
125
125
|
}
|
126
126
|
|
127
127
|
int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; }
|
@@ -132,9 +132,9 @@ struct SumOf5Functor {
|
|
132
132
|
}
|
133
133
|
};
|
134
134
|
|
135
|
-
string Concat5(const char* s1, const char* s2, const char* s3,
|
136
|
-
|
137
|
-
return string(s1) + s2 + s3 + s4 + s5;
|
135
|
+
std::string Concat5(const char* s1, const char* s2, const char* s3,
|
136
|
+
const char* s4, const char* s5) {
|
137
|
+
return std::string(s1) + s2 + s3 + s4 + s5;
|
138
138
|
}
|
139
139
|
|
140
140
|
int SumOf6(int a, int b, int c, int d, int e, int f) {
|
@@ -147,34 +147,34 @@ struct SumOf6Functor {
|
|
147
147
|
}
|
148
148
|
};
|
149
149
|
|
150
|
-
string Concat6(const char* s1, const char* s2, const char* s3,
|
151
|
-
|
152
|
-
return string(s1) + s2 + s3 + s4 + s5 + s6;
|
150
|
+
std::string Concat6(const char* s1, const char* s2, const char* s3,
|
151
|
+
const char* s4, const char* s5, const char* s6) {
|
152
|
+
return std::string(s1) + s2 + s3 + s4 + s5 + s6;
|
153
153
|
}
|
154
154
|
|
155
|
-
string Concat7(const char* s1, const char* s2, const char* s3,
|
156
|
-
|
157
|
-
|
158
|
-
return string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
|
155
|
+
std::string Concat7(const char* s1, const char* s2, const char* s3,
|
156
|
+
const char* s4, const char* s5, const char* s6,
|
157
|
+
const char* s7) {
|
158
|
+
return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
|
159
159
|
}
|
160
160
|
|
161
|
-
string Concat8(const char* s1, const char* s2, const char* s3,
|
162
|
-
|
163
|
-
|
164
|
-
return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
|
161
|
+
std::string Concat8(const char* s1, const char* s2, const char* s3,
|
162
|
+
const char* s4, const char* s5, const char* s6,
|
163
|
+
const char* s7, const char* s8) {
|
164
|
+
return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
|
165
165
|
}
|
166
166
|
|
167
|
-
string Concat9(const char* s1, const char* s2, const char* s3,
|
168
|
-
|
169
|
-
|
170
|
-
return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
|
167
|
+
std::string Concat9(const char* s1, const char* s2, const char* s3,
|
168
|
+
const char* s4, const char* s5, const char* s6,
|
169
|
+
const char* s7, const char* s8, const char* s9) {
|
170
|
+
return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
|
171
171
|
}
|
172
172
|
|
173
|
-
string Concat10(const char* s1, const char* s2, const char* s3,
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
|
173
|
+
std::string Concat10(const char* s1, const char* s2, const char* s3,
|
174
|
+
const char* s4, const char* s5, const char* s6,
|
175
|
+
const char* s7, const char* s8, const char* s9,
|
176
|
+
const char* s10) {
|
177
|
+
return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
|
178
178
|
}
|
179
179
|
|
180
180
|
class Foo {
|
@@ -185,7 +185,7 @@ class Foo {
|
|
185
185
|
|
186
186
|
short Unary(long x) { return static_cast<short>(value_ + x); } // NOLINT
|
187
187
|
|
188
|
-
string Binary(const string& str, char c) const { return str + c; }
|
188
|
+
std::string Binary(const std::string& str, char c) const { return str + c; }
|
189
189
|
|
190
190
|
int Ternary(int x, bool y, char z) { return value_ + x + y*z; }
|
191
191
|
|
@@ -201,29 +201,29 @@ class Foo {
|
|
201
201
|
return a + b + c + d + e + f;
|
202
202
|
}
|
203
203
|
|
204
|
-
string Concat7(const char* s1, const char* s2, const char* s3,
|
205
|
-
|
206
|
-
|
207
|
-
return string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
|
204
|
+
std::string Concat7(const char* s1, const char* s2, const char* s3,
|
205
|
+
const char* s4, const char* s5, const char* s6,
|
206
|
+
const char* s7) {
|
207
|
+
return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
|
208
208
|
}
|
209
209
|
|
210
|
-
string Concat8(const char* s1, const char* s2, const char* s3,
|
211
|
-
|
212
|
-
|
213
|
-
return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
|
210
|
+
std::string Concat8(const char* s1, const char* s2, const char* s3,
|
211
|
+
const char* s4, const char* s5, const char* s6,
|
212
|
+
const char* s7, const char* s8) {
|
213
|
+
return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
|
214
214
|
}
|
215
215
|
|
216
|
-
string Concat9(const char* s1, const char* s2, const char* s3,
|
217
|
-
|
218
|
-
|
219
|
-
return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
|
216
|
+
std::string Concat9(const char* s1, const char* s2, const char* s3,
|
217
|
+
const char* s4, const char* s5, const char* s6,
|
218
|
+
const char* s7, const char* s8, const char* s9) {
|
219
|
+
return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
|
220
220
|
}
|
221
221
|
|
222
|
-
string Concat10(const char* s1, const char* s2, const char* s3,
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
|
222
|
+
std::string Concat10(const char* s1, const char* s2, const char* s3,
|
223
|
+
const char* s4, const char* s5, const char* s6,
|
224
|
+
const char* s7, const char* s8, const char* s9,
|
225
|
+
const char* s10) {
|
226
|
+
return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
|
227
227
|
}
|
228
228
|
|
229
229
|
private:
|
@@ -280,9 +280,9 @@ inline const char* CharPtr(const char* s) { return s; }
|
|
280
280
|
|
281
281
|
// Tests using Invoke() with a 7-argument function.
|
282
282
|
TEST(InvokeTest, FunctionThatTakes7Arguments) {
|
283
|
-
Action<string(const char*, const char*, const char*, const char*,
|
284
|
-
|
285
|
-
Invoke(Concat7);
|
283
|
+
Action<std::string(const char*, const char*, const char*, const char*,
|
284
|
+
const char*, const char*, const char*)>
|
285
|
+
a = Invoke(Concat7);
|
286
286
|
EXPECT_EQ("1234567",
|
287
287
|
a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
|
288
288
|
CharPtr("4"), CharPtr("5"), CharPtr("6"),
|
@@ -291,9 +291,9 @@ TEST(InvokeTest, FunctionThatTakes7Arguments) {
|
|
291
291
|
|
292
292
|
// Tests using Invoke() with a 8-argument function.
|
293
293
|
TEST(InvokeTest, FunctionThatTakes8Arguments) {
|
294
|
-
Action<string(const char*, const char*, const char*, const char*,
|
295
|
-
|
296
|
-
Invoke(Concat8);
|
294
|
+
Action<std::string(const char*, const char*, const char*, const char*,
|
295
|
+
const char*, const char*, const char*, const char*)>
|
296
|
+
a = Invoke(Concat8);
|
297
297
|
EXPECT_EQ("12345678",
|
298
298
|
a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
|
299
299
|
CharPtr("4"), CharPtr("5"), CharPtr("6"),
|
@@ -302,9 +302,10 @@ TEST(InvokeTest, FunctionThatTakes8Arguments) {
|
|
302
302
|
|
303
303
|
// Tests using Invoke() with a 9-argument function.
|
304
304
|
TEST(InvokeTest, FunctionThatTakes9Arguments) {
|
305
|
-
Action<string(const char*, const char*, const char*, const char*,
|
306
|
-
|
307
|
-
|
305
|
+
Action<std::string(const char*, const char*, const char*, const char*,
|
306
|
+
const char*, const char*, const char*, const char*,
|
307
|
+
const char*)>
|
308
|
+
a = Invoke(Concat9);
|
308
309
|
EXPECT_EQ("123456789",
|
309
310
|
a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
|
310
311
|
CharPtr("4"), CharPtr("5"), CharPtr("6"),
|
@@ -313,9 +314,10 @@ TEST(InvokeTest, FunctionThatTakes9Arguments) {
|
|
313
314
|
|
314
315
|
// Tests using Invoke() with a 10-argument function.
|
315
316
|
TEST(InvokeTest, FunctionThatTakes10Arguments) {
|
316
|
-
Action<string(const char*, const char*, const char*, const char*,
|
317
|
-
|
318
|
-
|
317
|
+
Action<std::string(const char*, const char*, const char*, const char*,
|
318
|
+
const char*, const char*, const char*, const char*,
|
319
|
+
const char*, const char*)>
|
320
|
+
a = Invoke(Concat10);
|
319
321
|
EXPECT_EQ("1234567890",
|
320
322
|
a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
|
321
323
|
CharPtr("4"), CharPtr("5"), CharPtr("6"),
|
@@ -325,11 +327,10 @@ TEST(InvokeTest, FunctionThatTakes10Arguments) {
|
|
325
327
|
|
326
328
|
// Tests using Invoke() with functions with parameters declared as Unused.
|
327
329
|
TEST(InvokeTest, FunctionWithUnusedParameters) {
|
328
|
-
Action<int(int, int, double, const string&)> a1 =
|
329
|
-
|
330
|
-
|
331
|
-
EXPECT_EQ(12, a1.Perform(
|
332
|
-
tuple<int, int, double, const string&>(10, 2, 5.6, s)));
|
330
|
+
Action<int(int, int, double, const std::string&)> a1 = Invoke(SumOfFirst2);
|
331
|
+
tuple<int, int, double, std::string> dummy =
|
332
|
+
make_tuple(10, 2, 5.6, std::string("hi"));
|
333
|
+
EXPECT_EQ(12, a1.Perform(dummy));
|
333
334
|
|
334
335
|
Action<int(int, int, bool, int*)> a2 =
|
335
336
|
Invoke(SumOfFirst2);
|
@@ -339,8 +340,7 @@ TEST(InvokeTest, FunctionWithUnusedParameters) {
|
|
339
340
|
// Tests using Invoke() with methods with parameters declared as Unused.
|
340
341
|
TEST(InvokeTest, MethodWithUnusedParameters) {
|
341
342
|
Foo foo;
|
342
|
-
Action<int(string, bool, int, int)> a1 =
|
343
|
-
Invoke(&foo, &Foo::SumOfLast2);
|
343
|
+
Action<int(std::string, bool, int, int)> a1 = Invoke(&foo, &Foo::SumOfLast2);
|
344
344
|
EXPECT_EQ(12, a1.Perform(make_tuple(CharPtr("hi"), true, 10, 2)));
|
345
345
|
|
346
346
|
Action<int(char, double, int, int)> a2 =
|
@@ -379,10 +379,10 @@ TEST(InvokeMethodTest, Unary) {
|
|
379
379
|
// Tests using Invoke() with a binary method.
|
380
380
|
TEST(InvokeMethodTest, Binary) {
|
381
381
|
Foo foo;
|
382
|
-
Action<string(const string&, char)> a = Invoke(&foo, &Foo::Binary);
|
383
|
-
string s("Hell");
|
384
|
-
|
385
|
-
|
382
|
+
Action<std::string(const std::string&, char)> a = Invoke(&foo, &Foo::Binary);
|
383
|
+
std::string s("Hell");
|
384
|
+
tuple<std::string, char> dummy = make_tuple(s, 'o');
|
385
|
+
EXPECT_EQ("Hello", a.Perform(dummy));
|
386
386
|
}
|
387
387
|
|
388
388
|
// Tests using Invoke() with a ternary method.
|
@@ -417,9 +417,9 @@ TEST(InvokeMethodTest, MethodThatTakes6Arguments) {
|
|
417
417
|
// Tests using Invoke() with a 7-argument method.
|
418
418
|
TEST(InvokeMethodTest, MethodThatTakes7Arguments) {
|
419
419
|
Foo foo;
|
420
|
-
Action<string(const char*, const char*, const char*, const char*,
|
421
|
-
|
422
|
-
Invoke(&foo, &Foo::Concat7);
|
420
|
+
Action<std::string(const char*, const char*, const char*, const char*,
|
421
|
+
const char*, const char*, const char*)>
|
422
|
+
a = Invoke(&foo, &Foo::Concat7);
|
423
423
|
EXPECT_EQ("1234567",
|
424
424
|
a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
|
425
425
|
CharPtr("4"), CharPtr("5"), CharPtr("6"),
|
@@ -429,9 +429,9 @@ TEST(InvokeMethodTest, MethodThatTakes7Arguments) {
|
|
429
429
|
// Tests using Invoke() with a 8-argument method.
|
430
430
|
TEST(InvokeMethodTest, MethodThatTakes8Arguments) {
|
431
431
|
Foo foo;
|
432
|
-
Action<string(const char*, const char*, const char*, const char*,
|
433
|
-
|
434
|
-
Invoke(&foo, &Foo::Concat8);
|
432
|
+
Action<std::string(const char*, const char*, const char*, const char*,
|
433
|
+
const char*, const char*, const char*, const char*)>
|
434
|
+
a = Invoke(&foo, &Foo::Concat8);
|
435
435
|
EXPECT_EQ("12345678",
|
436
436
|
a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
|
437
437
|
CharPtr("4"), CharPtr("5"), CharPtr("6"),
|
@@ -441,9 +441,10 @@ TEST(InvokeMethodTest, MethodThatTakes8Arguments) {
|
|
441
441
|
// Tests using Invoke() with a 9-argument method.
|
442
442
|
TEST(InvokeMethodTest, MethodThatTakes9Arguments) {
|
443
443
|
Foo foo;
|
444
|
-
Action<string(const char*, const char*, const char*, const char*,
|
445
|
-
|
446
|
-
|
444
|
+
Action<std::string(const char*, const char*, const char*, const char*,
|
445
|
+
const char*, const char*, const char*, const char*,
|
446
|
+
const char*)>
|
447
|
+
a = Invoke(&foo, &Foo::Concat9);
|
447
448
|
EXPECT_EQ("123456789",
|
448
449
|
a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
|
449
450
|
CharPtr("4"), CharPtr("5"), CharPtr("6"),
|
@@ -453,9 +454,10 @@ TEST(InvokeMethodTest, MethodThatTakes9Arguments) {
|
|
453
454
|
// Tests using Invoke() with a 10-argument method.
|
454
455
|
TEST(InvokeMethodTest, MethodThatTakes10Arguments) {
|
455
456
|
Foo foo;
|
456
|
-
Action<string(const char*, const char*, const char*, const char*,
|
457
|
-
|
458
|
-
|
457
|
+
Action<std::string(const char*, const char*, const char*, const char*,
|
458
|
+
const char*, const char*, const char*, const char*,
|
459
|
+
const char*, const char*)>
|
460
|
+
a = Invoke(&foo, &Foo::Concat10);
|
459
461
|
EXPECT_EQ("1234567890",
|
460
462
|
a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
|
461
463
|
CharPtr("4"), CharPtr("5"), CharPtr("6"),
|
@@ -495,8 +497,8 @@ TEST(ReturnArgActionTest, WorksForMultiArgBoolArg0) {
|
|
495
497
|
}
|
496
498
|
|
497
499
|
TEST(ReturnArgActionTest, WorksForMultiArgStringArg2) {
|
498
|
-
const Action<string(int, int, string, int)> a = ReturnArg<2>();
|
499
|
-
EXPECT_EQ("seven", a.Perform(make_tuple(5, 6, string("seven"), 8)));
|
500
|
+
const Action<std::string(int, int, std::string, int)> a = ReturnArg<2>();
|
501
|
+
EXPECT_EQ("seven", a.Perform(make_tuple(5, 6, std::string("seven"), 8)));
|
500
502
|
}
|
501
503
|
|
502
504
|
TEST(SaveArgActionTest, WorksForSameType) {
|
@@ -32,9 +32,10 @@
|
|
32
32
|
#include "gmock/gmock-generated-nice-strict.h"
|
33
33
|
|
34
34
|
#include <string>
|
35
|
+
#include <utility>
|
35
36
|
#include "gmock/gmock.h"
|
36
|
-
#include "gtest/gtest.h"
|
37
37
|
#include "gtest/gtest-spi.h"
|
38
|
+
#include "gtest/gtest.h"
|
38
39
|
|
39
40
|
// This must not be defined inside the ::testing namespace, or it will
|
40
41
|
// clash with ::testing::Mock.
|
@@ -51,7 +52,6 @@ class Mock {
|
|
51
52
|
namespace testing {
|
52
53
|
namespace gmock_nice_strict_test {
|
53
54
|
|
54
|
-
using testing::internal::string;
|
55
55
|
using testing::GMOCK_FLAG(verbose);
|
56
56
|
using testing::HasSubstr;
|
57
57
|
using testing::NaggyMock;
|
@@ -63,6 +63,12 @@ using testing::internal::CaptureStdout;
|
|
63
63
|
using testing::internal::GetCapturedStdout;
|
64
64
|
#endif
|
65
65
|
|
66
|
+
// Class without default constructor.
|
67
|
+
class NotDefaultConstructible {
|
68
|
+
public:
|
69
|
+
explicit NotDefaultConstructible(int) {}
|
70
|
+
};
|
71
|
+
|
66
72
|
// Defines some mock classes needed by the tests.
|
67
73
|
|
68
74
|
class Foo {
|
@@ -80,6 +86,7 @@ class MockFoo : public Foo {
|
|
80
86
|
|
81
87
|
MOCK_METHOD0(DoThis, void());
|
82
88
|
MOCK_METHOD1(DoThat, int(bool flag));
|
89
|
+
MOCK_METHOD0(ReturnNonDefaultConstructible, NotDefaultConstructible());
|
83
90
|
|
84
91
|
private:
|
85
92
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo);
|
@@ -87,32 +94,50 @@ class MockFoo : public Foo {
|
|
87
94
|
|
88
95
|
class MockBar {
|
89
96
|
public:
|
90
|
-
explicit MockBar(const string& s) : str_(s) {}
|
97
|
+
explicit MockBar(const std::string& s) : str_(s) {}
|
91
98
|
|
92
|
-
MockBar(char a1, char a2, string a3, string a4, int a5, int a6,
|
93
|
-
const string& a7, const string& a8, bool a9, bool a10) {
|
94
|
-
str_ = string() + a1 + a2 + a3 + a4 + static_cast<char>(a5) +
|
99
|
+
MockBar(char a1, char a2, std::string a3, std::string a4, int a5, int a6,
|
100
|
+
const std::string& a7, const std::string& a8, bool a9, bool a10) {
|
101
|
+
str_ = std::string() + a1 + a2 + a3 + a4 + static_cast<char>(a5) +
|
95
102
|
static_cast<char>(a6) + a7 + a8 + (a9 ? 'T' : 'F') + (a10 ? 'T' : 'F');
|
96
103
|
}
|
97
104
|
|
98
105
|
virtual ~MockBar() {}
|
99
106
|
|
100
|
-
const string& str() const { return str_; }
|
107
|
+
const std::string& str() const { return str_; }
|
101
108
|
|
102
109
|
MOCK_METHOD0(This, int());
|
103
|
-
MOCK_METHOD2(That, string(int, bool));
|
110
|
+
MOCK_METHOD2(That, std::string(int, bool));
|
104
111
|
|
105
112
|
private:
|
106
|
-
string str_;
|
113
|
+
std::string str_;
|
107
114
|
|
108
115
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockBar);
|
109
116
|
};
|
110
117
|
|
118
|
+
#if GTEST_GTEST_LANG_CXX11
|
119
|
+
|
120
|
+
class MockBaz {
|
121
|
+
public:
|
122
|
+
class MoveOnly {
|
123
|
+
MoveOnly() = default;
|
124
|
+
|
125
|
+
MoveOnly(const MoveOnly&) = delete;
|
126
|
+
operator=(const MoveOnly&) = delete;
|
127
|
+
|
128
|
+
MoveOnly(MoveOnly&&) = default;
|
129
|
+
operator=(MoveOnly&&) = default;
|
130
|
+
};
|
131
|
+
|
132
|
+
MockBaz(MoveOnly) {}
|
133
|
+
}
|
134
|
+
#endif // GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
|
135
|
+
|
111
136
|
#if GTEST_HAS_STREAM_REDIRECTION
|
112
137
|
|
113
138
|
// Tests that a raw mock generates warnings for uninteresting calls.
|
114
139
|
TEST(RawMockTest, WarningForUninterestingCall) {
|
115
|
-
const string saved_flag = GMOCK_FLAG(verbose);
|
140
|
+
const std::string saved_flag = GMOCK_FLAG(verbose);
|
116
141
|
GMOCK_FLAG(verbose) = "warning";
|
117
142
|
|
118
143
|
MockFoo raw_foo;
|
@@ -129,7 +154,7 @@ TEST(RawMockTest, WarningForUninterestingCall) {
|
|
129
154
|
// Tests that a raw mock generates warnings for uninteresting calls
|
130
155
|
// that delete the mock object.
|
131
156
|
TEST(RawMockTest, WarningForUninterestingCallAfterDeath) {
|
132
|
-
const string saved_flag = GMOCK_FLAG(verbose);
|
157
|
+
const std::string saved_flag = GMOCK_FLAG(verbose);
|
133
158
|
GMOCK_FLAG(verbose) = "warning";
|
134
159
|
|
135
160
|
MockFoo* const raw_foo = new MockFoo;
|
@@ -150,7 +175,7 @@ TEST(RawMockTest, WarningForUninterestingCallAfterDeath) {
|
|
150
175
|
TEST(RawMockTest, InfoForUninterestingCall) {
|
151
176
|
MockFoo raw_foo;
|
152
177
|
|
153
|
-
const string saved_flag = GMOCK_FLAG(verbose);
|
178
|
+
const std::string saved_flag = GMOCK_FLAG(verbose);
|
154
179
|
GMOCK_FLAG(verbose) = "info";
|
155
180
|
CaptureStdout();
|
156
181
|
raw_foo.DoThis();
|
@@ -188,7 +213,7 @@ TEST(NiceMockTest, NoWarningForUninterestingCallAfterDeath) {
|
|
188
213
|
TEST(NiceMockTest, InfoForUninterestingCall) {
|
189
214
|
NiceMock<MockFoo> nice_foo;
|
190
215
|
|
191
|
-
const string saved_flag = GMOCK_FLAG(verbose);
|
216
|
+
const std::string saved_flag = GMOCK_FLAG(verbose);
|
192
217
|
GMOCK_FLAG(verbose) = "info";
|
193
218
|
CaptureStdout();
|
194
219
|
nice_foo.DoThis();
|
@@ -208,6 +233,23 @@ TEST(NiceMockTest, AllowsExpectedCall) {
|
|
208
233
|
nice_foo.DoThis();
|
209
234
|
}
|
210
235
|
|
236
|
+
// Tests that an unexpected call on a nice mock which returns a
|
237
|
+
// not-default-constructible type throws an exception and the exception contains
|
238
|
+
// the method's name.
|
239
|
+
TEST(NiceMockTest, ThrowsExceptionForUnknownReturnTypes) {
|
240
|
+
NiceMock<MockFoo> nice_foo;
|
241
|
+
#if GTEST_HAS_EXCEPTIONS
|
242
|
+
try {
|
243
|
+
nice_foo.ReturnNonDefaultConstructible();
|
244
|
+
FAIL();
|
245
|
+
} catch (const std::runtime_error& ex) {
|
246
|
+
EXPECT_THAT(ex.what(), HasSubstr("ReturnNonDefaultConstructible"));
|
247
|
+
}
|
248
|
+
#else
|
249
|
+
EXPECT_DEATH_IF_SUPPORTED({ nice_foo.ReturnNonDefaultConstructible(); }, "");
|
250
|
+
#endif
|
251
|
+
}
|
252
|
+
|
211
253
|
// Tests that an unexpected call on a nice mock fails.
|
212
254
|
TEST(NiceMockTest, UnexpectedCallFails) {
|
213
255
|
NiceMock<MockFoo> nice_foo;
|
@@ -237,6 +279,21 @@ TEST(NiceMockTest, NonDefaultConstructor10) {
|
|
237
279
|
nice_bar.That(5, true);
|
238
280
|
}
|
239
281
|
|
282
|
+
TEST(NiceMockTest, AllowLeak) {
|
283
|
+
NiceMock<MockFoo>* leaked = new NiceMock<MockFoo>;
|
284
|
+
Mock::AllowLeak(leaked);
|
285
|
+
EXPECT_CALL(*leaked, DoThis());
|
286
|
+
leaked->DoThis();
|
287
|
+
}
|
288
|
+
|
289
|
+
#if GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
|
290
|
+
|
291
|
+
TEST(NiceMockTest, MoveOnlyConstructor) {
|
292
|
+
NiceMock<MockBaz> nice_baz(MockBaz::MoveOnly());
|
293
|
+
}
|
294
|
+
|
295
|
+
#endif // GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
|
296
|
+
|
240
297
|
#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
|
241
298
|
// Tests that NiceMock<Mock> compiles where Mock is a user-defined
|
242
299
|
// class (as opposed to ::testing::Mock). We had to work around an
|
@@ -257,7 +314,7 @@ TEST(NiceMockTest, AcceptsClassNamedMock) {
|
|
257
314
|
|
258
315
|
// Tests that a naggy mock generates warnings for uninteresting calls.
|
259
316
|
TEST(NaggyMockTest, WarningForUninterestingCall) {
|
260
|
-
const string saved_flag = GMOCK_FLAG(verbose);
|
317
|
+
const std::string saved_flag = GMOCK_FLAG(verbose);
|
261
318
|
GMOCK_FLAG(verbose) = "warning";
|
262
319
|
|
263
320
|
NaggyMock<MockFoo> naggy_foo;
|
@@ -274,7 +331,7 @@ TEST(NaggyMockTest, WarningForUninterestingCall) {
|
|
274
331
|
// Tests that a naggy mock generates a warning for an uninteresting call
|
275
332
|
// that deletes the mock object.
|
276
333
|
TEST(NaggyMockTest, WarningForUninterestingCallAfterDeath) {
|
277
|
-
const string saved_flag = GMOCK_FLAG(verbose);
|
334
|
+
const std::string saved_flag = GMOCK_FLAG(verbose);
|
278
335
|
GMOCK_FLAG(verbose) = "warning";
|
279
336
|
|
280
337
|
NaggyMock<MockFoo>* const naggy_foo = new NaggyMock<MockFoo>;
|
@@ -330,6 +387,21 @@ TEST(NaggyMockTest, NonDefaultConstructor10) {
|
|
330
387
|
naggy_bar.That(5, true);
|
331
388
|
}
|
332
389
|
|
390
|
+
TEST(NaggyMockTest, AllowLeak) {
|
391
|
+
NaggyMock<MockFoo>* leaked = new NaggyMock<MockFoo>;
|
392
|
+
Mock::AllowLeak(leaked);
|
393
|
+
EXPECT_CALL(*leaked, DoThis());
|
394
|
+
leaked->DoThis();
|
395
|
+
}
|
396
|
+
|
397
|
+
#if GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
|
398
|
+
|
399
|
+
TEST(NaggyMockTest, MoveOnlyConstructor) {
|
400
|
+
NaggyMock<MockBaz> naggy_baz(MockBaz::MoveOnly());
|
401
|
+
}
|
402
|
+
|
403
|
+
#endif // GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
|
404
|
+
|
333
405
|
#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
|
334
406
|
// Tests that NaggyMock<Mock> compiles where Mock is a user-defined
|
335
407
|
// class (as opposed to ::testing::Mock). We had to work around an
|
@@ -404,6 +476,21 @@ TEST(StrictMockTest, NonDefaultConstructor10) {
|
|
404
476
|
"Uninteresting mock function call");
|
405
477
|
}
|
406
478
|
|
479
|
+
TEST(StrictMockTest, AllowLeak) {
|
480
|
+
StrictMock<MockFoo>* leaked = new StrictMock<MockFoo>;
|
481
|
+
Mock::AllowLeak(leaked);
|
482
|
+
EXPECT_CALL(*leaked, DoThis());
|
483
|
+
leaked->DoThis();
|
484
|
+
}
|
485
|
+
|
486
|
+
#if GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
|
487
|
+
|
488
|
+
TEST(StrictMockTest, MoveOnlyConstructor) {
|
489
|
+
StrictMock<MockBaz> strict_baz(MockBaz::MoveOnly());
|
490
|
+
}
|
491
|
+
|
492
|
+
#endif // GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
|
493
|
+
|
407
494
|
#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
|
408
495
|
// Tests that StrictMock<Mock> compiles where Mock is a user-defined
|
409
496
|
// class (as opposed to ::testing::Mock). We had to work around an
|