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.
Files changed (371) hide show
  1. checksums.yaml +4 -4
  2. data/ext/rj_schema/rapidjson/CMakeLists.txt +9 -4
  3. data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +10 -0
  4. data/ext/rj_schema/rapidjson/appveyor.yml +22 -9
  5. data/ext/rj_schema/rapidjson/bin/data/abcde.txt +1 -0
  6. data/ext/rj_schema/rapidjson/bin/unittestschema/address.json +139 -0
  7. data/ext/rj_schema/rapidjson/bin/unittestschema/allOf_address.json +7 -0
  8. data/ext/rj_schema/rapidjson/bin/unittestschema/anyOf_address.json +7 -0
  9. data/ext/rj_schema/rapidjson/bin/unittestschema/oneOf_address.json +7 -0
  10. data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +2 -2
  11. data/ext/rj_schema/rapidjson/doc/dom.md +1 -0
  12. data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +1 -0
  13. data/ext/rj_schema/rapidjson/doc/faq.md +3 -3
  14. data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +8 -8
  15. data/ext/rj_schema/rapidjson/doc/internals.md +1 -1
  16. data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +2 -2
  17. data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +1 -1
  18. data/ext/rj_schema/rapidjson/doc/sax.md +1 -1
  19. data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +2 -2
  20. data/ext/rj_schema/rapidjson/doc/stream.md +1 -1
  21. data/ext/rj_schema/rapidjson/doc/tutorial.md +1 -1
  22. data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +7 -6
  23. data/ext/rj_schema/rapidjson/example/CMakeLists.txt +1 -0
  24. data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +118 -0
  25. data/ext/rj_schema/rapidjson/example/sortkeys/sortkeys.cpp +62 -0
  26. data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +1 -1
  27. data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +6 -6
  28. data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +1 -1
  29. data/ext/rj_schema/rapidjson/include/rapidjson/document.h +124 -35
  30. data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +1 -1
  31. data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +1 -1
  32. data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +49 -1
  33. data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +56 -1
  34. data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +2 -2
  35. data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +1 -1
  36. data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +2 -2
  37. data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +2 -2
  38. data/ext/rj_schema/rapidjson/include/rapidjson/internal/clzll.h +71 -0
  39. data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +3 -17
  40. data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +1 -1
  41. data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +1 -1
  42. data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +1 -1
  43. data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +1 -1
  44. data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +1 -1
  45. data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +20 -13
  46. data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +4 -3
  47. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +1 -1
  48. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +1 -1
  49. data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +1 -1
  50. data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +50 -35
  51. data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +1 -1
  52. data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +1 -1
  53. data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +1 -1
  54. data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +63 -5
  55. data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +2 -2
  56. data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +63 -1
  57. data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +67 -53
  58. data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +318 -164
  59. data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +1 -1
  60. data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +1 -1
  61. data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +10 -10
  62. data/ext/rj_schema/rapidjson/readme.md +51 -1
  63. data/ext/rj_schema/rapidjson/readme.zh-cn.md +2 -2
  64. data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +1 -1
  65. data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +1 -1
  66. data/ext/rj_schema/rapidjson/test/perftest/perftest.h +1 -1
  67. data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +2 -2
  68. data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +75 -1
  69. data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +1 -0
  70. data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +1 -1
  71. data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +1 -1
  72. data/ext/rj_schema/rapidjson/test/unittest/clzlltest.cpp +34 -0
  73. data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +19 -19
  74. data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +1 -1
  75. data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +1 -1
  76. data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +1 -1
  77. data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +1 -1
  78. data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +45 -2
  79. data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +1 -1
  80. data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +10 -10
  81. data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +8 -8
  82. data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +1 -1
  83. data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +1 -1
  84. data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +1 -1
  85. data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +157 -16
  86. data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +1 -1
  87. data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +113 -75
  88. data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +2 -1
  89. data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +593 -78
  90. data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +1 -1
  91. data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +1 -1
  92. data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +5 -5
  93. data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +1 -1
  94. data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +1 -1
  95. data/ext/rj_schema/rapidjson/test/unittest/unittest.h +4 -1
  96. data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +12 -12
  97. data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +1 -1
  98. data/ext/rj_schema/rapidjson/thirdparty/gtest/BUILD.bazel +175 -0
  99. data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +18 -1
  100. data/ext/rj_schema/rapidjson/thirdparty/gtest/CONTRIBUTING.md +160 -0
  101. data/ext/rj_schema/rapidjson/thirdparty/gtest/LICENSE +28 -0
  102. data/ext/rj_schema/rapidjson/thirdparty/gtest/Makefile.am +14 -0
  103. data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +16 -35
  104. data/ext/rj_schema/rapidjson/thirdparty/gtest/WORKSPACE +8 -0
  105. data/ext/rj_schema/rapidjson/thirdparty/gtest/appveyor.yml +104 -0
  106. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-autotools.sh +44 -0
  107. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-bazel.sh +36 -0
  108. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-linux.sh +41 -0
  109. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-osx.sh +40 -0
  110. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/get-nprocessors.sh +48 -0
  111. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-linux.sh +49 -0
  112. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-osx.sh +39 -0
  113. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/log-config.sh +51 -0
  114. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/travis.sh +44 -0
  115. data/ext/rj_schema/rapidjson/thirdparty/gtest/configure.ac +16 -0
  116. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +1 -1
  117. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +72 -32
  118. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +53 -42
  119. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock.pc.in +9 -0
  120. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock_main.pc.in +9 -0
  121. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +4 -4
  122. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +6 -4
  123. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +117 -132
  124. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +7 -4
  125. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +20 -12
  126. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +1 -2
  127. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +83 -26
  128. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +262 -68
  129. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +45 -6
  130. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +650 -366
  131. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +76 -20
  132. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +308 -229
  133. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +18 -15
  134. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +87 -26
  135. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +33 -16
  136. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +1209 -353
  137. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +33 -0
  138. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +159 -88
  139. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +2 -1
  140. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +1 -1
  141. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +3 -4
  142. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +16 -9
  143. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +71 -8
  144. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +7 -11
  145. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +14 -0
  146. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +69 -6
  147. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +2 -2
  148. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +69 -6
  149. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +83 -8
  150. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +14 -0
  151. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +63 -2
  152. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +63 -2
  153. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +76 -3
  154. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +1 -1
  155. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +4 -5
  156. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +3 -3
  157. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +1 -1
  158. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +36 -6
  159. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +210 -135
  160. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +108 -48
  161. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +23 -1
  162. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/BUILD.bazel +123 -0
  163. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +166 -2
  164. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +1 -1
  165. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +64 -62
  166. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +43 -18
  167. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +11 -9
  168. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +91 -36
  169. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +33 -14
  170. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +1286 -167
  171. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +85 -83
  172. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +102 -15
  173. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +136 -9
  174. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +1 -1
  175. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +1 -1
  176. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +24 -2
  177. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +8 -5
  178. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +20 -1
  179. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +8 -1
  180. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +3 -2
  181. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +44 -2
  182. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +5 -7
  183. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +40 -14
  184. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +60 -31
  185. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +232 -171
  186. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest.pc.in +9 -0
  187. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest_main.pc.in +10 -0
  188. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +54 -16
  189. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +1 -1
  190. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Pkgconfig.md +146 -0
  191. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +2 -2
  192. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +6 -6
  193. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{AdvancedGuide.md → advanced.md} +260 -26
  194. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{FAQ.md → faq.md} +62 -57
  195. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Primer.md → primer.md} +43 -9
  196. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Samples.md → samples.md} +0 -0
  197. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +53 -5
  198. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +1 -2
  199. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +30 -36
  200. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +8 -17
  201. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +140 -51
  202. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +2 -3
  203. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +4 -3
  204. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +126 -30
  205. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +6 -7
  206. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +8 -5
  207. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +6 -5
  208. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +4 -0
  209. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +13 -57
  210. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +1 -2
  211. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +98 -59
  212. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +34 -41
  213. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +3 -10
  214. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +9 -17
  215. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +8 -1
  216. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +232 -99
  217. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +3 -3
  218. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +17 -1
  219. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +17 -1
  220. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.sln +55 -0
  221. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj +149 -0
  222. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj.filters +18 -0
  223. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.sln +55 -0
  224. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj +149 -0
  225. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj.filters +18 -0
  226. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj +154 -0
  227. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj.filters +18 -0
  228. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj +162 -0
  229. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj.filters +18 -0
  230. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj +199 -0
  231. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters +26 -0
  232. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj +191 -0
  233. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters +26 -0
  234. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj +188 -0
  235. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters +18 -0
  236. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj +180 -0
  237. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj.filters +18 -0
  238. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +6 -2
  239. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +1 -1
  240. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -4
  241. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +2 -1
  242. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +2 -1
  243. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +7 -6
  244. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +5 -1
  245. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +3 -3
  246. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +2 -1
  247. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +10 -22
  248. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +2 -1
  249. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -3
  250. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +1 -1
  251. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +10 -10
  252. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1 -1
  253. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +1 -1
  254. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +226 -32
  255. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +5 -7
  256. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +21 -29
  257. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +85 -67
  258. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +93 -8
  259. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +1 -9
  260. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +1 -0
  261. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +622 -164
  262. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +1 -1
  263. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/BUILD.bazel +396 -0
  264. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +12 -15
  265. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +2 -12
  266. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +1 -1
  267. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +6 -8
  268. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +1 -5
  269. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +84 -29
  270. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +1 -5
  271. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +11 -12
  272. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +165 -63
  273. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +1 -1
  274. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +1 -1
  275. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +1 -1
  276. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +13 -13
  277. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_assert_by_exception_test.cc +119 -0
  278. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +1 -3
  279. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +1 -2
  280. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -2
  281. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +1 -1
  282. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +1 -2
  283. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -8
  284. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +6 -4
  285. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -2
  286. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -3
  287. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +20 -18
  288. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -2
  289. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +1 -1
  290. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_outfiles_test.py +162 -0
  291. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_output_unittest.py +611 -0
  292. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_test_utils.py +60 -0
  293. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +4 -4
  294. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +2 -2
  295. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +11 -7
  296. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +17 -12
  297. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +104 -66
  298. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +1 -1
  299. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +2 -2
  300. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +2 -19
  301. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -6
  302. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +12 -14
  303. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test.py +65 -0
  304. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test_.cc +44 -0
  305. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +1 -1
  306. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +4 -5
  307. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +2 -2
  308. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +240 -149
  309. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -1
  310. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -1
  311. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +15 -7
  312. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +100 -30
  313. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -2
  314. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +25 -23
  315. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +1 -1
  316. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +1 -1
  317. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +4 -4
  318. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +47 -0
  319. data/ext/rj_schema/rapidjson/travis-doxygen.sh +13 -6
  320. data/ext/rj_schema/rj_schema.cpp +161 -17
  321. data/lib/rj_schema.rb +1 -1
  322. metadata +63 -58
  323. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
  324. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +0 -525
  325. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +0 -3250
  326. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +0 -11
  327. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +0 -439
  328. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +0 -624
  329. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +0 -534
  330. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +0 -3342
  331. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +0 -12
  332. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +0 -439
  333. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +0 -628
  334. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +0 -556
  335. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +0 -3432
  336. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +0 -12
  337. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +0 -439
  338. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +0 -628
  339. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +0 -126
  340. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +0 -14
  341. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +0 -2096
  342. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +0 -12
  343. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +0 -886
  344. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +0 -497
  345. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +0 -177
  346. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +0 -93
  347. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +0 -2178
  348. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +0 -14
  349. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +0 -1038
  350. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +0 -501
  351. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +0 -177
  352. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +0 -14
  353. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +0 -93
  354. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +0 -2181
  355. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +0 -14
  356. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +0 -1082
  357. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +0 -501
  358. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +0 -177
  359. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +0 -14
  360. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +0 -93
  361. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +0 -45
  362. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +0 -126
  363. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +0 -45
  364. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +0 -126
  365. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +0 -129
  366. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +0 -129
  367. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +0 -164
  368. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +0 -164
  369. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +0 -147
  370. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +0 -147
  371. data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
