rj_schema 0.2.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rj_schema/rapidjson/CMakeLists.txt +9 -4
- data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +10 -0
- data/ext/rj_schema/rapidjson/appveyor.yml +22 -9
- data/ext/rj_schema/rapidjson/bin/data/abcde.txt +1 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/address.json +139 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/allOf_address.json +7 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/anyOf_address.json +7 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/oneOf_address.json +7 -0
- data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +2 -2
- data/ext/rj_schema/rapidjson/doc/dom.md +1 -0
- data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +1 -0
- data/ext/rj_schema/rapidjson/doc/faq.md +3 -3
- data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +8 -8
- data/ext/rj_schema/rapidjson/doc/internals.md +1 -1
- data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +2 -2
- data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +1 -1
- data/ext/rj_schema/rapidjson/doc/sax.md +1 -1
- data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +2 -2
- data/ext/rj_schema/rapidjson/doc/stream.md +1 -1
- data/ext/rj_schema/rapidjson/doc/tutorial.md +1 -1
- data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +7 -6
- data/ext/rj_schema/rapidjson/example/CMakeLists.txt +1 -0
- data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +118 -0
- data/ext/rj_schema/rapidjson/example/sortkeys/sortkeys.cpp +62 -0
- data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +6 -6
- data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/document.h +124 -35
- data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +49 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +56 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/clzll.h +71 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +3 -17
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +20 -13
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +4 -3
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +50 -35
- data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +63 -5
- data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +63 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +67 -53
- data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +318 -164
- data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +10 -10
- data/ext/rj_schema/rapidjson/readme.md +51 -1
- data/ext/rj_schema/rapidjson/readme.zh-cn.md +2 -2
- data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/perftest/perftest.h +1 -1
- data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +2 -2
- data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +75 -1
- data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +1 -0
- data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/clzlltest.cpp +34 -0
- data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +19 -19
- data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +45 -2
- data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +10 -10
- data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +8 -8
- data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +157 -16
- data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +113 -75
- data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +2 -1
- data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +593 -78
- data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +5 -5
- data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/unittest.h +4 -1
- data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +12 -12
- data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/BUILD.bazel +175 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +18 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CONTRIBUTING.md +160 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/LICENSE +28 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/Makefile.am +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +16 -35
- data/ext/rj_schema/rapidjson/thirdparty/gtest/WORKSPACE +8 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/appveyor.yml +104 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-autotools.sh +44 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-bazel.sh +36 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-linux.sh +41 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-osx.sh +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/get-nprocessors.sh +48 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-linux.sh +49 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-osx.sh +39 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/log-config.sh +51 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/travis.sh +44 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/configure.ac +16 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +72 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +53 -42
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock.pc.in +9 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock_main.pc.in +9 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +4 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +6 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +117 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +7 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +20 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +83 -26
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +262 -68
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +45 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +650 -366
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +76 -20
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +308 -229
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +18 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +87 -26
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +33 -16
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +1209 -353
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +33 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +159 -88
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +3 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +16 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +71 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +7 -11
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +69 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +69 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +83 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +63 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +63 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +76 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +4 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +3 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +36 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +210 -135
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +108 -48
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +23 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/BUILD.bazel +123 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +166 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +64 -62
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +43 -18
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +11 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +91 -36
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +33 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +1286 -167
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +85 -83
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +102 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +136 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +24 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +8 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +20 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +8 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +3 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +44 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +5 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +40 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +60 -31
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +232 -171
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest.pc.in +9 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest_main.pc.in +10 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +54 -16
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Pkgconfig.md +146 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +6 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{AdvancedGuide.md → advanced.md} +260 -26
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{FAQ.md → faq.md} +62 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Primer.md → primer.md} +43 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Samples.md → samples.md} +0 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +53 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +30 -36
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +8 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +140 -51
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +2 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +4 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +126 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +6 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +8 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +6 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +4 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +13 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +98 -59
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +34 -41
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +3 -10
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +9 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +8 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +232 -99
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +3 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +17 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +17 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.sln +55 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj +149 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.sln +55 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj +149 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj +154 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj +162 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj +199 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters +26 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj +191 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters +26 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj +188 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj +180 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +6 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +7 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +5 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +3 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +10 -22
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +10 -10
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +226 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +5 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +21 -29
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +85 -67
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +93 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +1 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +1 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +622 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/BUILD.bazel +396 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +12 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +2 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +6 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +1 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +84 -29
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +1 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +11 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +165 -63
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +13 -13
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_assert_by_exception_test.cc +119 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +1 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +6 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +20 -18
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_outfiles_test.py +162 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_output_unittest.py +611 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_test_utils.py +60 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +4 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +11 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +17 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +104 -66
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +2 -19
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +12 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test.py +65 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test_.cc +44 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +4 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +240 -149
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +15 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +100 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +25 -23
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +4 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +47 -0
- data/ext/rj_schema/rapidjson/travis-doxygen.sh +13 -6
- data/ext/rj_schema/rj_schema.cpp +161 -17
- data/lib/rj_schema.rb +1 -1
- metadata +63 -58
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +0 -525
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +0 -3250
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +0 -11
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +0 -624
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +0 -534
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +0 -3342
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +0 -556
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +0 -3432
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +0 -2096
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +0 -886
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +0 -497
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +0 -2178
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +0 -1038
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +0 -501
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +0 -2181
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +0 -1082
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +0 -501
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +0 -129
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +0 -129
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +0 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +0 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
@@ -1,5 +1,5 @@
|
|
1
1
|
$$ -*- mode: c++; -*-
|
2
|
-
$$ This is a Pump source file.
|
2
|
+
$$ This is a Pump source file. Please use Pump to convert it to
|
3
3
|
$$ gmock-generated-actions.h.
|
4
4
|
$$
|
5
5
|
$var n = 10 $$ The maximum arity we support.
|
@@ -49,12 +49,13 @@ namespace testing {
|
|
49
49
|
namespace internal {
|
50
50
|
|
51
51
|
// InvokeHelper<F> knows how to unpack an N-tuple and invoke an N-ary
|
52
|
-
// function or
|
53
|
-
// type that takes N arguments.
|
52
|
+
// function, method, or callback with the unpacked values, where F is
|
53
|
+
// a function type that takes N arguments.
|
54
54
|
template <typename Result, typename ArgumentTuple>
|
55
55
|
class InvokeHelper;
|
56
56
|
|
57
57
|
|
58
|
+
$var max_callback_arity = 5
|
58
59
|
$range i 0..n
|
59
60
|
$for i [[
|
60
61
|
$range j 1..i
|
@@ -76,10 +77,48 @@ class InvokeHelper<R, ::testing::tuple<$as> > {
|
|
76
77
|
const ::testing::tuple<$as>&$args) {
|
77
78
|
return (obj_ptr->*method_ptr)($gets);
|
78
79
|
}
|
80
|
+
|
81
|
+
|
82
|
+
$if i <= max_callback_arity [[
|
83
|
+
template <typename CallbackType>
|
84
|
+
static R InvokeCallback(CallbackType* callback,
|
85
|
+
const ::testing::tuple<$as>&$args) {
|
86
|
+
return callback->Run($gets);
|
87
|
+
}
|
88
|
+
]] $else [[
|
89
|
+
// There is no InvokeCallback() for $i-tuples, as google3 callbacks
|
90
|
+
// support $max_callback_arity arguments at most.
|
91
|
+
]]
|
92
|
+
|
79
93
|
};
|
80
94
|
|
81
95
|
|
82
96
|
]]
|
97
|
+
// Implements the Invoke(callback) action.
|
98
|
+
template <typename CallbackType>
|
99
|
+
class InvokeCallbackAction {
|
100
|
+
public:
|
101
|
+
// The c'tor takes ownership of the callback.
|
102
|
+
explicit InvokeCallbackAction(CallbackType* callback)
|
103
|
+
: callback_(callback) {
|
104
|
+
callback->CheckIsRepeatable(); // Makes sure the callback is permanent.
|
105
|
+
}
|
106
|
+
|
107
|
+
// This type conversion operator template allows Invoke(callback) to
|
108
|
+
// be used wherever the callback's type is compatible with that of
|
109
|
+
// the mock function, i.e. if the mock function's arguments can be
|
110
|
+
// implicitly converted to the callback's arguments and the
|
111
|
+
// callback's result can be implicitly converted to the mock
|
112
|
+
// function's result.
|
113
|
+
template <typename Result, typename ArgumentTuple>
|
114
|
+
Result Perform(const ArgumentTuple& args) const {
|
115
|
+
return InvokeHelper<Result, ArgumentTuple>::InvokeCallback(
|
116
|
+
callback_.get(), args);
|
117
|
+
}
|
118
|
+
private:
|
119
|
+
const linked_ptr<CallbackType> callback_;
|
120
|
+
};
|
121
|
+
|
83
122
|
// An INTERNAL macro for extracting the type of a tuple field. It's
|
84
123
|
// subject to change without notice - DO NOT USE IN USER CODE!
|
85
124
|
#define GMOCK_FIELD_(Tuple, N) \
|
@@ -357,7 +396,7 @@ $range j2 2..i
|
|
357
396
|
// MORE INFORMATION:
|
358
397
|
//
|
359
398
|
// To learn more about using these macros, please search for 'ACTION'
|
360
|
-
// on
|
399
|
+
// on https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md
|
361
400
|
|
362
401
|
$range i 0..n
|
363
402
|
$range k 0..n-1
|
@@ -486,7 +525,7 @@ _VALUE_PARAMS($for j, [[p$j]]) $for j [[, typename p$j##_type]]
|
|
486
525
|
$for i [[
|
487
526
|
$range j 0..i-1
|
488
527
|
#define GMOCK_INTERNAL_INIT_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])\
|
489
|
-
($for j, [[p$j##_type gmock_p$j]])$if i>0 [[ : ]]$for j, [[p$j(gmock_p$j)]]
|
528
|
+
($for j, [[p$j##_type gmock_p$j]])$if i>0 [[ : ]]$for j, [[p$j(::testing::internal::move(gmock_p$j))]]
|
490
529
|
|
491
530
|
|
492
531
|
]]
|
@@ -619,7 +658,7 @@ $var class_name = [[name##Action[[$if i==0 [[]] $elif i==1 [[P]]
|
|
619
658
|
$range j 0..i-1
|
620
659
|
$var ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]]
|
621
660
|
$var param_types_and_names = [[$for j, [[p$j##_type p$j]]]]
|
622
|
-
$var inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(gmock_p$j)]]]]]]
|
661
|
+
$var inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(::testing::internal::forward<p$j##_type>(gmock_p$j))]]]]]]
|
623
662
|
$var param_field_decls = [[$for j
|
624
663
|
[[
|
625
664
|
|
@@ -68,8 +68,8 @@ class FunctionMocker<R()> : public
|
|
68
68
|
typedef R F();
|
69
69
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
70
70
|
|
71
|
-
MockSpec<F
|
72
|
-
return this
|
71
|
+
MockSpec<F> With() {
|
72
|
+
return MockSpec<F>(this, ::testing::make_tuple());
|
73
73
|
}
|
74
74
|
|
75
75
|
R Invoke() {
|
@@ -88,9 +88,8 @@ class FunctionMocker<R(A1)> : public
|
|
88
88
|
typedef R F(A1);
|
89
89
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
90
90
|
|
91
|
-
MockSpec<F
|
92
|
-
this
|
93
|
-
return this->current_spec();
|
91
|
+
MockSpec<F> With(const Matcher<A1>& m1) {
|
92
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1));
|
94
93
|
}
|
95
94
|
|
96
95
|
R Invoke(A1 a1) {
|
@@ -98,7 +97,7 @@ class FunctionMocker<R(A1)> : public
|
|
98
97
|
// by the C++ standard [14.6.4] here, as the base class type is
|
99
98
|
// dependent on the template argument (and thus shouldn't be
|
100
99
|
// looked into when resolving InvokeWith).
|
101
|
-
return this->InvokeWith(ArgumentTuple(a1));
|
100
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1)));
|
102
101
|
}
|
103
102
|
};
|
104
103
|
|
@@ -109,9 +108,8 @@ class FunctionMocker<R(A1, A2)> : public
|
|
109
108
|
typedef R F(A1, A2);
|
110
109
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
111
110
|
|
112
|
-
MockSpec<F
|
113
|
-
this
|
114
|
-
return this->current_spec();
|
111
|
+
MockSpec<F> With(const Matcher<A1>& m1, const Matcher<A2>& m2) {
|
112
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1, m2));
|
115
113
|
}
|
116
114
|
|
117
115
|
R Invoke(A1 a1, A2 a2) {
|
@@ -119,7 +117,8 @@ class FunctionMocker<R(A1, A2)> : public
|
|
119
117
|
// by the C++ standard [14.6.4] here, as the base class type is
|
120
118
|
// dependent on the template argument (and thus shouldn't be
|
121
119
|
// looked into when resolving InvokeWith).
|
122
|
-
return this->InvokeWith(ArgumentTuple(a1,
|
120
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
|
121
|
+
internal::forward<A2>(a2)));
|
123
122
|
}
|
124
123
|
};
|
125
124
|
|
@@ -130,10 +129,9 @@ class FunctionMocker<R(A1, A2, A3)> : public
|
|
130
129
|
typedef R F(A1, A2, A3);
|
131
130
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
132
131
|
|
133
|
-
MockSpec<F
|
132
|
+
MockSpec<F> With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
134
133
|
const Matcher<A3>& m3) {
|
135
|
-
this
|
136
|
-
return this->current_spec();
|
134
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1, m2, m3));
|
137
135
|
}
|
138
136
|
|
139
137
|
R Invoke(A1 a1, A2 a2, A3 a3) {
|
@@ -141,7 +139,8 @@ class FunctionMocker<R(A1, A2, A3)> : public
|
|
141
139
|
// by the C++ standard [14.6.4] here, as the base class type is
|
142
140
|
// dependent on the template argument (and thus shouldn't be
|
143
141
|
// looked into when resolving InvokeWith).
|
144
|
-
return this->InvokeWith(ArgumentTuple(a1,
|
142
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
|
143
|
+
internal::forward<A2>(a2), internal::forward<A3>(a3)));
|
145
144
|
}
|
146
145
|
};
|
147
146
|
|
@@ -152,10 +151,9 @@ class FunctionMocker<R(A1, A2, A3, A4)> : public
|
|
152
151
|
typedef R F(A1, A2, A3, A4);
|
153
152
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
154
153
|
|
155
|
-
MockSpec<F
|
154
|
+
MockSpec<F> With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
156
155
|
const Matcher<A3>& m3, const Matcher<A4>& m4) {
|
157
|
-
this
|
158
|
-
return this->current_spec();
|
156
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1, m2, m3, m4));
|
159
157
|
}
|
160
158
|
|
161
159
|
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) {
|
@@ -163,7 +161,9 @@ class FunctionMocker<R(A1, A2, A3, A4)> : public
|
|
163
161
|
// by the C++ standard [14.6.4] here, as the base class type is
|
164
162
|
// dependent on the template argument (and thus shouldn't be
|
165
163
|
// looked into when resolving InvokeWith).
|
166
|
-
return this->InvokeWith(ArgumentTuple(a1,
|
164
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
|
165
|
+
internal::forward<A2>(a2), internal::forward<A3>(a3),
|
166
|
+
internal::forward<A4>(a4)));
|
167
167
|
}
|
168
168
|
};
|
169
169
|
|
@@ -175,10 +175,9 @@ class FunctionMocker<R(A1, A2, A3, A4, A5)> : public
|
|
175
175
|
typedef R F(A1, A2, A3, A4, A5);
|
176
176
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
177
177
|
|
178
|
-
MockSpec<F
|
178
|
+
MockSpec<F> With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
179
179
|
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5) {
|
180
|
-
this
|
181
|
-
return this->current_spec();
|
180
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1, m2, m3, m4, m5));
|
182
181
|
}
|
183
182
|
|
184
183
|
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
|
@@ -186,7 +185,9 @@ class FunctionMocker<R(A1, A2, A3, A4, A5)> : public
|
|
186
185
|
// by the C++ standard [14.6.4] here, as the base class type is
|
187
186
|
// dependent on the template argument (and thus shouldn't be
|
188
187
|
// looked into when resolving InvokeWith).
|
189
|
-
return this->InvokeWith(ArgumentTuple(a1,
|
188
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
|
189
|
+
internal::forward<A2>(a2), internal::forward<A3>(a3),
|
190
|
+
internal::forward<A4>(a4), internal::forward<A5>(a5)));
|
190
191
|
}
|
191
192
|
};
|
192
193
|
|
@@ -198,12 +199,10 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6)> : public
|
|
198
199
|
typedef R F(A1, A2, A3, A4, A5, A6);
|
199
200
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
200
201
|
|
201
|
-
MockSpec<F
|
202
|
+
MockSpec<F> With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
202
203
|
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
203
204
|
const Matcher<A6>& m6) {
|
204
|
-
this
|
205
|
-
m6));
|
206
|
-
return this->current_spec();
|
205
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1, m2, m3, m4, m5, m6));
|
207
206
|
}
|
208
207
|
|
209
208
|
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
|
@@ -211,7 +210,10 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6)> : public
|
|
211
210
|
// by the C++ standard [14.6.4] here, as the base class type is
|
212
211
|
// dependent on the template argument (and thus shouldn't be
|
213
212
|
// looked into when resolving InvokeWith).
|
214
|
-
return this->InvokeWith(ArgumentTuple(a1,
|
213
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
|
214
|
+
internal::forward<A2>(a2), internal::forward<A3>(a3),
|
215
|
+
internal::forward<A4>(a4), internal::forward<A5>(a5),
|
216
|
+
internal::forward<A6>(a6)));
|
215
217
|
}
|
216
218
|
};
|
217
219
|
|
@@ -223,12 +225,10 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7)> : public
|
|
223
225
|
typedef R F(A1, A2, A3, A4, A5, A6, A7);
|
224
226
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
225
227
|
|
226
|
-
MockSpec<F
|
228
|
+
MockSpec<F> With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
227
229
|
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
228
230
|
const Matcher<A6>& m6, const Matcher<A7>& m7) {
|
229
|
-
this
|
230
|
-
m6, m7));
|
231
|
-
return this->current_spec();
|
231
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1, m2, m3, m4, m5, m6, m7));
|
232
232
|
}
|
233
233
|
|
234
234
|
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {
|
@@ -236,7 +236,10 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7)> : public
|
|
236
236
|
// by the C++ standard [14.6.4] here, as the base class type is
|
237
237
|
// dependent on the template argument (and thus shouldn't be
|
238
238
|
// looked into when resolving InvokeWith).
|
239
|
-
return this->InvokeWith(ArgumentTuple(a1,
|
239
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
|
240
|
+
internal::forward<A2>(a2), internal::forward<A3>(a3),
|
241
|
+
internal::forward<A4>(a4), internal::forward<A5>(a5),
|
242
|
+
internal::forward<A6>(a6), internal::forward<A7>(a7)));
|
240
243
|
}
|
241
244
|
};
|
242
245
|
|
@@ -248,12 +251,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8)> : public
|
|
248
251
|
typedef R F(A1, A2, A3, A4, A5, A6, A7, A8);
|
249
252
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
250
253
|
|
251
|
-
MockSpec<F
|
254
|
+
MockSpec<F> With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
252
255
|
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
253
256
|
const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8) {
|
254
|
-
this
|
255
|
-
|
256
|
-
return this->current_spec();
|
257
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1, m2, m3, m4, m5, m6, m7,
|
258
|
+
m8));
|
257
259
|
}
|
258
260
|
|
259
261
|
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) {
|
@@ -261,7 +263,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8)> : public
|
|
261
263
|
// by the C++ standard [14.6.4] here, as the base class type is
|
262
264
|
// dependent on the template argument (and thus shouldn't be
|
263
265
|
// looked into when resolving InvokeWith).
|
264
|
-
return this->InvokeWith(ArgumentTuple(a1,
|
266
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
|
267
|
+
internal::forward<A2>(a2), internal::forward<A3>(a3),
|
268
|
+
internal::forward<A4>(a4), internal::forward<A5>(a5),
|
269
|
+
internal::forward<A6>(a6), internal::forward<A7>(a7),
|
270
|
+
internal::forward<A8>(a8)));
|
265
271
|
}
|
266
272
|
};
|
267
273
|
|
@@ -273,13 +279,12 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> : public
|
|
273
279
|
typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9);
|
274
280
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
275
281
|
|
276
|
-
MockSpec<F
|
282
|
+
MockSpec<F> With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
277
283
|
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
278
284
|
const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
|
279
285
|
const Matcher<A9>& m9) {
|
280
|
-
this
|
281
|
-
|
282
|
-
return this->current_spec();
|
286
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1, m2, m3, m4, m5, m6, m7,
|
287
|
+
m8, m9));
|
283
288
|
}
|
284
289
|
|
285
290
|
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) {
|
@@ -287,7 +292,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> : public
|
|
287
292
|
// by the C++ standard [14.6.4] here, as the base class type is
|
288
293
|
// dependent on the template argument (and thus shouldn't be
|
289
294
|
// looked into when resolving InvokeWith).
|
290
|
-
return this->InvokeWith(ArgumentTuple(a1,
|
295
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
|
296
|
+
internal::forward<A2>(a2), internal::forward<A3>(a3),
|
297
|
+
internal::forward<A4>(a4), internal::forward<A5>(a5),
|
298
|
+
internal::forward<A6>(a6), internal::forward<A7>(a7),
|
299
|
+
internal::forward<A8>(a8), internal::forward<A9>(a9)));
|
291
300
|
}
|
292
301
|
};
|
293
302
|
|
@@ -300,13 +309,12 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
|
|
300
309
|
typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
|
301
310
|
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
302
311
|
|
303
|
-
MockSpec<F
|
312
|
+
MockSpec<F> With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
304
313
|
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
305
314
|
const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
|
306
315
|
const Matcher<A9>& m9, const Matcher<A10>& m10) {
|
307
|
-
this
|
308
|
-
|
309
|
-
return this->current_spec();
|
316
|
+
return MockSpec<F>(this, ::testing::make_tuple(m1, m2, m3, m4, m5, m6, m7,
|
317
|
+
m8, m9, m10));
|
310
318
|
}
|
311
319
|
|
312
320
|
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9,
|
@@ -315,11 +323,67 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
|
|
315
323
|
// by the C++ standard [14.6.4] here, as the base class type is
|
316
324
|
// dependent on the template argument (and thus shouldn't be
|
317
325
|
// looked into when resolving InvokeWith).
|
318
|
-
return this->InvokeWith(ArgumentTuple(a1,
|
319
|
-
|
326
|
+
return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
|
327
|
+
internal::forward<A2>(a2), internal::forward<A3>(a3),
|
328
|
+
internal::forward<A4>(a4), internal::forward<A5>(a5),
|
329
|
+
internal::forward<A6>(a6), internal::forward<A7>(a7),
|
330
|
+
internal::forward<A8>(a8), internal::forward<A9>(a9),
|
331
|
+
internal::forward<A10>(a10)));
|
320
332
|
}
|
321
333
|
};
|
322
334
|
|
335
|
+
// Removes the given pointer; this is a helper for the expectation setter method
|
336
|
+
// for parameterless matchers.
|
337
|
+
//
|
338
|
+
// We want to make sure that the user cannot set a parameterless expectation on
|
339
|
+
// overloaded methods, including methods which are overloaded on const. Example:
|
340
|
+
//
|
341
|
+
// class MockClass {
|
342
|
+
// MOCK_METHOD0(GetName, string&());
|
343
|
+
// MOCK_CONST_METHOD0(GetName, const string&());
|
344
|
+
// };
|
345
|
+
//
|
346
|
+
// TEST() {
|
347
|
+
// // This should be an error, as it's not clear which overload is expected.
|
348
|
+
// EXPECT_CALL(mock, GetName).WillOnce(ReturnRef(value));
|
349
|
+
// }
|
350
|
+
//
|
351
|
+
// Here are the generated expectation-setter methods:
|
352
|
+
//
|
353
|
+
// class MockClass {
|
354
|
+
// // Overload 1
|
355
|
+
// MockSpec<string&()> gmock_GetName() { … }
|
356
|
+
// // Overload 2. Declared const so that the compiler will generate an
|
357
|
+
// // error when trying to resolve between this and overload 4 in
|
358
|
+
// // 'gmock_GetName(WithoutMatchers(), nullptr)'.
|
359
|
+
// MockSpec<string&()> gmock_GetName(
|
360
|
+
// const WithoutMatchers&, const Function<string&()>*) const {
|
361
|
+
// // Removes const from this, calls overload 1
|
362
|
+
// return AdjustConstness_(this)->gmock_GetName();
|
363
|
+
// }
|
364
|
+
//
|
365
|
+
// // Overload 3
|
366
|
+
// const string& gmock_GetName() const { … }
|
367
|
+
// // Overload 4
|
368
|
+
// MockSpec<const string&()> gmock_GetName(
|
369
|
+
// const WithoutMatchers&, const Function<const string&()>*) const {
|
370
|
+
// // Does not remove const, calls overload 3
|
371
|
+
// return AdjustConstness_const(this)->gmock_GetName();
|
372
|
+
// }
|
373
|
+
// }
|
374
|
+
//
|
375
|
+
template <typename MockType>
|
376
|
+
const MockType* AdjustConstness_const(const MockType* mock) {
|
377
|
+
return mock;
|
378
|
+
}
|
379
|
+
|
380
|
+
// Removes const from and returns the given pointer; this is a helper for the
|
381
|
+
// expectation setter method for parameterless matchers.
|
382
|
+
template <typename MockType>
|
383
|
+
MockType* AdjustConstness_(const MockType* mock) {
|
384
|
+
return const_cast<MockType*>(mock);
|
385
|
+
}
|
386
|
+
|
323
387
|
} // namespace internal
|
324
388
|
|
325
389
|
// The style guide prohibits "using" statements in a namespace scope
|
@@ -353,324 +417,534 @@ using internal::FunctionMocker;
|
|
353
417
|
GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
|
354
418
|
|
355
419
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
356
|
-
#define GMOCK_METHOD0_(tn, constness, ct, Method, ...)
|
357
|
-
GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
GMOCK_MOCKER_(0, constness, Method).
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
420
|
+
#define GMOCK_METHOD0_(tn, constness, ct, Method, ...) \
|
421
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) ct Method() constness { \
|
422
|
+
GTEST_COMPILE_ASSERT_( \
|
423
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
424
|
+
__VA_ARGS__>::ArgumentTuple>::value == 0), \
|
425
|
+
this_method_does_not_take_0_arguments); \
|
426
|
+
GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \
|
427
|
+
return GMOCK_MOCKER_(0, constness, Method).Invoke(); \
|
428
|
+
} \
|
429
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method() constness { \
|
430
|
+
GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this); \
|
431
|
+
return GMOCK_MOCKER_(0, constness, Method).With(); \
|
432
|
+
} \
|
433
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
434
|
+
const ::testing::internal::WithoutMatchers&, \
|
435
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
436
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
437
|
+
->gmock_##Method(); \
|
438
|
+
} \
|
371
439
|
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(0, constness, \
|
372
|
-
|
440
|
+
Method)
|
373
441
|
|
374
442
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
375
|
-
#define GMOCK_METHOD1_(tn, constness, ct, Method, ...)
|
376
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
377
|
-
|
378
|
-
GTEST_COMPILE_ASSERT_(
|
379
|
-
tn ::testing::internal::Function<
|
380
|
-
|
381
|
-
this_method_does_not_take_1_argument);
|
382
|
-
GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method);
|
383
|
-
return GMOCK_MOCKER_(1, constness, Method)
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
443
|
+
#define GMOCK_METHOD1_(tn, constness, ct, Method, ...) \
|
444
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
445
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1) constness { \
|
446
|
+
GTEST_COMPILE_ASSERT_( \
|
447
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
448
|
+
__VA_ARGS__>::ArgumentTuple>::value == 1), \
|
449
|
+
this_method_does_not_take_1_argument); \
|
450
|
+
GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \
|
451
|
+
return GMOCK_MOCKER_(1, constness, Method) \
|
452
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
453
|
+
gmock_a1)); \
|
454
|
+
} \
|
455
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
456
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1) constness { \
|
457
|
+
GMOCK_MOCKER_(1, constness, Method).RegisterOwner(this); \
|
458
|
+
return GMOCK_MOCKER_(1, constness, Method).With(gmock_a1); \
|
459
|
+
} \
|
460
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
461
|
+
const ::testing::internal::WithoutMatchers&, \
|
462
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
463
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
464
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>()); \
|
465
|
+
} \
|
466
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(1, constness, \
|
467
|
+
Method)
|
392
468
|
|
393
469
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
394
|
-
#define GMOCK_METHOD2_(tn, constness, ct, Method, ...)
|
395
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
396
|
-
|
397
|
-
|
398
|
-
GTEST_COMPILE_ASSERT_(
|
399
|
-
tn ::testing::internal::Function<
|
400
|
-
|
401
|
-
this_method_does_not_take_2_arguments);
|
402
|
-
GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method);
|
403
|
-
return GMOCK_MOCKER_(2, constness, Method)
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
470
|
+
#define GMOCK_METHOD2_(tn, constness, ct, Method, ...) \
|
471
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
472
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
473
|
+
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2) constness { \
|
474
|
+
GTEST_COMPILE_ASSERT_( \
|
475
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
476
|
+
__VA_ARGS__>::ArgumentTuple>::value == 2), \
|
477
|
+
this_method_does_not_take_2_arguments); \
|
478
|
+
GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \
|
479
|
+
return GMOCK_MOCKER_(2, constness, Method) \
|
480
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
481
|
+
gmock_a1), \
|
482
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>( \
|
483
|
+
gmock_a2)); \
|
484
|
+
} \
|
485
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
486
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
|
487
|
+
GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2) constness { \
|
488
|
+
GMOCK_MOCKER_(2, constness, Method).RegisterOwner(this); \
|
489
|
+
return GMOCK_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \
|
490
|
+
} \
|
491
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
492
|
+
const ::testing::internal::WithoutMatchers&, \
|
493
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
494
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
495
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
|
496
|
+
::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>()); \
|
497
|
+
} \
|
498
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(2, constness, \
|
499
|
+
Method)
|
413
500
|
|
414
501
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
415
|
-
#define GMOCK_METHOD3_(tn, constness, ct, Method, ...)
|
416
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
GTEST_COMPILE_ASSERT_(
|
421
|
-
tn ::testing::internal::Function<
|
422
|
-
|
423
|
-
this_method_does_not_take_3_arguments);
|
424
|
-
GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method);
|
425
|
-
return GMOCK_MOCKER_(3, constness, Method)
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
502
|
+
#define GMOCK_METHOD3_(tn, constness, ct, Method, ...) \
|
503
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
504
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
505
|
+
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
506
|
+
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3) constness { \
|
507
|
+
GTEST_COMPILE_ASSERT_( \
|
508
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
509
|
+
__VA_ARGS__>::ArgumentTuple>::value == 3), \
|
510
|
+
this_method_does_not_take_3_arguments); \
|
511
|
+
GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \
|
512
|
+
return GMOCK_MOCKER_(3, constness, Method) \
|
513
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
514
|
+
gmock_a1), \
|
515
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>( \
|
516
|
+
gmock_a2), \
|
517
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>( \
|
518
|
+
gmock_a3)); \
|
519
|
+
} \
|
520
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
521
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
|
522
|
+
GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
|
523
|
+
GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3) constness { \
|
524
|
+
GMOCK_MOCKER_(3, constness, Method).RegisterOwner(this); \
|
525
|
+
return GMOCK_MOCKER_(3, constness, Method) \
|
526
|
+
.With(gmock_a1, gmock_a2, gmock_a3); \
|
527
|
+
} \
|
528
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
529
|
+
const ::testing::internal::WithoutMatchers&, \
|
530
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
531
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
532
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
|
533
|
+
::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
|
534
|
+
::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>()); \
|
535
|
+
} \
|
536
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(3, constness, \
|
537
|
+
Method)
|
438
538
|
|
439
539
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
440
|
-
#define GMOCK_METHOD4_(tn, constness, ct, Method, ...)
|
441
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
GTEST_COMPILE_ASSERT_(
|
447
|
-
tn ::testing::internal::Function<
|
448
|
-
|
449
|
-
this_method_does_not_take_4_arguments);
|
450
|
-
GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method);
|
451
|
-
return GMOCK_MOCKER_(4, constness, Method)
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
540
|
+
#define GMOCK_METHOD4_(tn, constness, ct, Method, ...) \
|
541
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
542
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
543
|
+
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
544
|
+
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
|
545
|
+
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4) constness { \
|
546
|
+
GTEST_COMPILE_ASSERT_( \
|
547
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
548
|
+
__VA_ARGS__>::ArgumentTuple>::value == 4), \
|
549
|
+
this_method_does_not_take_4_arguments); \
|
550
|
+
GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \
|
551
|
+
return GMOCK_MOCKER_(4, constness, Method) \
|
552
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
553
|
+
gmock_a1), \
|
554
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>( \
|
555
|
+
gmock_a2), \
|
556
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>( \
|
557
|
+
gmock_a3), \
|
558
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>( \
|
559
|
+
gmock_a4)); \
|
560
|
+
} \
|
561
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
562
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
|
563
|
+
GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
|
564
|
+
GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
|
565
|
+
GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4) constness { \
|
566
|
+
GMOCK_MOCKER_(4, constness, Method).RegisterOwner(this); \
|
567
|
+
return GMOCK_MOCKER_(4, constness, Method) \
|
568
|
+
.With(gmock_a1, gmock_a2, gmock_a3, gmock_a4); \
|
569
|
+
} \
|
570
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
571
|
+
const ::testing::internal::WithoutMatchers&, \
|
572
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
573
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
574
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
|
575
|
+
::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
|
576
|
+
::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
|
577
|
+
::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>()); \
|
578
|
+
} \
|
579
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(4, constness, \
|
580
|
+
Method)
|
465
581
|
|
466
582
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
467
|
-
#define GMOCK_METHOD5_(tn, constness, ct, Method, ...)
|
468
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
GTEST_COMPILE_ASSERT_(
|
475
|
-
tn ::testing::internal::Function<
|
476
|
-
|
477
|
-
this_method_does_not_take_5_arguments);
|
478
|
-
GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method);
|
479
|
-
return GMOCK_MOCKER_(5, constness, Method)
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
583
|
+
#define GMOCK_METHOD5_(tn, constness, ct, Method, ...) \
|
584
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
585
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
586
|
+
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
587
|
+
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
|
588
|
+
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
|
589
|
+
GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5) constness { \
|
590
|
+
GTEST_COMPILE_ASSERT_( \
|
591
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
592
|
+
__VA_ARGS__>::ArgumentTuple>::value == 5), \
|
593
|
+
this_method_does_not_take_5_arguments); \
|
594
|
+
GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \
|
595
|
+
return GMOCK_MOCKER_(5, constness, Method) \
|
596
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
597
|
+
gmock_a1), \
|
598
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>( \
|
599
|
+
gmock_a2), \
|
600
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>( \
|
601
|
+
gmock_a3), \
|
602
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>( \
|
603
|
+
gmock_a4), \
|
604
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>( \
|
605
|
+
gmock_a5)); \
|
606
|
+
} \
|
607
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
608
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
|
609
|
+
GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
|
610
|
+
GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
|
611
|
+
GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
|
612
|
+
GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5) constness { \
|
613
|
+
GMOCK_MOCKER_(5, constness, Method).RegisterOwner(this); \
|
614
|
+
return GMOCK_MOCKER_(5, constness, Method) \
|
615
|
+
.With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5); \
|
616
|
+
} \
|
617
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
618
|
+
const ::testing::internal::WithoutMatchers&, \
|
619
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
620
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
621
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
|
622
|
+
::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
|
623
|
+
::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
|
624
|
+
::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
|
625
|
+
::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>()); \
|
626
|
+
} \
|
627
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(5, constness, \
|
628
|
+
Method)
|
494
629
|
|
495
630
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
496
|
-
#define GMOCK_METHOD6_(tn, constness, ct, Method, ...)
|
497
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
GTEST_COMPILE_ASSERT_(
|
505
|
-
tn ::testing::internal::Function<
|
506
|
-
|
507
|
-
this_method_does_not_take_6_arguments);
|
508
|
-
GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method);
|
509
|
-
return GMOCK_MOCKER_(6, constness, Method)
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
}
|
523
|
-
|
524
|
-
|
631
|
+
#define GMOCK_METHOD6_(tn, constness, ct, Method, ...) \
|
632
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
633
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
634
|
+
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
635
|
+
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
|
636
|
+
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
|
637
|
+
GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
|
638
|
+
GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6) constness { \
|
639
|
+
GTEST_COMPILE_ASSERT_( \
|
640
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
641
|
+
__VA_ARGS__>::ArgumentTuple>::value == 6), \
|
642
|
+
this_method_does_not_take_6_arguments); \
|
643
|
+
GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \
|
644
|
+
return GMOCK_MOCKER_(6, constness, Method) \
|
645
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
646
|
+
gmock_a1), \
|
647
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>( \
|
648
|
+
gmock_a2), \
|
649
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>( \
|
650
|
+
gmock_a3), \
|
651
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>( \
|
652
|
+
gmock_a4), \
|
653
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>( \
|
654
|
+
gmock_a5), \
|
655
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>( \
|
656
|
+
gmock_a6)); \
|
657
|
+
} \
|
658
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
659
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
|
660
|
+
GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
|
661
|
+
GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
|
662
|
+
GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
|
663
|
+
GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
|
664
|
+
GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6) constness { \
|
665
|
+
GMOCK_MOCKER_(6, constness, Method).RegisterOwner(this); \
|
666
|
+
return GMOCK_MOCKER_(6, constness, Method) \
|
667
|
+
.With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
|
668
|
+
} \
|
669
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
670
|
+
const ::testing::internal::WithoutMatchers&, \
|
671
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
672
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
673
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
|
674
|
+
::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
|
675
|
+
::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
|
676
|
+
::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
|
677
|
+
::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
|
678
|
+
::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>()); \
|
679
|
+
} \
|
680
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(6, constness, \
|
681
|
+
Method)
|
525
682
|
|
526
683
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
527
|
-
#define GMOCK_METHOD7_(tn, constness, ct, Method, ...)
|
528
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
GTEST_COMPILE_ASSERT_(
|
537
|
-
tn ::testing::internal::Function<
|
538
|
-
|
539
|
-
this_method_does_not_take_7_arguments);
|
540
|
-
GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method);
|
541
|
-
return GMOCK_MOCKER_(7, constness, Method)
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
684
|
+
#define GMOCK_METHOD7_(tn, constness, ct, Method, ...) \
|
685
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
686
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
687
|
+
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
688
|
+
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
|
689
|
+
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
|
690
|
+
GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
|
691
|
+
GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
|
692
|
+
GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7) constness { \
|
693
|
+
GTEST_COMPILE_ASSERT_( \
|
694
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
695
|
+
__VA_ARGS__>::ArgumentTuple>::value == 7), \
|
696
|
+
this_method_does_not_take_7_arguments); \
|
697
|
+
GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \
|
698
|
+
return GMOCK_MOCKER_(7, constness, Method) \
|
699
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
700
|
+
gmock_a1), \
|
701
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>( \
|
702
|
+
gmock_a2), \
|
703
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>( \
|
704
|
+
gmock_a3), \
|
705
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>( \
|
706
|
+
gmock_a4), \
|
707
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>( \
|
708
|
+
gmock_a5), \
|
709
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>( \
|
710
|
+
gmock_a6), \
|
711
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>( \
|
712
|
+
gmock_a7)); \
|
713
|
+
} \
|
714
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
715
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
|
716
|
+
GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
|
717
|
+
GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
|
718
|
+
GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
|
719
|
+
GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
|
720
|
+
GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
|
721
|
+
GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7) constness { \
|
722
|
+
GMOCK_MOCKER_(7, constness, Method).RegisterOwner(this); \
|
723
|
+
return GMOCK_MOCKER_(7, constness, Method) \
|
724
|
+
.With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, \
|
725
|
+
gmock_a7); \
|
726
|
+
} \
|
727
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
728
|
+
const ::testing::internal::WithoutMatchers&, \
|
729
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
730
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
731
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
|
732
|
+
::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
|
733
|
+
::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
|
734
|
+
::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
|
735
|
+
::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
|
736
|
+
::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \
|
737
|
+
::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>()); \
|
738
|
+
} \
|
739
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(7, constness, \
|
740
|
+
Method)
|
558
741
|
|
559
742
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
560
|
-
#define GMOCK_METHOD8_(tn, constness, ct, Method, ...)
|
561
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
GTEST_COMPILE_ASSERT_(
|
571
|
-
tn ::testing::internal::Function<
|
572
|
-
|
573
|
-
this_method_does_not_take_8_arguments);
|
574
|
-
GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method);
|
575
|
-
return GMOCK_MOCKER_(8, constness, Method)
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
743
|
+
#define GMOCK_METHOD8_(tn, constness, ct, Method, ...) \
|
744
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
745
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
746
|
+
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
747
|
+
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
|
748
|
+
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
|
749
|
+
GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
|
750
|
+
GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
|
751
|
+
GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
|
752
|
+
GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8) constness { \
|
753
|
+
GTEST_COMPILE_ASSERT_( \
|
754
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
755
|
+
__VA_ARGS__>::ArgumentTuple>::value == 8), \
|
756
|
+
this_method_does_not_take_8_arguments); \
|
757
|
+
GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \
|
758
|
+
return GMOCK_MOCKER_(8, constness, Method) \
|
759
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
760
|
+
gmock_a1), \
|
761
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>( \
|
762
|
+
gmock_a2), \
|
763
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>( \
|
764
|
+
gmock_a3), \
|
765
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>( \
|
766
|
+
gmock_a4), \
|
767
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>( \
|
768
|
+
gmock_a5), \
|
769
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>( \
|
770
|
+
gmock_a6), \
|
771
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>( \
|
772
|
+
gmock_a7), \
|
773
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>( \
|
774
|
+
gmock_a8)); \
|
775
|
+
} \
|
776
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
777
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
|
778
|
+
GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
|
779
|
+
GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
|
780
|
+
GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
|
781
|
+
GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
|
782
|
+
GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
|
783
|
+
GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
|
784
|
+
GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8) constness { \
|
785
|
+
GMOCK_MOCKER_(8, constness, Method).RegisterOwner(this); \
|
786
|
+
return GMOCK_MOCKER_(8, constness, Method) \
|
787
|
+
.With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, \
|
788
|
+
gmock_a7, gmock_a8); \
|
789
|
+
} \
|
790
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
791
|
+
const ::testing::internal::WithoutMatchers&, \
|
792
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
793
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
794
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
|
795
|
+
::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
|
796
|
+
::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
|
797
|
+
::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
|
798
|
+
::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
|
799
|
+
::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \
|
800
|
+
::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \
|
801
|
+
::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>()); \
|
802
|
+
} \
|
803
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(8, constness, \
|
804
|
+
Method)
|
593
805
|
|
594
806
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
595
|
-
#define GMOCK_METHOD9_(tn, constness, ct, Method, ...)
|
596
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
GTEST_COMPILE_ASSERT_(
|
607
|
-
tn ::testing::internal::Function<
|
608
|
-
|
609
|
-
this_method_does_not_take_9_arguments);
|
610
|
-
GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method);
|
611
|
-
return GMOCK_MOCKER_(9, constness, Method)
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
807
|
+
#define GMOCK_METHOD9_(tn, constness, ct, Method, ...) \
|
808
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
809
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
810
|
+
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
811
|
+
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
|
812
|
+
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
|
813
|
+
GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
|
814
|
+
GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
|
815
|
+
GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
|
816
|
+
GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
|
817
|
+
GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9) constness { \
|
818
|
+
GTEST_COMPILE_ASSERT_( \
|
819
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
820
|
+
__VA_ARGS__>::ArgumentTuple>::value == 9), \
|
821
|
+
this_method_does_not_take_9_arguments); \
|
822
|
+
GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \
|
823
|
+
return GMOCK_MOCKER_(9, constness, Method) \
|
824
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
825
|
+
gmock_a1), \
|
826
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>( \
|
827
|
+
gmock_a2), \
|
828
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>( \
|
829
|
+
gmock_a3), \
|
830
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>( \
|
831
|
+
gmock_a4), \
|
832
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>( \
|
833
|
+
gmock_a5), \
|
834
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>( \
|
835
|
+
gmock_a6), \
|
836
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>( \
|
837
|
+
gmock_a7), \
|
838
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>( \
|
839
|
+
gmock_a8), \
|
840
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 9, __VA_ARGS__)>( \
|
841
|
+
gmock_a9)); \
|
842
|
+
} \
|
843
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
844
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
|
845
|
+
GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
|
846
|
+
GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
|
847
|
+
GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
|
848
|
+
GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
|
849
|
+
GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
|
850
|
+
GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
|
851
|
+
GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
|
852
|
+
GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9) constness { \
|
853
|
+
GMOCK_MOCKER_(9, constness, Method).RegisterOwner(this); \
|
854
|
+
return GMOCK_MOCKER_(9, constness, Method) \
|
855
|
+
.With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, \
|
856
|
+
gmock_a7, gmock_a8, gmock_a9); \
|
857
|
+
} \
|
858
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
859
|
+
const ::testing::internal::WithoutMatchers&, \
|
860
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
861
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
862
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
|
863
|
+
::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
|
864
|
+
::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
|
865
|
+
::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
|
866
|
+
::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
|
867
|
+
::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \
|
868
|
+
::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \
|
869
|
+
::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(), \
|
870
|
+
::testing::A<GMOCK_ARG_(tn, 9, __VA_ARGS__)>()); \
|
871
|
+
} \
|
872
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(9, constness, \
|
873
|
+
Method)
|
632
874
|
|
633
875
|
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
|
634
|
-
#define GMOCK_METHOD10_(tn, constness, ct, Method, ...)
|
635
|
-
GMOCK_RESULT_(tn, __VA_ARGS__)
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
GTEST_COMPILE_ASSERT_(
|
647
|
-
tn ::testing::internal::Function<
|
648
|
-
|
649
|
-
this_method_does_not_take_10_arguments);
|
650
|
-
GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method);
|
651
|
-
return GMOCK_MOCKER_(10, constness, Method)
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
876
|
+
#define GMOCK_METHOD10_(tn, constness, ct, Method, ...) \
|
877
|
+
GMOCK_RESULT_(tn, __VA_ARGS__) \
|
878
|
+
ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
879
|
+
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
880
|
+
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
|
881
|
+
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
|
882
|
+
GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
|
883
|
+
GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
|
884
|
+
GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
|
885
|
+
GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
|
886
|
+
GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \
|
887
|
+
GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10) constness { \
|
888
|
+
GTEST_COMPILE_ASSERT_( \
|
889
|
+
(::testing::tuple_size<tn ::testing::internal::Function< \
|
890
|
+
__VA_ARGS__>::ArgumentTuple>::value == 10), \
|
891
|
+
this_method_does_not_take_10_arguments); \
|
892
|
+
GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \
|
893
|
+
return GMOCK_MOCKER_(10, constness, Method) \
|
894
|
+
.Invoke(::testing::internal::forward<GMOCK_ARG_(tn, 1, __VA_ARGS__)>( \
|
895
|
+
gmock_a1), \
|
896
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>( \
|
897
|
+
gmock_a2), \
|
898
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>( \
|
899
|
+
gmock_a3), \
|
900
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>( \
|
901
|
+
gmock_a4), \
|
902
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>( \
|
903
|
+
gmock_a5), \
|
904
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>( \
|
905
|
+
gmock_a6), \
|
906
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>( \
|
907
|
+
gmock_a7), \
|
908
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>( \
|
909
|
+
gmock_a8), \
|
910
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 9, __VA_ARGS__)>( \
|
911
|
+
gmock_a9), \
|
912
|
+
::testing::internal::forward<GMOCK_ARG_(tn, 10, __VA_ARGS__)>( \
|
913
|
+
gmock_a10)); \
|
914
|
+
} \
|
915
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
916
|
+
GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
|
917
|
+
GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
|
918
|
+
GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
|
919
|
+
GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
|
920
|
+
GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
|
921
|
+
GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
|
922
|
+
GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
|
923
|
+
GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
|
924
|
+
GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9, \
|
925
|
+
GMOCK_MATCHER_(tn, 10, __VA_ARGS__) gmock_a10) constness { \
|
926
|
+
GMOCK_MOCKER_(10, constness, Method).RegisterOwner(this); \
|
927
|
+
return GMOCK_MOCKER_(10, constness, Method) \
|
928
|
+
.With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, \
|
929
|
+
gmock_a7, gmock_a8, gmock_a9, gmock_a10); \
|
930
|
+
} \
|
931
|
+
::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
|
932
|
+
const ::testing::internal::WithoutMatchers&, \
|
933
|
+
constness ::testing::internal::Function<__VA_ARGS__>*) const { \
|
934
|
+
return ::testing::internal::AdjustConstness_##constness(this) \
|
935
|
+
->gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
|
936
|
+
::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
|
937
|
+
::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
|
938
|
+
::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
|
939
|
+
::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
|
940
|
+
::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \
|
941
|
+
::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \
|
942
|
+
::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(), \
|
943
|
+
::testing::A<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(), \
|
944
|
+
::testing::A<GMOCK_ARG_(tn, 10, __VA_ARGS__)>()); \
|
945
|
+
} \
|
946
|
+
mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(10, constness, \
|
947
|
+
Method)
|
674
948
|
|
675
949
|
#define MOCK_METHOD0(m, ...) GMOCK_METHOD0_(, , , m, __VA_ARGS__)
|
676
950
|
#define MOCK_METHOD1(m, ...) GMOCK_METHOD1_(, , , m, __VA_ARGS__)
|
@@ -880,7 +1154,7 @@ class MockFunction<R()> {
|
|
880
1154
|
MOCK_METHOD0_T(Call, R());
|
881
1155
|
|
882
1156
|
#if GTEST_HAS_STD_FUNCTION_
|
883
|
-
std::function<R()> AsStdFunction() {
|
1157
|
+
::std::function<R()> AsStdFunction() {
|
884
1158
|
return [this]() -> R {
|
885
1159
|
return this->Call();
|
886
1160
|
};
|
@@ -899,9 +1173,9 @@ class MockFunction<R(A0)> {
|
|
899
1173
|
MOCK_METHOD1_T(Call, R(A0));
|
900
1174
|
|
901
1175
|
#if GTEST_HAS_STD_FUNCTION_
|
902
|
-
std::function<R(A0)> AsStdFunction() {
|
1176
|
+
::std::function<R(A0)> AsStdFunction() {
|
903
1177
|
return [this](A0 a0) -> R {
|
904
|
-
return this->Call(a0);
|
1178
|
+
return this->Call(::std::move(a0));
|
905
1179
|
};
|
906
1180
|
}
|
907
1181
|
#endif // GTEST_HAS_STD_FUNCTION_
|
@@ -918,9 +1192,9 @@ class MockFunction<R(A0, A1)> {
|
|
918
1192
|
MOCK_METHOD2_T(Call, R(A0, A1));
|
919
1193
|
|
920
1194
|
#if GTEST_HAS_STD_FUNCTION_
|
921
|
-
std::function<R(A0, A1)> AsStdFunction() {
|
1195
|
+
::std::function<R(A0, A1)> AsStdFunction() {
|
922
1196
|
return [this](A0 a0, A1 a1) -> R {
|
923
|
-
return this->Call(a0, a1);
|
1197
|
+
return this->Call(::std::move(a0), ::std::move(a1));
|
924
1198
|
};
|
925
1199
|
}
|
926
1200
|
#endif // GTEST_HAS_STD_FUNCTION_
|
@@ -937,9 +1211,9 @@ class MockFunction<R(A0, A1, A2)> {
|
|
937
1211
|
MOCK_METHOD3_T(Call, R(A0, A1, A2));
|
938
1212
|
|
939
1213
|
#if GTEST_HAS_STD_FUNCTION_
|
940
|
-
std::function<R(A0, A1, A2)> AsStdFunction() {
|
1214
|
+
::std::function<R(A0, A1, A2)> AsStdFunction() {
|
941
1215
|
return [this](A0 a0, A1 a1, A2 a2) -> R {
|
942
|
-
return this->Call(a0, a1, a2);
|
1216
|
+
return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2));
|
943
1217
|
};
|
944
1218
|
}
|
945
1219
|
#endif // GTEST_HAS_STD_FUNCTION_
|
@@ -956,9 +1230,10 @@ class MockFunction<R(A0, A1, A2, A3)> {
|
|
956
1230
|
MOCK_METHOD4_T(Call, R(A0, A1, A2, A3));
|
957
1231
|
|
958
1232
|
#if GTEST_HAS_STD_FUNCTION_
|
959
|
-
std::function<R(A0, A1, A2, A3)> AsStdFunction() {
|
1233
|
+
::std::function<R(A0, A1, A2, A3)> AsStdFunction() {
|
960
1234
|
return [this](A0 a0, A1 a1, A2 a2, A3 a3) -> R {
|
961
|
-
return this->Call(a0, a1, a2,
|
1235
|
+
return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2),
|
1236
|
+
::std::move(a3));
|
962
1237
|
};
|
963
1238
|
}
|
964
1239
|
#endif // GTEST_HAS_STD_FUNCTION_
|
@@ -976,9 +1251,10 @@ class MockFunction<R(A0, A1, A2, A3, A4)> {
|
|
976
1251
|
MOCK_METHOD5_T(Call, R(A0, A1, A2, A3, A4));
|
977
1252
|
|
978
1253
|
#if GTEST_HAS_STD_FUNCTION_
|
979
|
-
std::function<R(A0, A1, A2, A3, A4)> AsStdFunction() {
|
1254
|
+
::std::function<R(A0, A1, A2, A3, A4)> AsStdFunction() {
|
980
1255
|
return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) -> R {
|
981
|
-
return this->Call(a0, a1, a2,
|
1256
|
+
return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2),
|
1257
|
+
::std::move(a3), ::std::move(a4));
|
982
1258
|
};
|
983
1259
|
}
|
984
1260
|
#endif // GTEST_HAS_STD_FUNCTION_
|
@@ -996,9 +1272,10 @@ class MockFunction<R(A0, A1, A2, A3, A4, A5)> {
|
|
996
1272
|
MOCK_METHOD6_T(Call, R(A0, A1, A2, A3, A4, A5));
|
997
1273
|
|
998
1274
|
#if GTEST_HAS_STD_FUNCTION_
|
999
|
-
std::function<R(A0, A1, A2, A3, A4, A5)> AsStdFunction() {
|
1275
|
+
::std::function<R(A0, A1, A2, A3, A4, A5)> AsStdFunction() {
|
1000
1276
|
return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -> R {
|
1001
|
-
return this->Call(a0, a1, a2,
|
1277
|
+
return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2),
|
1278
|
+
::std::move(a3), ::std::move(a4), ::std::move(a5));
|
1002
1279
|
};
|
1003
1280
|
}
|
1004
1281
|
#endif // GTEST_HAS_STD_FUNCTION_
|
@@ -1016,9 +1293,10 @@ class MockFunction<R(A0, A1, A2, A3, A4, A5, A6)> {
|
|
1016
1293
|
MOCK_METHOD7_T(Call, R(A0, A1, A2, A3, A4, A5, A6));
|
1017
1294
|
|
1018
1295
|
#if GTEST_HAS_STD_FUNCTION_
|
1019
|
-
std::function<R(A0, A1, A2, A3, A4, A5, A6)> AsStdFunction() {
|
1296
|
+
::std::function<R(A0, A1, A2, A3, A4, A5, A6)> AsStdFunction() {
|
1020
1297
|
return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -> R {
|
1021
|
-
return this->Call(a0, a1, a2,
|
1298
|
+
return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2),
|
1299
|
+
::std::move(a3), ::std::move(a4), ::std::move(a5), ::std::move(a6));
|
1022
1300
|
};
|
1023
1301
|
}
|
1024
1302
|
#endif // GTEST_HAS_STD_FUNCTION_
|
@@ -1036,9 +1314,11 @@ class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7)> {
|
|
1036
1314
|
MOCK_METHOD8_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7));
|
1037
1315
|
|
1038
1316
|
#if GTEST_HAS_STD_FUNCTION_
|
1039
|
-
std::function<R(A0, A1, A2, A3, A4, A5, A6, A7)> AsStdFunction() {
|
1317
|
+
::std::function<R(A0, A1, A2, A3, A4, A5, A6, A7)> AsStdFunction() {
|
1040
1318
|
return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -> R {
|
1041
|
-
return this->Call(a0, a1, a2,
|
1319
|
+
return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2),
|
1320
|
+
::std::move(a3), ::std::move(a4), ::std::move(a5), ::std::move(a6),
|
1321
|
+
::std::move(a7));
|
1042
1322
|
};
|
1043
1323
|
}
|
1044
1324
|
#endif // GTEST_HAS_STD_FUNCTION_
|
@@ -1056,10 +1336,12 @@ class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
|
|
1056
1336
|
MOCK_METHOD9_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8));
|
1057
1337
|
|
1058
1338
|
#if GTEST_HAS_STD_FUNCTION_
|
1059
|
-
std::function<R(A0, A1, A2, A3, A4, A5, A6, A7, A8)> AsStdFunction() {
|
1339
|
+
::std::function<R(A0, A1, A2, A3, A4, A5, A6, A7, A8)> AsStdFunction() {
|
1060
1340
|
return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7,
|
1061
1341
|
A8 a8) -> R {
|
1062
|
-
return this->Call(a0, a1, a2,
|
1342
|
+
return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2),
|
1343
|
+
::std::move(a3), ::std::move(a4), ::std::move(a5), ::std::move(a6),
|
1344
|
+
::std::move(a7), ::std::move(a8));
|
1063
1345
|
};
|
1064
1346
|
}
|
1065
1347
|
#endif // GTEST_HAS_STD_FUNCTION_
|
@@ -1078,10 +1360,12 @@ class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
|
|
1078
1360
|
MOCK_METHOD10_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9));
|
1079
1361
|
|
1080
1362
|
#if GTEST_HAS_STD_FUNCTION_
|
1081
|
-
std::function<R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> AsStdFunction() {
|
1363
|
+
::std::function<R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> AsStdFunction() {
|
1082
1364
|
return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7,
|
1083
1365
|
A8 a8, A9 a9) -> R {
|
1084
|
-
return this->Call(a0, a1, a2,
|
1366
|
+
return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2),
|
1367
|
+
::std::move(a3), ::std::move(a4), ::std::move(a5), ::std::move(a6),
|
1368
|
+
::std::move(a7), ::std::move(a8), ::std::move(a9));
|
1085
1369
|
};
|
1086
1370
|
}
|
1087
1371
|
#endif // GTEST_HAS_STD_FUNCTION_
|