@@ -1,6 +1,6 @@
1
1
  $$ -*- mode: c++; -*-
2
- $$ This is a Pump source file. Please use Pump to convert it to
3
- $$ gmock-generated-function-mockers.h.
2
+ $$ This is a Pump source file. Please use Pump to convert
3
+ $$ it to gmock-generated-function-mockers.h.
4
4
  $$
5
5
  $var n = 10 $$ The maximum arity we support.
6
6
  // Copyright 2007, Google Inc.
@@ -68,7 +68,7 @@ $for i [[
68
68
  $range j 1..i
69
69
  $var typename_As = [[$for j [[, typename A$j]]]]
70
70
  $var As = [[$for j, [[A$j]]]]
71
- $var as = [[$for j, [[a$j]]]]
71
+ $var as = [[$for j, [[internal::forward<A$j>(a$j)]]]]
72
72
  $var Aas = [[$for j, [[A$j a$j]]]]
73
73
  $var ms = [[$for j, [[m$j]]]]
74
74
  $var matchers = [[$for j, [[const Matcher<A$j>& m$j]]]]
@@ -79,13 +79,8 @@ class FunctionMocker<R($As)> : public
79
79
  typedef R F($As);
80
80
  typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
81
81
 
82
- MockSpec<F>& With($matchers) {
83
-
84
- $if i >= 1 [[
85
- this->current_spec().SetMatchers(::testing::make_tuple($ms));
86
-
87
- ]]
88
- return this->current_spec();
82
+ MockSpec<F> With($matchers) {
83
+ return MockSpec<F>(this, ::testing::make_tuple($ms));
89
84
  }
90
85
 
91
86
  R Invoke($Aas) {
@@ -99,6 +94,58 @@ $if i >= 1 [[
99
94
 
100
95
 
101
96
  ]]
97
+ // Removes the given pointer; this is a helper for the expectation setter method
98
+ // for parameterless matchers.
99
+ //
100
+ // We want to make sure that the user cannot set a parameterless expectation on
101
+ // overloaded methods, including methods which are overloaded on const. Example:
102
+ //
103
+ // class MockClass {
104
+ // MOCK_METHOD0(GetName, string&());
105
+ // MOCK_CONST_METHOD0(GetName, const string&());
106
+ // };
107
+ //
108
+ // TEST() {
109
+ // // This should be an error, as it's not clear which overload is expected.
110
+ // EXPECT_CALL(mock, GetName).WillOnce(ReturnRef(value));
111
+ // }
112
+ //
113
+ // Here are the generated expectation-setter methods:
114
+ //
115
+ // class MockClass {
116
+ // // Overload 1
117
+ // MockSpec<string&()> gmock_GetName() { … }
118
+ // // Overload 2. Declared const so that the compiler will generate an
119
+ // // error when trying to resolve between this and overload 4 in
120
+ // // 'gmock_GetName(WithoutMatchers(), nullptr)'.
121
+ // MockSpec<string&()> gmock_GetName(
122
+ // const WithoutMatchers&, const Function<string&()>*) const {
123
+ // // Removes const from this, calls overload 1
124
+ // return AdjustConstness_(this)->gmock_GetName();
125
+ // }
126
+ //
127
+ // // Overload 3
128
+ // const string& gmock_GetName() const { … }
129
+ // // Overload 4
130
+ // MockSpec<const string&()> gmock_GetName(
131
+ // const WithoutMatchers&, const Function<const string&()>*) const {
132
+ // // Does not remove const, calls overload 3
133
+ // return AdjustConstness_const(this)->gmock_GetName();
134
+ // }
135
+ // }
136
+ //
137
+ template <typename MockType>
138
+ const MockType* AdjustConstness_const(const MockType* mock) {
139
+ return mock;
140
+ }
141
+
142
+ // Removes const from and returns the given pointer; this is a helper for the
143
+ // expectation setter method for parameterless matchers.
144
+ template <typename MockType>
145
+ MockType* AdjustConstness_(const MockType* mock) {
146
+ return const_cast<MockType*>(mock);
147
+ }
148
+
102
149
  } // namespace internal
103
150
 
104
151
  // The style guide prohibits "using" statements in a namespace scope
@@ -134,11 +181,14 @@ using internal::FunctionMocker;
134
181
 
135
182
  $for i [[
136
183
  $range j 1..i
137
- $var arg_as = [[$for j, \
138
- [[GMOCK_ARG_(tn, $j, __VA_ARGS__) gmock_a$j]]]]
139
- $var as = [[$for j, [[gmock_a$j]]]]
140
- $var matcher_as = [[$for j, \
184
+ $var arg_as = [[$for j, [[GMOCK_ARG_(tn, $j, __VA_ARGS__) gmock_a$j]]]]
185
+ $var as = [[$for j, \
186
+ [[::testing::internal::forward<GMOCK_ARG_(tn, $j, __VA_ARGS__)>(gmock_a$j)]]]]
187
+ $var matcher_arg_as = [[$for j, \
141
188
  [[GMOCK_MATCHER_(tn, $j, __VA_ARGS__) gmock_a$j]]]]
189
+ $var matcher_as = [[$for j, [[gmock_a$j]]]]
190
+ $var anything_matchers = [[$for j, \
191
+ [[::testing::A<GMOCK_ARG_(tn, $j, __VA_ARGS__)>()]]]]
142
192
  // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
143
193
  #define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, ...) \
144
194
  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
@@ -149,11 +199,17 @@ $var matcher_as = [[$for j, \
149
199
  GMOCK_MOCKER_($i, constness, Method).SetOwnerAndName(this, #Method); \
150
200
  return GMOCK_MOCKER_($i, constness, Method).Invoke($as); \
151
201
  } \
152
- ::testing::MockSpec<__VA_ARGS__>& \
153
- gmock_##Method($matcher_as) constness { \
202
+ ::testing::MockSpec<__VA_ARGS__> \
203
+ gmock_##Method($matcher_arg_as) constness { \
154
204
  GMOCK_MOCKER_($i, constness, Method).RegisterOwner(this); \
155
- return GMOCK_MOCKER_($i, constness, Method).With($as); \
205
+ return GMOCK_MOCKER_($i, constness, Method).With($matcher_as); \
156
206
  } \
207
+ ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
208
+ const ::testing::internal::WithoutMatchers&, \
209
+ constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
210
+ return ::testing::internal::AdjustConstness_##constness(this)-> \
211
+ gmock_##Method($anything_matchers); \
212
+ } \
157
213
  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_($i, constness, Method)
158
214
 
159
215
 
@@ -263,7 +319,7 @@ class MockFunction;
263
319
  $for i [[
264
320
  $range j 0..i-1
265
321
  $var ArgTypes = [[$for j, [[A$j]]]]
266
- $var ArgNames = [[$for j, [[a$j]]]]
322
+ $var ArgValues = [[$for j, [[::std::move(a$j)]]]]
267
323
  $var ArgDecls = [[$for j, [[A$j a$j]]]]
268
324
  template <typename R$for j [[, typename A$j]]>
269
325
  class MockFunction<R($ArgTypes)> {
@@ -273,9 +329,9 @@ class MockFunction<R($ArgTypes)> {
273
329
  MOCK_METHOD$i[[]]_T(Call, R($ArgTypes));
274
330
 
275
331
  #if GTEST_HAS_STD_FUNCTION_
276
- std::function<R($ArgTypes)> AsStdFunction() {
332
+ ::std::function<R($ArgTypes)> AsStdFunction() {
277
333
  return [this]($ArgDecls) -> R {
278
- return this->Call($ArgNames);
334
+ return this->Call($ArgValues);
279
335
  };
280
336
  }
281
337
  #endif // GTEST_HAS_STD_FUNCTION_
@@ -779,6 +779,9 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
779
779
 
780
780
  // UnorderedElementsAre(e_1, e_2, ..., e_n) is an ElementsAre extension
781
781
  // that matches n elements in any order. We support up to n=10 arguments.
782
+ //
783
+ // If you have >10 elements, consider UnorderedElementsAreArray() or
784
+ // UnorderedPointwise() instead.
782
785
 
783
786
  inline internal::UnorderedElementsAreMatcher<
784
787
  ::testing::tuple<> >
@@ -1268,7 +1271,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1268
1271
  // using testing::PrintToString;
1269
1272
  //
1270
1273
  // MATCHER_P2(InClosedRange, low, hi,
1271
- // string(negation ? "is not" : "is") + " in range [" +
1274
+ // std::string(negation ? "is not" : "is") + " in range [" +
1272
1275
  // PrintToString(low) + ", " + PrintToString(hi) + "]") {
1273
1276
  // return low <= arg && arg <= hi;
1274
1277
  // }
@@ -1376,18 +1379,21 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1376
1379
  // ================
1377
1380
  //
1378
1381
  // To learn more about using these macros, please search for 'MATCHER'
1379
- // on http://code.google.com/p/googlemock/wiki/CookBook.
1382
+ // on https://github.com/google/googletest/blob/master/googlemock/docs/
1383
+ // CookBook.md
1380
1384
 
1381
1385
  #define MATCHER(name, description)\
1382
1386
  class name##Matcher {\
1383
1387
  public:\
1384
1388
  template <typename arg_type>\
1385
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1389
+ class gmock_Impl : public ::testing::MatcherInterface<\
1390
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1386
1391
  public:\
1387
1392
  gmock_Impl()\
1388
1393
  {}\
1389
1394
  virtual bool MatchAndExplain(\
1390
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1395
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1396
+ ::testing::MatchResultListener* result_listener) const;\
1391
1397
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
1392
1398
  *gmock_os << FormatDescription(false);\
1393
1399
  }\
@@ -1395,8 +1401,8 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1395
1401
  *gmock_os << FormatDescription(true);\
1396
1402
  }\
1397
1403
  private:\
1398
- ::testing::internal::string FormatDescription(bool negation) const {\
1399
- const ::testing::internal::string gmock_description = (description);\
1404
+ ::std::string FormatDescription(bool negation) const {\
1405
+ ::std::string gmock_description = (description);\
1400
1406
  if (!gmock_description.empty())\
1401
1407
  return gmock_description;\
1402
1408
  return ::testing::internal::FormatMatcherDescription(\
@@ -1404,7 +1410,6 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1404
1410
  ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1405
1411
  ::testing::tuple<>()));\
1406
1412
  }\
1407
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1408
1413
  };\
1409
1414
  template <typename arg_type>\
1410
1415
  operator ::testing::Matcher<arg_type>() const {\
@@ -1414,14 +1419,13 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1414
1419
  name##Matcher() {\
1415
1420
  }\
1416
1421
  private:\
1417
- GTEST_DISALLOW_ASSIGN_(name##Matcher);\
1418
1422
  };\
1419
1423
  inline name##Matcher name() {\
1420
1424
  return name##Matcher();\
1421
1425
  }\
1422
1426
  template <typename arg_type>\
1423
1427
  bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(\
1424
- arg_type arg, \
1428
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1425
1429
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1426
1430
  const
1427
1431
 
@@ -1430,22 +1434,24 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1430
1434
  class name##MatcherP {\
1431
1435
  public:\
1432
1436
  template <typename arg_type>\
1433
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1437
+ class gmock_Impl : public ::testing::MatcherInterface<\
1438
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1434
1439
  public:\
1435
1440
  explicit gmock_Impl(p0##_type gmock_p0)\
1436
- : p0(gmock_p0) {}\
1441
+ : p0(::testing::internal::move(gmock_p0)) {}\
1437
1442
  virtual bool MatchAndExplain(\
1438
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1443
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1444
+ ::testing::MatchResultListener* result_listener) const;\
1439
1445
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
1440
1446
  *gmock_os << FormatDescription(false);\
1441
1447
  }\
1442
1448
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1443
1449
  *gmock_os << FormatDescription(true);\
1444
1450
  }\
1445
- p0##_type p0;\
1451
+ p0##_type const p0;\
1446
1452
  private:\
1447
- ::testing::internal::string FormatDescription(bool negation) const {\
1448
- const ::testing::internal::string gmock_description = (description);\
1453
+ ::std::string FormatDescription(bool negation) const {\
1454
+ ::std::string gmock_description = (description);\
1449
1455
  if (!gmock_description.empty())\
1450
1456
  return gmock_description;\
1451
1457
  return ::testing::internal::FormatMatcherDescription(\
@@ -1453,18 +1459,17 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1453
1459
  ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1454
1460
  ::testing::tuple<p0##_type>(p0)));\
1455
1461
  }\
1456
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1457
1462
  };\
1458
1463
  template <typename arg_type>\
1459
1464
  operator ::testing::Matcher<arg_type>() const {\
1460
1465
  return ::testing::Matcher<arg_type>(\
1461
1466
  new gmock_Impl<arg_type>(p0));\
1462
1467
  }\
1463
- explicit name##MatcherP(p0##_type gmock_p0) : p0(gmock_p0) {\
1468
+ explicit name##MatcherP(p0##_type gmock_p0) : \
1469
+ p0(::testing::internal::move(gmock_p0)) {\
1464
1470
  }\
1465
- p0##_type p0;\
1471
+ p0##_type const p0;\
1466
1472
  private:\
1467
- GTEST_DISALLOW_ASSIGN_(name##MatcherP);\
1468
1473
  };\
1469
1474
  template <typename p0##_type>\
1470
1475
  inline name##MatcherP<p0##_type> name(p0##_type p0) {\
@@ -1473,7 +1478,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1473
1478
  template <typename p0##_type>\
1474
1479
  template <typename arg_type>\
1475
1480
  bool name##MatcherP<p0##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1476
- arg_type arg, \
1481
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1477
1482
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1478
1483
  const
1479
1484
 
@@ -1482,23 +1487,26 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1482
1487
  class name##MatcherP2 {\
1483
1488
  public:\
1484
1489
  template <typename arg_type>\
1485
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1490
+ class gmock_Impl : public ::testing::MatcherInterface<\
1491
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1486
1492
  public:\
1487
1493
  gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\
1488
- : p0(gmock_p0), p1(gmock_p1) {}\
1494
+ : p0(::testing::internal::move(gmock_p0)), \
1495
+ p1(::testing::internal::move(gmock_p1)) {}\
1489
1496
  virtual bool MatchAndExplain(\
1490
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1497
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1498
+ ::testing::MatchResultListener* result_listener) const;\
1491
1499
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
1492
1500
  *gmock_os << FormatDescription(false);\
1493
1501
  }\
1494
1502
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1495
1503
  *gmock_os << FormatDescription(true);\
1496
1504
  }\
1497
- p0##_type p0;\
1498
- p1##_type p1;\
1505
+ p0##_type const p0;\
1506
+ p1##_type const p1;\
1499
1507
  private:\
1500
- ::testing::internal::string FormatDescription(bool negation) const {\
1501
- const ::testing::internal::string gmock_description = (description);\
1508
+ ::std::string FormatDescription(bool negation) const {\
1509
+ ::std::string gmock_description = (description);\
1502
1510
  if (!gmock_description.empty())\
1503
1511
  return gmock_description;\
1504
1512
  return ::testing::internal::FormatMatcherDescription(\
@@ -1506,20 +1514,19 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1506
1514
  ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1507
1515
  ::testing::tuple<p0##_type, p1##_type>(p0, p1)));\
1508
1516
  }\
1509
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1510
1517
  };\
1511
1518
  template <typename arg_type>\
1512
1519
  operator ::testing::Matcher<arg_type>() const {\
1513
1520
  return ::testing::Matcher<arg_type>(\
1514
1521
  new gmock_Impl<arg_type>(p0, p1));\
1515
1522
  }\
1516
- name##MatcherP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
1517
- p1(gmock_p1) {\
1523
+ name##MatcherP2(p0##_type gmock_p0, \
1524
+ p1##_type gmock_p1) : p0(::testing::internal::move(gmock_p0)), \
1525
+ p1(::testing::internal::move(gmock_p1)) {\
1518
1526
  }\
1519
- p0##_type p0;\
1520
- p1##_type p1;\
1527
+ p0##_type const p0;\
1528
+ p1##_type const p1;\
1521
1529
  private:\
1522
- GTEST_DISALLOW_ASSIGN_(name##MatcherP2);\
1523
1530
  };\
1524
1531
  template <typename p0##_type, typename p1##_type>\
1525
1532
  inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \
@@ -1530,7 +1537,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1530
1537
  template <typename arg_type>\
1531
1538
  bool name##MatcherP2<p0##_type, \
1532
1539
  p1##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1533
- arg_type arg, \
1540
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1534
1541
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1535
1542
  const
1536
1543
 
@@ -1539,24 +1546,28 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1539
1546
  class name##MatcherP3 {\
1540
1547
  public:\
1541
1548
  template <typename arg_type>\
1542
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1549
+ class gmock_Impl : public ::testing::MatcherInterface<\
1550
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1543
1551
  public:\
1544
1552
  gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\
1545
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
1553
+ : p0(::testing::internal::move(gmock_p0)), \
1554
+ p1(::testing::internal::move(gmock_p1)), \
1555
+ p2(::testing::internal::move(gmock_p2)) {}\
1546
1556
  virtual bool MatchAndExplain(\
1547
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1557
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1558
+ ::testing::MatchResultListener* result_listener) const;\
1548
1559
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
1549
1560
  *gmock_os << FormatDescription(false);\
1550
1561
  }\
1551
1562
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1552
1563
  *gmock_os << FormatDescription(true);\
1553
1564
  }\
1554
- p0##_type p0;\
1555
- p1##_type p1;\
1556
- p2##_type p2;\
1565
+ p0##_type const p0;\
1566
+ p1##_type const p1;\
1567
+ p2##_type const p2;\
1557
1568
  private:\
1558
- ::testing::internal::string FormatDescription(bool negation) const {\
1559
- const ::testing::internal::string gmock_description = (description);\
1569
+ ::std::string FormatDescription(bool negation) const {\
1570
+ ::std::string gmock_description = (description);\
1560
1571
  if (!gmock_description.empty())\
1561
1572
  return gmock_description;\
1562
1573
  return ::testing::internal::FormatMatcherDescription(\
@@ -1565,7 +1576,6 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1565
1576
  ::testing::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \
1566
1577
  p2)));\
1567
1578
  }\
1568
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1569
1579
  };\
1570
1580
  template <typename arg_type>\
1571
1581
  operator ::testing::Matcher<arg_type>() const {\
@@ -1573,13 +1583,14 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1573
1583
  new gmock_Impl<arg_type>(p0, p1, p2));\
1574
1584
  }\
1575
1585
  name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \
1576
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {\
1586
+ p2##_type gmock_p2) : p0(::testing::internal::move(gmock_p0)), \
1587
+ p1(::testing::internal::move(gmock_p1)), \
1588
+ p2(::testing::internal::move(gmock_p2)) {\
1577
1589
  }\
1578
- p0##_type p0;\
1579
- p1##_type p1;\
1580
- p2##_type p2;\
1590
+ p0##_type const p0;\
1591
+ p1##_type const p1;\
1592
+ p2##_type const p2;\
1581
1593
  private:\
1582
- GTEST_DISALLOW_ASSIGN_(name##MatcherP3);\
1583
1594
  };\
1584
1595
  template <typename p0##_type, typename p1##_type, typename p2##_type>\
1585
1596
  inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
@@ -1590,7 +1601,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1590
1601
  template <typename arg_type>\
1591
1602
  bool name##MatcherP3<p0##_type, p1##_type, \
1592
1603
  p2##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1593
- arg_type arg, \
1604
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1594
1605
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1595
1606
  const
1596
1607
 
@@ -1600,26 +1611,31 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1600
1611
  class name##MatcherP4 {\
1601
1612
  public:\
1602
1613
  template <typename arg_type>\
1603
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1614
+ class gmock_Impl : public ::testing::MatcherInterface<\
1615
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1604
1616
  public:\
1605
1617
  gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1606
1618
  p3##_type gmock_p3)\
1607
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3) {}\
1619
+ : p0(::testing::internal::move(gmock_p0)), \
1620
+ p1(::testing::internal::move(gmock_p1)), \
1621
+ p2(::testing::internal::move(gmock_p2)), \
1622
+ p3(::testing::internal::move(gmock_p3)) {}\
1608
1623
  virtual bool MatchAndExplain(\
1609
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1624
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1625
+ ::testing::MatchResultListener* result_listener) const;\
1610
1626
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
1611
1627
  *gmock_os << FormatDescription(false);\
1612
1628
  }\
1613
1629
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1614
1630
  *gmock_os << FormatDescription(true);\
1615
1631
  }\
1616
- p0##_type p0;\
1617
- p1##_type p1;\
1618
- p2##_type p2;\
1619
- p3##_type p3;\
1632
+ p0##_type const p0;\
1633
+ p1##_type const p1;\
1634
+ p2##_type const p2;\
1635
+ p3##_type const p3;\
1620
1636
  private:\
1621
- ::testing::internal::string FormatDescription(bool negation) const {\
1622
- const ::testing::internal::string gmock_description = (description);\
1637
+ ::std::string FormatDescription(bool negation) const {\
1638
+ ::std::string gmock_description = (description);\
1623
1639
  if (!gmock_description.empty())\
1624
1640
  return gmock_description;\
1625
1641
  return ::testing::internal::FormatMatcherDescription(\
@@ -1628,7 +1644,6 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1628
1644
  ::testing::tuple<p0##_type, p1##_type, p2##_type, \
1629
1645
  p3##_type>(p0, p1, p2, p3)));\
1630
1646
  }\
1631
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1632
1647
  };\
1633
1648
  template <typename arg_type>\
1634
1649
  operator ::testing::Matcher<arg_type>() const {\
@@ -1636,15 +1651,17 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1636
1651
  new gmock_Impl<arg_type>(p0, p1, p2, p3));\
1637
1652
  }\
1638
1653
  name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \
1639
- p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \
1640
- p2(gmock_p2), p3(gmock_p3) {\
1654
+ p2##_type gmock_p2, \
1655
+ p3##_type gmock_p3) : p0(::testing::internal::move(gmock_p0)), \
1656
+ p1(::testing::internal::move(gmock_p1)), \
1657
+ p2(::testing::internal::move(gmock_p2)), \
1658
+ p3(::testing::internal::move(gmock_p3)) {\
1641
1659
  }\
1642
- p0##_type p0;\
1643
- p1##_type p1;\
1644
- p2##_type p2;\
1645
- p3##_type p3;\
1660
+ p0##_type const p0;\
1661
+ p1##_type const p1;\
1662
+ p2##_type const p2;\
1663
+ p3##_type const p3;\
1646
1664
  private:\
1647
- GTEST_DISALLOW_ASSIGN_(name##MatcherP4);\
1648
1665
  };\
1649
1666
  template <typename p0##_type, typename p1##_type, typename p2##_type, \
1650
1667
  typename p3##_type>\
@@ -1659,7 +1676,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1659
1676
  template <typename arg_type>\
1660
1677
  bool name##MatcherP4<p0##_type, p1##_type, p2##_type, \
1661
1678
  p3##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1662
- arg_type arg, \
1679
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1663
1680
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1664
1681
  const
1665
1682
 
@@ -1669,28 +1686,33 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1669
1686
  class name##MatcherP5 {\
1670
1687
  public:\
1671
1688
  template <typename arg_type>\
1672
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1689
+ class gmock_Impl : public ::testing::MatcherInterface<\
1690
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1673
1691
  public:\
1674
1692
  gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1675
1693
  p3##_type gmock_p3, p4##_type gmock_p4)\
1676
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
1677
- p4(gmock_p4) {}\
1694
+ : p0(::testing::internal::move(gmock_p0)), \
1695
+ p1(::testing::internal::move(gmock_p1)), \
1696
+ p2(::testing::internal::move(gmock_p2)), \
1697
+ p3(::testing::internal::move(gmock_p3)), \
1698
+ p4(::testing::internal::move(gmock_p4)) {}\
1678
1699
  virtual bool MatchAndExplain(\
1679
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1700
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1701
+ ::testing::MatchResultListener* result_listener) const;\
1680
1702
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
1681
1703
  *gmock_os << FormatDescription(false);\
1682
1704
  }\
1683
1705
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1684
1706
  *gmock_os << FormatDescription(true);\
1685
1707
  }\
1686
- p0##_type p0;\
1687
- p1##_type p1;\
1688
- p2##_type p2;\
1689
- p3##_type p3;\
1690
- p4##_type p4;\
1708
+ p0##_type const p0;\
1709
+ p1##_type const p1;\
1710
+ p2##_type const p2;\
1711
+ p3##_type const p3;\
1712
+ p4##_type const p4;\
1691
1713
  private:\
1692
- ::testing::internal::string FormatDescription(bool negation) const {\
1693
- const ::testing::internal::string gmock_description = (description);\
1714
+ ::std::string FormatDescription(bool negation) const {\
1715
+ ::std::string gmock_description = (description);\
1694
1716
  if (!gmock_description.empty())\
1695
1717
  return gmock_description;\
1696
1718
  return ::testing::internal::FormatMatcherDescription(\
@@ -1699,7 +1721,6 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1699
1721
  ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1700
1722
  p4##_type>(p0, p1, p2, p3, p4)));\
1701
1723
  }\
1702
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1703
1724
  };\
1704
1725
  template <typename arg_type>\
1705
1726
  operator ::testing::Matcher<arg_type>() const {\
@@ -1708,16 +1729,18 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1708
1729
  }\
1709
1730
  name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \
1710
1731
  p2##_type gmock_p2, p3##_type gmock_p3, \
1711
- p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1712
- p3(gmock_p3), p4(gmock_p4) {\
1732
+ p4##_type gmock_p4) : p0(::testing::internal::move(gmock_p0)), \
1733
+ p1(::testing::internal::move(gmock_p1)), \
1734
+ p2(::testing::internal::move(gmock_p2)), \
1735
+ p3(::testing::internal::move(gmock_p3)), \
1736
+ p4(::testing::internal::move(gmock_p4)) {\
1713
1737
  }\
1714
- p0##_type p0;\
1715
- p1##_type p1;\
1716
- p2##_type p2;\
1717
- p3##_type p3;\
1718
- p4##_type p4;\
1738
+ p0##_type const p0;\
1739
+ p1##_type const p1;\
1740
+ p2##_type const p2;\
1741
+ p3##_type const p3;\
1742
+ p4##_type const p4;\
1719
1743
  private:\
1720
- GTEST_DISALLOW_ASSIGN_(name##MatcherP5);\
1721
1744
  };\
1722
1745
  template <typename p0##_type, typename p1##_type, typename p2##_type, \
1723
1746
  typename p3##_type, typename p4##_type>\
@@ -1732,7 +1755,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1732
1755
  template <typename arg_type>\
1733
1756
  bool name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1734
1757
  p4##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1735
- arg_type arg, \
1758
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1736
1759
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1737
1760
  const
1738
1761
 
@@ -1742,29 +1765,35 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1742
1765
  class name##MatcherP6 {\
1743
1766
  public:\
1744
1767
  template <typename arg_type>\
1745
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1768
+ class gmock_Impl : public ::testing::MatcherInterface<\
1769
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1746
1770
  public:\
1747
1771
  gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1748
1772
  p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5)\
1749
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
1750
- p4(gmock_p4), p5(gmock_p5) {}\
1773
+ : p0(::testing::internal::move(gmock_p0)), \
1774
+ p1(::testing::internal::move(gmock_p1)), \
1775
+ p2(::testing::internal::move(gmock_p2)), \
1776
+ p3(::testing::internal::move(gmock_p3)), \
1777
+ p4(::testing::internal::move(gmock_p4)), \
1778
+ p5(::testing::internal::move(gmock_p5)) {}\
1751
1779
  virtual bool MatchAndExplain(\
1752
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1780
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1781
+ ::testing::MatchResultListener* result_listener) const;\
1753
1782
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
1754
1783
  *gmock_os << FormatDescription(false);\
1755
1784
  }\
1756
1785
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1757
1786
  *gmock_os << FormatDescription(true);\
1758
1787
  }\
1759
- p0##_type p0;\
1760
- p1##_type p1;\
1761
- p2##_type p2;\
1762
- p3##_type p3;\
1763
- p4##_type p4;\
1764
- p5##_type p5;\
1788
+ p0##_type const p0;\
1789
+ p1##_type const p1;\
1790
+ p2##_type const p2;\
1791
+ p3##_type const p3;\
1792
+ p4##_type const p4;\
1793
+ p5##_type const p5;\
1765
1794
  private:\
1766
- ::testing::internal::string FormatDescription(bool negation) const {\
1767
- const ::testing::internal::string gmock_description = (description);\
1795
+ ::std::string FormatDescription(bool negation) const {\
1796
+ ::std::string gmock_description = (description);\
1768
1797
  if (!gmock_description.empty())\
1769
1798
  return gmock_description;\
1770
1799
  return ::testing::internal::FormatMatcherDescription(\
@@ -1773,7 +1802,6 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1773
1802
  ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1774
1803
  p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\
1775
1804
  }\
1776
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1777
1805
  };\
1778
1806
  template <typename arg_type>\
1779
1807
  operator ::testing::Matcher<arg_type>() const {\
@@ -1782,17 +1810,20 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1782
1810
  }\
1783
1811
  name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \
1784
1812
  p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1785
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1786
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {\
1813
+ p5##_type gmock_p5) : p0(::testing::internal::move(gmock_p0)), \
1814
+ p1(::testing::internal::move(gmock_p1)), \
1815
+ p2(::testing::internal::move(gmock_p2)), \
1816
+ p3(::testing::internal::move(gmock_p3)), \
1817
+ p4(::testing::internal::move(gmock_p4)), \
1818
+ p5(::testing::internal::move(gmock_p5)) {\
1787
1819
  }\
1788
- p0##_type p0;\
1789
- p1##_type p1;\
1790
- p2##_type p2;\
1791
- p3##_type p3;\
1792
- p4##_type p4;\
1793
- p5##_type p5;\
1820
+ p0##_type const p0;\
1821
+ p1##_type const p1;\
1822
+ p2##_type const p2;\
1823
+ p3##_type const p3;\
1824
+ p4##_type const p4;\
1825
+ p5##_type const p5;\
1794
1826
  private:\
1795
- GTEST_DISALLOW_ASSIGN_(name##MatcherP6);\
1796
1827
  };\
1797
1828
  template <typename p0##_type, typename p1##_type, typename p2##_type, \
1798
1829
  typename p3##_type, typename p4##_type, typename p5##_type>\
@@ -1807,7 +1838,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1807
1838
  template <typename arg_type>\
1808
1839
  bool name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1809
1840
  p5##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1810
- arg_type arg, \
1841
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1811
1842
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1812
1843
  const
1813
1844
 
@@ -1818,31 +1849,38 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1818
1849
  class name##MatcherP7 {\
1819
1850
  public:\
1820
1851
  template <typename arg_type>\
1821
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1852
+ class gmock_Impl : public ::testing::MatcherInterface<\
1853
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1822
1854
  public:\
1823
1855
  gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1824
1856
  p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1825
1857
  p6##_type gmock_p6)\
1826
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
1827
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\
1858
+ : p0(::testing::internal::move(gmock_p0)), \
1859
+ p1(::testing::internal::move(gmock_p1)), \
1860
+ p2(::testing::internal::move(gmock_p2)), \
1861
+ p3(::testing::internal::move(gmock_p3)), \
1862
+ p4(::testing::internal::move(gmock_p4)), \
1863
+ p5(::testing::internal::move(gmock_p5)), \
1864
+ p6(::testing::internal::move(gmock_p6)) {}\
1828
1865
  virtual bool MatchAndExplain(\
1829
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1866
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1867
+ ::testing::MatchResultListener* result_listener) const;\
1830
1868
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
1831
1869
  *gmock_os << FormatDescription(false);\
1832
1870
  }\
1833
1871
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1834
1872
  *gmock_os << FormatDescription(true);\
1835
1873
  }\
1836
- p0##_type p0;\
1837
- p1##_type p1;\
1838
- p2##_type p2;\
1839
- p3##_type p3;\
1840
- p4##_type p4;\
1841
- p5##_type p5;\
1842
- p6##_type p6;\
1874
+ p0##_type const p0;\
1875
+ p1##_type const p1;\
1876
+ p2##_type const p2;\
1877
+ p3##_type const p3;\
1878
+ p4##_type const p4;\
1879
+ p5##_type const p5;\
1880
+ p6##_type const p6;\
1843
1881
  private:\
1844
- ::testing::internal::string FormatDescription(bool negation) const {\
1845
- const ::testing::internal::string gmock_description = (description);\
1882
+ ::std::string FormatDescription(bool negation) const {\
1883
+ ::std::string gmock_description = (description);\
1846
1884
  if (!gmock_description.empty())\
1847
1885
  return gmock_description;\
1848
1886
  return ::testing::internal::FormatMatcherDescription(\
@@ -1852,7 +1890,6 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1852
1890
  p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \
1853
1891
  p6)));\
1854
1892
  }\
1855
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1856
1893
  };\
1857
1894
  template <typename arg_type>\
1858
1895
  operator ::testing::Matcher<arg_type>() const {\
@@ -1861,19 +1898,23 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1861
1898
  }\
1862
1899
  name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \
1863
1900
  p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1864
- p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \
1865
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \
1866
- p6(gmock_p6) {\
1901
+ p5##_type gmock_p5, \
1902
+ p6##_type gmock_p6) : p0(::testing::internal::move(gmock_p0)), \
1903
+ p1(::testing::internal::move(gmock_p1)), \
1904
+ p2(::testing::internal::move(gmock_p2)), \
1905
+ p3(::testing::internal::move(gmock_p3)), \
1906
+ p4(::testing::internal::move(gmock_p4)), \
1907
+ p5(::testing::internal::move(gmock_p5)), \
1908
+ p6(::testing::internal::move(gmock_p6)) {\
1867
1909
  }\
1868
- p0##_type p0;\
1869
- p1##_type p1;\
1870
- p2##_type p2;\
1871
- p3##_type p3;\
1872
- p4##_type p4;\
1873
- p5##_type p5;\
1874
- p6##_type p6;\
1910
+ p0##_type const p0;\
1911
+ p1##_type const p1;\
1912
+ p2##_type const p2;\
1913
+ p3##_type const p3;\
1914
+ p4##_type const p4;\
1915
+ p5##_type const p5;\
1916
+ p6##_type const p6;\
1875
1917
  private:\
1876
- GTEST_DISALLOW_ASSIGN_(name##MatcherP7);\
1877
1918
  };\
1878
1919
  template <typename p0##_type, typename p1##_type, typename p2##_type, \
1879
1920
  typename p3##_type, typename p4##_type, typename p5##_type, \
@@ -1891,7 +1932,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1891
1932
  template <typename arg_type>\
1892
1933
  bool name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1893
1934
  p5##_type, p6##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1894
- arg_type arg, \
1935
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1895
1936
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1896
1937
  const
1897
1938
 
@@ -1902,32 +1943,40 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1902
1943
  class name##MatcherP8 {\
1903
1944
  public:\
1904
1945
  template <typename arg_type>\
1905
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1946
+ class gmock_Impl : public ::testing::MatcherInterface<\
1947
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1906
1948
  public:\
1907
1949
  gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1908
1950
  p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1909
1951
  p6##_type gmock_p6, p7##_type gmock_p7)\
1910
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
1911
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\
1952
+ : p0(::testing::internal::move(gmock_p0)), \
1953
+ p1(::testing::internal::move(gmock_p1)), \
1954
+ p2(::testing::internal::move(gmock_p2)), \
1955
+ p3(::testing::internal::move(gmock_p3)), \
1956
+ p4(::testing::internal::move(gmock_p4)), \
1957
+ p5(::testing::internal::move(gmock_p5)), \
1958
+ p6(::testing::internal::move(gmock_p6)), \
1959
+ p7(::testing::internal::move(gmock_p7)) {}\
1912
1960
  virtual bool MatchAndExplain(\
1913
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1961
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1962
+ ::testing::MatchResultListener* result_listener) const;\
1914
1963
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
1915
1964
  *gmock_os << FormatDescription(false);\
1916
1965
  }\
1917
1966
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1918
1967
  *gmock_os << FormatDescription(true);\
1919
1968
  }\
1920
- p0##_type p0;\
1921
- p1##_type p1;\
1922
- p2##_type p2;\
1923
- p3##_type p3;\
1924
- p4##_type p4;\
1925
- p5##_type p5;\
1926
- p6##_type p6;\
1927
- p7##_type p7;\
1969
+ p0##_type const p0;\
1970
+ p1##_type const p1;\
1971
+ p2##_type const p2;\
1972
+ p3##_type const p3;\
1973
+ p4##_type const p4;\
1974
+ p5##_type const p5;\
1975
+ p6##_type const p6;\
1976
+ p7##_type const p7;\
1928
1977
  private:\
1929
- ::testing::internal::string FormatDescription(bool negation) const {\
1930
- const ::testing::internal::string gmock_description = (description);\
1978
+ ::std::string FormatDescription(bool negation) const {\
1979
+ ::std::string gmock_description = (description);\
1931
1980
  if (!gmock_description.empty())\
1932
1981
  return gmock_description;\
1933
1982
  return ::testing::internal::FormatMatcherDescription(\
@@ -1937,7 +1986,6 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1937
1986
  p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \
1938
1987
  p3, p4, p5, p6, p7)));\
1939
1988
  }\
1940
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1941
1989
  };\
1942
1990
  template <typename arg_type>\
1943
1991
  operator ::testing::Matcher<arg_type>() const {\
@@ -1947,20 +1995,24 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1947
1995
  name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \
1948
1996
  p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1949
1997
  p5##_type gmock_p5, p6##_type gmock_p6, \
1950
- p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1951
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
1952
- p7(gmock_p7) {\
1998
+ p7##_type gmock_p7) : p0(::testing::internal::move(gmock_p0)), \
1999
+ p1(::testing::internal::move(gmock_p1)), \
2000
+ p2(::testing::internal::move(gmock_p2)), \
2001
+ p3(::testing::internal::move(gmock_p3)), \
2002
+ p4(::testing::internal::move(gmock_p4)), \
2003
+ p5(::testing::internal::move(gmock_p5)), \
2004
+ p6(::testing::internal::move(gmock_p6)), \
2005
+ p7(::testing::internal::move(gmock_p7)) {\
1953
2006
  }\
1954
- p0##_type p0;\
1955
- p1##_type p1;\
1956
- p2##_type p2;\
1957
- p3##_type p3;\
1958
- p4##_type p4;\
1959
- p5##_type p5;\
1960
- p6##_type p6;\
1961
- p7##_type p7;\
2007
+ p0##_type const p0;\
2008
+ p1##_type const p1;\
2009
+ p2##_type const p2;\
2010
+ p3##_type const p3;\
2011
+ p4##_type const p4;\
2012
+ p5##_type const p5;\
2013
+ p6##_type const p6;\
2014
+ p7##_type const p7;\
1962
2015
  private:\
1963
- GTEST_DISALLOW_ASSIGN_(name##MatcherP8);\
1964
2016
  };\
1965
2017
  template <typename p0##_type, typename p1##_type, typename p2##_type, \
1966
2018
  typename p3##_type, typename p4##_type, typename p5##_type, \
@@ -1980,7 +2032,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1980
2032
  bool name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1981
2033
  p5##_type, p6##_type, \
1982
2034
  p7##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1983
- arg_type arg, \
2035
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1984
2036
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1985
2037
  const
1986
2038
 
@@ -1991,34 +2043,42 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1991
2043
  class name##MatcherP9 {\
1992
2044
  public:\
1993
2045
  template <typename arg_type>\
1994
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
2046
+ class gmock_Impl : public ::testing::MatcherInterface<\
2047
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1995
2048
  public:\
1996
2049
  gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1997
2050
  p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1998
2051
  p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8)\
1999
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
2000
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
2001
- p8(gmock_p8) {}\
2052
+ : p0(::testing::internal::move(gmock_p0)), \
2053
+ p1(::testing::internal::move(gmock_p1)), \
2054
+ p2(::testing::internal::move(gmock_p2)), \
2055
+ p3(::testing::internal::move(gmock_p3)), \
2056
+ p4(::testing::internal::move(gmock_p4)), \
2057
+ p5(::testing::internal::move(gmock_p5)), \
2058
+ p6(::testing::internal::move(gmock_p6)), \
2059
+ p7(::testing::internal::move(gmock_p7)), \
2060
+ p8(::testing::internal::move(gmock_p8)) {}\
2002
2061
  virtual bool MatchAndExplain(\
2003
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
2062
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2063
+ ::testing::MatchResultListener* result_listener) const;\
2004
2064
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
2005
2065
  *gmock_os << FormatDescription(false);\
2006
2066
  }\
2007
2067
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
2008
2068
  *gmock_os << FormatDescription(true);\
2009
2069
  }\
2010
- p0##_type p0;\
2011
- p1##_type p1;\
2012
- p2##_type p2;\
2013
- p3##_type p3;\
2014
- p4##_type p4;\
2015
- p5##_type p5;\
2016
- p6##_type p6;\
2017
- p7##_type p7;\
2018
- p8##_type p8;\
2070
+ p0##_type const p0;\
2071
+ p1##_type const p1;\
2072
+ p2##_type const p2;\
2073
+ p3##_type const p3;\
2074
+ p4##_type const p4;\
2075
+ p5##_type const p5;\
2076
+ p6##_type const p6;\
2077
+ p7##_type const p7;\
2078
+ p8##_type const p8;\
2019
2079
  private:\
2020
- ::testing::internal::string FormatDescription(bool negation) const {\
2021
- const ::testing::internal::string gmock_description = (description);\
2080
+ ::std::string FormatDescription(bool negation) const {\
2081
+ ::std::string gmock_description = (description);\
2022
2082
  if (!gmock_description.empty())\
2023
2083
  return gmock_description;\
2024
2084
  return ::testing::internal::FormatMatcherDescription(\
@@ -2028,7 +2088,6 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
2028
2088
  p4##_type, p5##_type, p6##_type, p7##_type, \
2029
2089
  p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\
2030
2090
  }\
2031
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
2032
2091
  };\
2033
2092
  template <typename arg_type>\
2034
2093
  operator ::testing::Matcher<arg_type>() const {\
@@ -2038,21 +2097,26 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
2038
2097
  name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \
2039
2098
  p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
2040
2099
  p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
2041
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
2042
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
2043
- p8(gmock_p8) {\
2100
+ p8##_type gmock_p8) : p0(::testing::internal::move(gmock_p0)), \
2101
+ p1(::testing::internal::move(gmock_p1)), \
2102
+ p2(::testing::internal::move(gmock_p2)), \
2103
+ p3(::testing::internal::move(gmock_p3)), \
2104
+ p4(::testing::internal::move(gmock_p4)), \
2105
+ p5(::testing::internal::move(gmock_p5)), \
2106
+ p6(::testing::internal::move(gmock_p6)), \
2107
+ p7(::testing::internal::move(gmock_p7)), \
2108
+ p8(::testing::internal::move(gmock_p8)) {\
2044
2109
  }\
2045
- p0##_type p0;\
2046
- p1##_type p1;\
2047
- p2##_type p2;\
2048
- p3##_type p3;\
2049
- p4##_type p4;\
2050
- p5##_type p5;\
2051
- p6##_type p6;\
2052
- p7##_type p7;\
2053
- p8##_type p8;\
2110
+ p0##_type const p0;\
2111
+ p1##_type const p1;\
2112
+ p2##_type const p2;\
2113
+ p3##_type const p3;\
2114
+ p4##_type const p4;\
2115
+ p5##_type const p5;\
2116
+ p6##_type const p6;\
2117
+ p7##_type const p7;\
2118
+ p8##_type const p8;\
2054
2119
  private:\
2055
- GTEST_DISALLOW_ASSIGN_(name##MatcherP9);\
2056
2120
  };\
2057
2121
  template <typename p0##_type, typename p1##_type, typename p2##_type, \
2058
2122
  typename p3##_type, typename p4##_type, typename p5##_type, \
@@ -2073,7 +2137,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
2073
2137
  bool name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
2074
2138
  p5##_type, p6##_type, p7##_type, \
2075
2139
  p8##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2076
- arg_type arg, \
2140
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2077
2141
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
2078
2142
  const
2079
2143
 
@@ -2085,36 +2149,45 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
2085
2149
  class name##MatcherP10 {\
2086
2150
  public:\
2087
2151
  template <typename arg_type>\
2088
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
2152
+ class gmock_Impl : public ::testing::MatcherInterface<\
2153
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
2089
2154
  public:\
2090
2155
  gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
2091
2156
  p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
2092
2157
  p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
2093
2158
  p9##_type gmock_p9)\
2094
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
2095
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
2096
- p8(gmock_p8), p9(gmock_p9) {}\
2159
+ : p0(::testing::internal::move(gmock_p0)), \
2160
+ p1(::testing::internal::move(gmock_p1)), \
2161
+ p2(::testing::internal::move(gmock_p2)), \
2162
+ p3(::testing::internal::move(gmock_p3)), \
2163
+ p4(::testing::internal::move(gmock_p4)), \
2164
+ p5(::testing::internal::move(gmock_p5)), \
2165
+ p6(::testing::internal::move(gmock_p6)), \
2166
+ p7(::testing::internal::move(gmock_p7)), \
2167
+ p8(::testing::internal::move(gmock_p8)), \
2168
+ p9(::testing::internal::move(gmock_p9)) {}\
2097
2169
  virtual bool MatchAndExplain(\
2098
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
2170
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2171
+ ::testing::MatchResultListener* result_listener) const;\
2099
2172
  virtual void DescribeTo(::std::ostream* gmock_os) const {\
2100
2173
  *gmock_os << FormatDescription(false);\
2101
2174
  }\
2102
2175
  virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
2103
2176
  *gmock_os << FormatDescription(true);\
2104
2177
  }\
2105
- p0##_type p0;\
2106
- p1##_type p1;\
2107
- p2##_type p2;\
2108
- p3##_type p3;\
2109
- p4##_type p4;\
2110
- p5##_type p5;\
2111
- p6##_type p6;\
2112
- p7##_type p7;\
2113
- p8##_type p8;\
2114
- p9##_type p9;\
2178
+ p0##_type const p0;\
2179
+ p1##_type const p1;\
2180
+ p2##_type const p2;\
2181
+ p3##_type const p3;\
2182
+ p4##_type const p4;\
2183
+ p5##_type const p5;\
2184
+ p6##_type const p6;\
2185
+ p7##_type const p7;\
2186
+ p8##_type const p8;\
2187
+ p9##_type const p9;\
2115
2188
  private:\
2116
- ::testing::internal::string FormatDescription(bool negation) const {\
2117
- const ::testing::internal::string gmock_description = (description);\
2189
+ ::std::string FormatDescription(bool negation) const {\
2190
+ ::std::string gmock_description = (description);\
2118
2191
  if (!gmock_description.empty())\
2119
2192
  return gmock_description;\
2120
2193
  return ::testing::internal::FormatMatcherDescription(\
@@ -2124,7 +2197,6 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
2124
2197
  p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2125
2198
  p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\
2126
2199
  }\
2127
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
2128
2200
  };\
2129
2201
  template <typename arg_type>\
2130
2202
  operator ::testing::Matcher<arg_type>() const {\
@@ -2134,22 +2206,29 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
2134
2206
  name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \
2135
2207
  p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
2136
2208
  p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
2137
- p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \
2138
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
2139
- p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {\
2209
+ p8##_type gmock_p8, \
2210
+ p9##_type gmock_p9) : p0(::testing::internal::move(gmock_p0)), \
2211
+ p1(::testing::internal::move(gmock_p1)), \
2212
+ p2(::testing::internal::move(gmock_p2)), \
2213
+ p3(::testing::internal::move(gmock_p3)), \
2214
+ p4(::testing::internal::move(gmock_p4)), \
2215
+ p5(::testing::internal::move(gmock_p5)), \
2216
+ p6(::testing::internal::move(gmock_p6)), \
2217
+ p7(::testing::internal::move(gmock_p7)), \
2218
+ p8(::testing::internal::move(gmock_p8)), \
2219
+ p9(::testing::internal::move(gmock_p9)) {\
2140
2220
  }\
2141
- p0##_type p0;\
2142
- p1##_type p1;\
2143
- p2##_type p2;\
2144
- p3##_type p3;\
2145
- p4##_type p4;\
2146
- p5##_type p5;\
2147
- p6##_type p6;\
2148
- p7##_type p7;\
2149
- p8##_type p8;\
2150
- p9##_type p9;\
2221
+ p0##_type const p0;\
2222
+ p1##_type const p1;\
2223
+ p2##_type const p2;\
2224
+ p3##_type const p3;\
2225
+ p4##_type const p4;\
2226
+ p5##_type const p5;\
2227
+ p6##_type const p6;\
2228
+ p7##_type const p7;\
2229
+ p8##_type const p8;\
2230
+ p9##_type const p9;\
2151
2231
  private:\
2152
- GTEST_DISALLOW_ASSIGN_(name##MatcherP10);\
2153
2232
  };\
2154
2233
  template <typename p0##_type, typename p1##_type, typename p2##_type, \
2155
2234
  typename p3##_type, typename p4##_type, typename p5##_type, \
@@ -2172,7 +2251,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
2172
2251
  bool name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2173
2252
  p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2174
2253
  p9##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2175
- arg_type arg, \
2254
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2176
2255
  ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
2177
2256
  const
2178
2257