rj_schema 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (323) hide show
  1. checksums.yaml +5 -5
  2. data/Rakefile +4 -0
  3. data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +16 -0
  4. data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +141 -0
  5. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +126 -0
  6. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +202 -0
  7. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +40 -0
  8. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +28 -0
  9. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +224 -0
  10. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +333 -0
  11. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +146 -0
  12. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +562 -0
  13. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +3675 -0
  14. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +280 -0
  15. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +132 -0
  16. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +12 -0
  17. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +439 -0
  18. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +628 -0
  19. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +19 -0
  20. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +525 -0
  21. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +3250 -0
  22. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +11 -0
  23. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +439 -0
  24. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +624 -0
  25. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +534 -0
  26. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +3342 -0
  27. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +12 -0
  28. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +439 -0
  29. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +628 -0
  30. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +556 -0
  31. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +3432 -0
  32. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +12 -0
  33. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +439 -0
  34. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +628 -0
  35. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +1205 -0
  36. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +147 -0
  37. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +2377 -0
  38. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +794 -0
  39. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +1095 -0
  40. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +291 -0
  41. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +2179 -0
  42. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +672 -0
  43. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +397 -0
  44. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +161 -0
  45. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +4399 -0
  46. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +246 -0
  47. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +58 -0
  48. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +1847 -0
  49. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +94 -0
  50. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +8 -0
  51. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +10 -0
  52. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +39 -0
  53. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +46 -0
  54. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +279 -0
  55. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +136 -0
  56. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +511 -0
  57. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +91 -0
  58. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +101 -0
  59. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +32 -0
  60. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +191 -0
  61. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +15 -0
  62. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +187 -0
  63. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +201 -0
  64. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +32 -0
  65. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +82 -0
  66. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +19 -0
  67. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +88 -0
  68. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +101 -0
  69. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +32 -0
  70. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +84 -0
  71. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +19 -0
  72. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +90 -0
  73. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +103 -0
  74. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +240 -0
  75. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +203 -0
  76. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +35 -0
  77. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +115 -0
  78. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  79. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +1733 -0
  80. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +227 -0
  81. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +448 -0
  82. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +59 -0
  83. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +287 -0
  84. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +41 -0
  85. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +31 -0
  86. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +303 -0
  87. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +640 -0
  88. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +1387 -0
  89. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +78 -0
  90. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +47 -0
  91. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +156 -0
  92. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +174 -0
  93. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +498 -0
  94. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +823 -0
  95. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +183 -0
  96. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +54 -0
  97. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +1411 -0
  98. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +428 -0
  99. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +1228 -0
  100. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +622 -0
  101. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +127 -0
  102. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +1286 -0
  103. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +699 -0
  104. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +5648 -0
  105. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +708 -0
  106. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +424 -0
  107. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +43 -0
  108. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +2644 -0
  109. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +51 -0
  110. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +81 -0
  111. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +108 -0
  112. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +100 -0
  113. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +40 -0
  114. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +40 -0
  115. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +669 -0
  116. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +180 -0
  117. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +291 -0
  118. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +310 -0
  119. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +322 -0
  120. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +220 -0
  121. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +112 -0
  122. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +157 -0
  123. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +286 -0
  124. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +37 -0
  125. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +28 -0
  126. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +310 -0
  127. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +280 -0
  128. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +242 -0
  129. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +138 -0
  130. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +54 -0
  131. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +38 -0
  132. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +40 -0
  133. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +82 -0
  134. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +88 -0
  135. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +68 -0
  136. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +2182 -0
  137. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +126 -0
  138. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +14 -0
  139. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/FAQ.md +1087 -0
  140. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +502 -0
  141. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +177 -0
  142. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.md +14 -0
  143. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +2096 -0
  144. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +12 -0
  145. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +886 -0
  146. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +497 -0
  147. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +177 -0
  148. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +93 -0
  149. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +2178 -0
  150. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +14 -0
  151. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +1038 -0
  152. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +501 -0
  153. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +177 -0
  154. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +14 -0
  155. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +93 -0
  156. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +2181 -0
  157. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +14 -0
  158. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +1082 -0
  159. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +501 -0
  160. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +177 -0
  161. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +14 -0
  162. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +93 -0
  163. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +93 -0
  164. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +294 -0
  165. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +250 -0
  166. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +1444 -0
  167. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +510 -0
  168. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +993 -0
  169. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +232 -0
  170. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +179 -0
  171. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +263 -0
  172. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +2236 -0
  173. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +358 -0
  174. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +58 -0
  175. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +69 -0
  176. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
  177. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +41 -0
  178. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +319 -0
  179. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +206 -0
  180. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +1238 -0
  181. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +243 -0
  182. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +5146 -0
  183. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +286 -0
  184. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +731 -0
  185. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +93 -0
  186. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +2554 -0
  187. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +167 -0
  188. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +1020 -0
  189. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +347 -0
  190. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +3331 -0
  191. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +297 -0
  192. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +363 -0
  193. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +74 -0
  194. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +82 -0
  195. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +45 -0
  196. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +126 -0
  197. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +45 -0
  198. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +126 -0
  199. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +129 -0
  200. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +129 -0
  201. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +164 -0
  202. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +164 -0
  203. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +147 -0
  204. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +147 -0
  205. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +123 -0
  206. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +68 -0
  207. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +43 -0
  208. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +144 -0
  209. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +153 -0
  210. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +56 -0
  211. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +85 -0
  212. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +109 -0
  213. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +172 -0
  214. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +151 -0
  215. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +46 -0
  216. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +53 -0
  217. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +45 -0
  218. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +199 -0
  219. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +224 -0
  220. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +130 -0
  221. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +173 -0
  222. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +160 -0
  223. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +83 -0
  224. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +253 -0
  225. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +730 -0
  226. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +274 -0
  227. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +855 -0
  228. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +158 -0
  229. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +59 -0
  230. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1387 -0
  231. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +78 -0
  232. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +48 -0
  233. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +1342 -0
  234. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +387 -0
  235. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +1183 -0
  236. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +1259 -0
  237. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +373 -0
  238. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +110 -0
  239. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +118 -0
  240. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +5388 -0
  241. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +38 -0
  242. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +93 -0
  243. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +1427 -0
  244. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +662 -0
  245. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +154 -0
  246. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +311 -0
  247. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +159 -0
  248. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +215 -0
  249. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +65 -0
  250. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +1055 -0
  251. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +57 -0
  252. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +1304 -0
  253. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +1635 -0
  254. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +208 -0
  255. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +320 -0
  256. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +45 -0
  257. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +380 -0
  258. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +66 -0
  259. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +341 -0
  260. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +47 -0
  261. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +212 -0
  262. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +88 -0
  263. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +237 -0
  264. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +311 -0
  265. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +130 -0
  266. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +71 -0
  267. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +117 -0
  268. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +126 -0
  269. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +192 -0
  270. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +636 -0
  271. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +140 -0
  272. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +172 -0
  273. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +46 -0
  274. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +207 -0
  275. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +157 -0
  276. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +45 -0
  277. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +56 -0
  278. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +340 -0
  279. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +1062 -0
  280. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +743 -0
  281. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +2427 -0
  282. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +127 -0
  283. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +57 -0
  284. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +253 -0
  285. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +325 -0
  286. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +103 -0
  287. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +57 -0
  288. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +256 -0
  289. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +320 -0
  290. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +92 -0
  291. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +171 -0
  292. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +72 -0
  293. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +70 -0
  294. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +43 -0
  295. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +7706 -0
  296. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +49 -0
  297. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +49 -0
  298. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +132 -0
  299. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +308 -0
  300. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +181 -0
  301. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +194 -0
  302. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +36 -0
  303. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +55 -0
  304. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +30 -0
  305. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +17 -0
  306. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +41 -0
  307. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +32 -0
  308. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +18 -0
  309. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +8 -0
  310. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +30 -0
  311. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +28 -0
  312. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +457 -0
  313. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +62 -0
  314. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +63 -0
  315. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +59 -0
  316. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +68 -0
  317. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +65 -0
  318. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +100 -0
  319. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +1135 -0
  320. data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +15 -0
  321. data/ext/rj_schema/rj_schema.cpp +64 -41
  322. data/lib/rj_schema.rb +1 -1
  323. metadata +378 -5
@@ -0,0 +1,291 @@
1
+ $$ -*- mode: c++; -*-
2
+ $$ This is a Pump source file. Please use Pump to convert it to
3
+ $$ gmock-generated-function-mockers.h.
4
+ $$
5
+ $var n = 10 $$ The maximum arity we support.
6
+ // Copyright 2007, Google Inc.
7
+ // All rights reserved.
8
+ //
9
+ // Redistribution and use in source and binary forms, with or without
10
+ // modification, are permitted provided that the following conditions are
11
+ // met:
12
+ //
13
+ // * Redistributions of source code must retain the above copyright
14
+ // notice, this list of conditions and the following disclaimer.
15
+ // * Redistributions in binary form must reproduce the above
16
+ // copyright notice, this list of conditions and the following disclaimer
17
+ // in the documentation and/or other materials provided with the
18
+ // distribution.
19
+ // * Neither the name of Google Inc. nor the names of its
20
+ // contributors may be used to endorse or promote products derived from
21
+ // this software without specific prior written permission.
22
+ //
23
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ //
35
+ // Author: wan@google.com (Zhanyong Wan)
36
+
37
+ // Google Mock - a framework for writing C++ mock classes.
38
+ //
39
+ // This file implements function mockers of various arities.
40
+
41
+ #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
42
+ #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
43
+
44
+ #include "gmock/gmock-spec-builders.h"
45
+ #include "gmock/internal/gmock-internal-utils.h"
46
+
47
+ #if GTEST_HAS_STD_FUNCTION_
48
+ # include <functional>
49
+ #endif
50
+
51
+ namespace testing {
52
+ namespace internal {
53
+
54
+ template <typename F>
55
+ class FunctionMockerBase;
56
+
57
+ // Note: class FunctionMocker really belongs to the ::testing
58
+ // namespace. However if we define it in ::testing, MSVC will
59
+ // complain when classes in ::testing::internal declare it as a
60
+ // friend class template. To workaround this compiler bug, we define
61
+ // FunctionMocker in ::testing::internal and import it into ::testing.
62
+ template <typename F>
63
+ class FunctionMocker;
64
+
65
+
66
+ $range i 0..n
67
+ $for i [[
68
+ $range j 1..i
69
+ $var typename_As = [[$for j [[, typename A$j]]]]
70
+ $var As = [[$for j, [[A$j]]]]
71
+ $var as = [[$for j, [[a$j]]]]
72
+ $var Aas = [[$for j, [[A$j a$j]]]]
73
+ $var ms = [[$for j, [[m$j]]]]
74
+ $var matchers = [[$for j, [[const Matcher<A$j>& m$j]]]]
75
+ template <typename R$typename_As>
76
+ class FunctionMocker<R($As)> : public
77
+ internal::FunctionMockerBase<R($As)> {
78
+ public:
79
+ typedef R F($As);
80
+ typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
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();
89
+ }
90
+
91
+ R Invoke($Aas) {
92
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
93
+ // by the C++ standard [14.6.4] here, as the base class type is
94
+ // dependent on the template argument (and thus shouldn't be
95
+ // looked into when resolving InvokeWith).
96
+ return this->InvokeWith(ArgumentTuple($as));
97
+ }
98
+ };
99
+
100
+
101
+ ]]
102
+ } // namespace internal
103
+
104
+ // The style guide prohibits "using" statements in a namespace scope
105
+ // inside a header file. However, the FunctionMocker class template
106
+ // is meant to be defined in the ::testing namespace. The following
107
+ // line is just a trick for working around a bug in MSVC 8.0, which
108
+ // cannot handle it if we define FunctionMocker in ::testing.
109
+ using internal::FunctionMocker;
110
+
111
+ // GMOCK_RESULT_(tn, F) expands to the result type of function type F.
112
+ // We define this as a variadic macro in case F contains unprotected
113
+ // commas (the same reason that we use variadic macros in other places
114
+ // in this file).
115
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
116
+ #define GMOCK_RESULT_(tn, ...) \
117
+ tn ::testing::internal::Function<__VA_ARGS__>::Result
118
+
119
+ // The type of argument N of the given function type.
120
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
121
+ #define GMOCK_ARG_(tn, N, ...) \
122
+ tn ::testing::internal::Function<__VA_ARGS__>::Argument##N
123
+
124
+ // The matcher type for argument N of the given function type.
125
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
126
+ #define GMOCK_MATCHER_(tn, N, ...) \
127
+ const ::testing::Matcher<GMOCK_ARG_(tn, N, __VA_ARGS__)>&
128
+
129
+ // The variable for mocking the given method.
130
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
131
+ #define GMOCK_MOCKER_(arity, constness, Method) \
132
+ GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
133
+
134
+
135
+ $for i [[
136
+ $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, \
141
+ [[GMOCK_MATCHER_(tn, $j, __VA_ARGS__) gmock_a$j]]]]
142
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
143
+ #define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, ...) \
144
+ GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
145
+ $arg_as) constness { \
146
+ GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
147
+ tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == $i), \
148
+ this_method_does_not_take_$i[[]]_argument[[$if i != 1 [[s]]]]); \
149
+ GMOCK_MOCKER_($i, constness, Method).SetOwnerAndName(this, #Method); \
150
+ return GMOCK_MOCKER_($i, constness, Method).Invoke($as); \
151
+ } \
152
+ ::testing::MockSpec<__VA_ARGS__>& \
153
+ gmock_##Method($matcher_as) constness { \
154
+ GMOCK_MOCKER_($i, constness, Method).RegisterOwner(this); \
155
+ return GMOCK_MOCKER_($i, constness, Method).With($as); \
156
+ } \
157
+ mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_($i, constness, Method)
158
+
159
+
160
+ ]]
161
+ $for i [[
162
+ #define MOCK_METHOD$i(m, ...) GMOCK_METHOD$i[[]]_(, , , m, __VA_ARGS__)
163
+
164
+ ]]
165
+
166
+
167
+ $for i [[
168
+ #define MOCK_CONST_METHOD$i(m, ...) GMOCK_METHOD$i[[]]_(, const, , m, __VA_ARGS__)
169
+
170
+ ]]
171
+
172
+
173
+ $for i [[
174
+ #define MOCK_METHOD$i[[]]_T(m, ...) GMOCK_METHOD$i[[]]_(typename, , , m, __VA_ARGS__)
175
+
176
+ ]]
177
+
178
+
179
+ $for i [[
180
+ #define MOCK_CONST_METHOD$i[[]]_T(m, ...) \
181
+ GMOCK_METHOD$i[[]]_(typename, const, , m, __VA_ARGS__)
182
+
183
+ ]]
184
+
185
+
186
+ $for i [[
187
+ #define MOCK_METHOD$i[[]]_WITH_CALLTYPE(ct, m, ...) \
188
+ GMOCK_METHOD$i[[]]_(, , ct, m, __VA_ARGS__)
189
+
190
+ ]]
191
+
192
+
193
+ $for i [[
194
+ #define MOCK_CONST_METHOD$i[[]]_WITH_CALLTYPE(ct, m, ...) \
195
+ GMOCK_METHOD$i[[]]_(, const, ct, m, __VA_ARGS__)
196
+
197
+ ]]
198
+
199
+
200
+ $for i [[
201
+ #define MOCK_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, ...) \
202
+ GMOCK_METHOD$i[[]]_(typename, , ct, m, __VA_ARGS__)
203
+
204
+ ]]
205
+
206
+
207
+ $for i [[
208
+ #define MOCK_CONST_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, ...) \
209
+ GMOCK_METHOD$i[[]]_(typename, const, ct, m, __VA_ARGS__)
210
+
211
+ ]]
212
+
213
+ // A MockFunction<F> class has one mock method whose type is F. It is
214
+ // useful when you just want your test code to emit some messages and
215
+ // have Google Mock verify the right messages are sent (and perhaps at
216
+ // the right times). For example, if you are exercising code:
217
+ //
218
+ // Foo(1);
219
+ // Foo(2);
220
+ // Foo(3);
221
+ //
222
+ // and want to verify that Foo(1) and Foo(3) both invoke
223
+ // mock.Bar("a"), but Foo(2) doesn't invoke anything, you can write:
224
+ //
225
+ // TEST(FooTest, InvokesBarCorrectly) {
226
+ // MyMock mock;
227
+ // MockFunction<void(string check_point_name)> check;
228
+ // {
229
+ // InSequence s;
230
+ //
231
+ // EXPECT_CALL(mock, Bar("a"));
232
+ // EXPECT_CALL(check, Call("1"));
233
+ // EXPECT_CALL(check, Call("2"));
234
+ // EXPECT_CALL(mock, Bar("a"));
235
+ // }
236
+ // Foo(1);
237
+ // check.Call("1");
238
+ // Foo(2);
239
+ // check.Call("2");
240
+ // Foo(3);
241
+ // }
242
+ //
243
+ // The expectation spec says that the first Bar("a") must happen
244
+ // before check point "1", the second Bar("a") must happen after check
245
+ // point "2", and nothing should happen between the two check
246
+ // points. The explicit check points make it easy to tell which
247
+ // Bar("a") is called by which call to Foo().
248
+ //
249
+ // MockFunction<F> can also be used to exercise code that accepts
250
+ // std::function<F> callbacks. To do so, use AsStdFunction() method
251
+ // to create std::function proxy forwarding to original object's Call.
252
+ // Example:
253
+ //
254
+ // TEST(FooTest, RunsCallbackWithBarArgument) {
255
+ // MockFunction<int(string)> callback;
256
+ // EXPECT_CALL(callback, Call("bar")).WillOnce(Return(1));
257
+ // Foo(callback.AsStdFunction());
258
+ // }
259
+ template <typename F>
260
+ class MockFunction;
261
+
262
+
263
+ $for i [[
264
+ $range j 0..i-1
265
+ $var ArgTypes = [[$for j, [[A$j]]]]
266
+ $var ArgNames = [[$for j, [[a$j]]]]
267
+ $var ArgDecls = [[$for j, [[A$j a$j]]]]
268
+ template <typename R$for j [[, typename A$j]]>
269
+ class MockFunction<R($ArgTypes)> {
270
+ public:
271
+ MockFunction() {}
272
+
273
+ MOCK_METHOD$i[[]]_T(Call, R($ArgTypes));
274
+
275
+ #if GTEST_HAS_STD_FUNCTION_
276
+ std::function<R($ArgTypes)> AsStdFunction() {
277
+ return [this]($ArgDecls) -> R {
278
+ return this->Call($ArgNames);
279
+ };
280
+ }
281
+ #endif // GTEST_HAS_STD_FUNCTION_
282
+
283
+ private:
284
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
285
+ };
286
+
287
+
288
+ ]]
289
+ } // namespace testing
290
+
291
+ #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
@@ -0,0 +1,2179 @@
1
+ // This file was GENERATED by command:
2
+ // pump.py gmock-generated-matchers.h.pump
3
+ // DO NOT EDIT BY HAND!!!
4
+
5
+ // Copyright 2008, Google Inc.
6
+ // All rights reserved.
7
+ //
8
+ // Redistribution and use in source and binary forms, with or without
9
+ // modification, are permitted provided that the following conditions are
10
+ // met:
11
+ //
12
+ // * Redistributions of source code must retain the above copyright
13
+ // notice, this list of conditions and the following disclaimer.
14
+ // * Redistributions in binary form must reproduce the above
15
+ // copyright notice, this list of conditions and the following disclaimer
16
+ // in the documentation and/or other materials provided with the
17
+ // distribution.
18
+ // * Neither the name of Google Inc. nor the names of its
19
+ // contributors may be used to endorse or promote products derived from
20
+ // this software without specific prior written permission.
21
+ //
22
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
+
34
+ // Google Mock - a framework for writing C++ mock classes.
35
+ //
36
+ // This file implements some commonly used variadic matchers.
37
+
38
+ #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
39
+ #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
40
+
41
+ #include <iterator>
42
+ #include <sstream>
43
+ #include <string>
44
+ #include <vector>
45
+ #include "gmock/gmock-matchers.h"
46
+
47
+ namespace testing {
48
+ namespace internal {
49
+
50
+ // The type of the i-th (0-based) field of Tuple.
51
+ #define GMOCK_FIELD_TYPE_(Tuple, i) \
52
+ typename ::testing::tuple_element<i, Tuple>::type
53
+
54
+ // TupleFields<Tuple, k0, ..., kn> is for selecting fields from a
55
+ // tuple of type Tuple. It has two members:
56
+ //
57
+ // type: a tuple type whose i-th field is the ki-th field of Tuple.
58
+ // GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple.
59
+ //
60
+ // For example, in class TupleFields<tuple<bool, char, int>, 2, 0>, we have:
61
+ //
62
+ // type is tuple<int, bool>, and
63
+ // GetSelectedFields(make_tuple(true, 'a', 42)) is (42, true).
64
+
65
+ template <class Tuple, int k0 = -1, int k1 = -1, int k2 = -1, int k3 = -1,
66
+ int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
67
+ int k9 = -1>
68
+ class TupleFields;
69
+
70
+ // This generic version is used when there are 10 selectors.
71
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
72
+ int k7, int k8, int k9>
73
+ class TupleFields {
74
+ public:
75
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
76
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
77
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
78
+ GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
79
+ GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8),
80
+ GMOCK_FIELD_TYPE_(Tuple, k9)> type;
81
+ static type GetSelectedFields(const Tuple& t) {
82
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
83
+ get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t), get<k9>(t));
84
+ }
85
+ };
86
+
87
+ // The following specialization is used for 0 ~ 9 selectors.
88
+
89
+ template <class Tuple>
90
+ class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
91
+ public:
92
+ typedef ::testing::tuple<> type;
93
+ static type GetSelectedFields(const Tuple& /* t */) {
94
+ return type();
95
+ }
96
+ };
97
+
98
+ template <class Tuple, int k0>
99
+ class TupleFields<Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
100
+ public:
101
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0)> type;
102
+ static type GetSelectedFields(const Tuple& t) {
103
+ return type(get<k0>(t));
104
+ }
105
+ };
106
+
107
+ template <class Tuple, int k0, int k1>
108
+ class TupleFields<Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1> {
109
+ public:
110
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
111
+ GMOCK_FIELD_TYPE_(Tuple, k1)> type;
112
+ static type GetSelectedFields(const Tuple& t) {
113
+ return type(get<k0>(t), get<k1>(t));
114
+ }
115
+ };
116
+
117
+ template <class Tuple, int k0, int k1, int k2>
118
+ class TupleFields<Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1> {
119
+ public:
120
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
121
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2)> type;
122
+ static type GetSelectedFields(const Tuple& t) {
123
+ return type(get<k0>(t), get<k1>(t), get<k2>(t));
124
+ }
125
+ };
126
+
127
+ template <class Tuple, int k0, int k1, int k2, int k3>
128
+ class TupleFields<Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1> {
129
+ public:
130
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
131
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
132
+ GMOCK_FIELD_TYPE_(Tuple, k3)> type;
133
+ static type GetSelectedFields(const Tuple& t) {
134
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t));
135
+ }
136
+ };
137
+
138
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4>
139
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1> {
140
+ public:
141
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
142
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
143
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4)> type;
144
+ static type GetSelectedFields(const Tuple& t) {
145
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t));
146
+ }
147
+ };
148
+
149
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5>
150
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1> {
151
+ public:
152
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
153
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
154
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
155
+ GMOCK_FIELD_TYPE_(Tuple, k5)> type;
156
+ static type GetSelectedFields(const Tuple& t) {
157
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
158
+ get<k5>(t));
159
+ }
160
+ };
161
+
162
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6>
163
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1> {
164
+ public:
165
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
166
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
167
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
168
+ GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6)> type;
169
+ static type GetSelectedFields(const Tuple& t) {
170
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
171
+ get<k5>(t), get<k6>(t));
172
+ }
173
+ };
174
+
175
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
176
+ int k7>
177
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1> {
178
+ public:
179
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
180
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
181
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
182
+ GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
183
+ GMOCK_FIELD_TYPE_(Tuple, k7)> type;
184
+ static type GetSelectedFields(const Tuple& t) {
185
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
186
+ get<k5>(t), get<k6>(t), get<k7>(t));
187
+ }
188
+ };
189
+
190
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
191
+ int k7, int k8>
192
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1> {
193
+ public:
194
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
195
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
196
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
197
+ GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
198
+ GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8)> type;
199
+ static type GetSelectedFields(const Tuple& t) {
200
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
201
+ get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t));
202
+ }
203
+ };
204
+
205
+ #undef GMOCK_FIELD_TYPE_
206
+
207
+ // Implements the Args() matcher.
208
+ template <class ArgsTuple, int k0 = -1, int k1 = -1, int k2 = -1, int k3 = -1,
209
+ int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
210
+ int k9 = -1>
211
+ class ArgsMatcherImpl : public MatcherInterface<ArgsTuple> {
212
+ public:
213
+ // ArgsTuple may have top-level const or reference modifiers.
214
+ typedef GTEST_REMOVE_REFERENCE_AND_CONST_(ArgsTuple) RawArgsTuple;
215
+ typedef typename internal::TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5,
216
+ k6, k7, k8, k9>::type SelectedArgs;
217
+ typedef Matcher<const SelectedArgs&> MonomorphicInnerMatcher;
218
+
219
+ template <typename InnerMatcher>
220
+ explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher)
221
+ : inner_matcher_(SafeMatcherCast<const SelectedArgs&>(inner_matcher)) {}
222
+
223
+ virtual bool MatchAndExplain(ArgsTuple args,
224
+ MatchResultListener* listener) const {
225
+ const SelectedArgs& selected_args = GetSelectedArgs(args);
226
+ if (!listener->IsInterested())
227
+ return inner_matcher_.Matches(selected_args);
228
+
229
+ PrintIndices(listener->stream());
230
+ *listener << "are " << PrintToString(selected_args);
231
+
232
+ StringMatchResultListener inner_listener;
233
+ const bool match = inner_matcher_.MatchAndExplain(selected_args,
234
+ &inner_listener);
235
+ PrintIfNotEmpty(inner_listener.str(), listener->stream());
236
+ return match;
237
+ }
238
+
239
+ virtual void DescribeTo(::std::ostream* os) const {
240
+ *os << "are a tuple ";
241
+ PrintIndices(os);
242
+ inner_matcher_.DescribeTo(os);
243
+ }
244
+
245
+ virtual void DescribeNegationTo(::std::ostream* os) const {
246
+ *os << "are a tuple ";
247
+ PrintIndices(os);
248
+ inner_matcher_.DescribeNegationTo(os);
249
+ }
250
+
251
+ private:
252
+ static SelectedArgs GetSelectedArgs(ArgsTuple args) {
253
+ return TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5, k6, k7, k8,
254
+ k9>::GetSelectedFields(args);
255
+ }
256
+
257
+ // Prints the indices of the selected fields.
258
+ static void PrintIndices(::std::ostream* os) {
259
+ *os << "whose fields (";
260
+ const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 };
261
+ for (int i = 0; i < 10; i++) {
262
+ if (indices[i] < 0)
263
+ break;
264
+
265
+ if (i >= 1)
266
+ *os << ", ";
267
+
268
+ *os << "#" << indices[i];
269
+ }
270
+ *os << ") ";
271
+ }
272
+
273
+ const MonomorphicInnerMatcher inner_matcher_;
274
+
275
+ GTEST_DISALLOW_ASSIGN_(ArgsMatcherImpl);
276
+ };
277
+
278
+ template <class InnerMatcher, int k0 = -1, int k1 = -1, int k2 = -1,
279
+ int k3 = -1, int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1,
280
+ int k8 = -1, int k9 = -1>
281
+ class ArgsMatcher {
282
+ public:
283
+ explicit ArgsMatcher(const InnerMatcher& inner_matcher)
284
+ : inner_matcher_(inner_matcher) {}
285
+
286
+ template <typename ArgsTuple>
287
+ operator Matcher<ArgsTuple>() const {
288
+ return MakeMatcher(new ArgsMatcherImpl<ArgsTuple, k0, k1, k2, k3, k4, k5,
289
+ k6, k7, k8, k9>(inner_matcher_));
290
+ }
291
+
292
+ private:
293
+ const InnerMatcher inner_matcher_;
294
+
295
+ GTEST_DISALLOW_ASSIGN_(ArgsMatcher);
296
+ };
297
+
298
+ // A set of metafunctions for computing the result type of AllOf.
299
+ // AllOf(m1, ..., mN) returns
300
+ // AllOfResultN<decltype(m1), ..., decltype(mN)>::type.
301
+
302
+ // Although AllOf isn't defined for one argument, AllOfResult1 is defined
303
+ // to simplify the implementation.
304
+ template <typename M1>
305
+ struct AllOfResult1 {
306
+ typedef M1 type;
307
+ };
308
+
309
+ template <typename M1, typename M2>
310
+ struct AllOfResult2 {
311
+ typedef BothOfMatcher<
312
+ typename AllOfResult1<M1>::type,
313
+ typename AllOfResult1<M2>::type
314
+ > type;
315
+ };
316
+
317
+ template <typename M1, typename M2, typename M3>
318
+ struct AllOfResult3 {
319
+ typedef BothOfMatcher<
320
+ typename AllOfResult1<M1>::type,
321
+ typename AllOfResult2<M2, M3>::type
322
+ > type;
323
+ };
324
+
325
+ template <typename M1, typename M2, typename M3, typename M4>
326
+ struct AllOfResult4 {
327
+ typedef BothOfMatcher<
328
+ typename AllOfResult2<M1, M2>::type,
329
+ typename AllOfResult2<M3, M4>::type
330
+ > type;
331
+ };
332
+
333
+ template <typename M1, typename M2, typename M3, typename M4, typename M5>
334
+ struct AllOfResult5 {
335
+ typedef BothOfMatcher<
336
+ typename AllOfResult2<M1, M2>::type,
337
+ typename AllOfResult3<M3, M4, M5>::type
338
+ > type;
339
+ };
340
+
341
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
342
+ typename M6>
343
+ struct AllOfResult6 {
344
+ typedef BothOfMatcher<
345
+ typename AllOfResult3<M1, M2, M3>::type,
346
+ typename AllOfResult3<M4, M5, M6>::type
347
+ > type;
348
+ };
349
+
350
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
351
+ typename M6, typename M7>
352
+ struct AllOfResult7 {
353
+ typedef BothOfMatcher<
354
+ typename AllOfResult3<M1, M2, M3>::type,
355
+ typename AllOfResult4<M4, M5, M6, M7>::type
356
+ > type;
357
+ };
358
+
359
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
360
+ typename M6, typename M7, typename M8>
361
+ struct AllOfResult8 {
362
+ typedef BothOfMatcher<
363
+ typename AllOfResult4<M1, M2, M3, M4>::type,
364
+ typename AllOfResult4<M5, M6, M7, M8>::type
365
+ > type;
366
+ };
367
+
368
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
369
+ typename M6, typename M7, typename M8, typename M9>
370
+ struct AllOfResult9 {
371
+ typedef BothOfMatcher<
372
+ typename AllOfResult4<M1, M2, M3, M4>::type,
373
+ typename AllOfResult5<M5, M6, M7, M8, M9>::type
374
+ > type;
375
+ };
376
+
377
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
378
+ typename M6, typename M7, typename M8, typename M9, typename M10>
379
+ struct AllOfResult10 {
380
+ typedef BothOfMatcher<
381
+ typename AllOfResult5<M1, M2, M3, M4, M5>::type,
382
+ typename AllOfResult5<M6, M7, M8, M9, M10>::type
383
+ > type;
384
+ };
385
+
386
+ // A set of metafunctions for computing the result type of AnyOf.
387
+ // AnyOf(m1, ..., mN) returns
388
+ // AnyOfResultN<decltype(m1), ..., decltype(mN)>::type.
389
+
390
+ // Although AnyOf isn't defined for one argument, AnyOfResult1 is defined
391
+ // to simplify the implementation.
392
+ template <typename M1>
393
+ struct AnyOfResult1 {
394
+ typedef M1 type;
395
+ };
396
+
397
+ template <typename M1, typename M2>
398
+ struct AnyOfResult2 {
399
+ typedef EitherOfMatcher<
400
+ typename AnyOfResult1<M1>::type,
401
+ typename AnyOfResult1<M2>::type
402
+ > type;
403
+ };
404
+
405
+ template <typename M1, typename M2, typename M3>
406
+ struct AnyOfResult3 {
407
+ typedef EitherOfMatcher<
408
+ typename AnyOfResult1<M1>::type,
409
+ typename AnyOfResult2<M2, M3>::type
410
+ > type;
411
+ };
412
+
413
+ template <typename M1, typename M2, typename M3, typename M4>
414
+ struct AnyOfResult4 {
415
+ typedef EitherOfMatcher<
416
+ typename AnyOfResult2<M1, M2>::type,
417
+ typename AnyOfResult2<M3, M4>::type
418
+ > type;
419
+ };
420
+
421
+ template <typename M1, typename M2, typename M3, typename M4, typename M5>
422
+ struct AnyOfResult5 {
423
+ typedef EitherOfMatcher<
424
+ typename AnyOfResult2<M1, M2>::type,
425
+ typename AnyOfResult3<M3, M4, M5>::type
426
+ > type;
427
+ };
428
+
429
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
430
+ typename M6>
431
+ struct AnyOfResult6 {
432
+ typedef EitherOfMatcher<
433
+ typename AnyOfResult3<M1, M2, M3>::type,
434
+ typename AnyOfResult3<M4, M5, M6>::type
435
+ > type;
436
+ };
437
+
438
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
439
+ typename M6, typename M7>
440
+ struct AnyOfResult7 {
441
+ typedef EitherOfMatcher<
442
+ typename AnyOfResult3<M1, M2, M3>::type,
443
+ typename AnyOfResult4<M4, M5, M6, M7>::type
444
+ > type;
445
+ };
446
+
447
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
448
+ typename M6, typename M7, typename M8>
449
+ struct AnyOfResult8 {
450
+ typedef EitherOfMatcher<
451
+ typename AnyOfResult4<M1, M2, M3, M4>::type,
452
+ typename AnyOfResult4<M5, M6, M7, M8>::type
453
+ > type;
454
+ };
455
+
456
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
457
+ typename M6, typename M7, typename M8, typename M9>
458
+ struct AnyOfResult9 {
459
+ typedef EitherOfMatcher<
460
+ typename AnyOfResult4<M1, M2, M3, M4>::type,
461
+ typename AnyOfResult5<M5, M6, M7, M8, M9>::type
462
+ > type;
463
+ };
464
+
465
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
466
+ typename M6, typename M7, typename M8, typename M9, typename M10>
467
+ struct AnyOfResult10 {
468
+ typedef EitherOfMatcher<
469
+ typename AnyOfResult5<M1, M2, M3, M4, M5>::type,
470
+ typename AnyOfResult5<M6, M7, M8, M9, M10>::type
471
+ > type;
472
+ };
473
+
474
+ } // namespace internal
475
+
476
+ // Args<N1, N2, ..., Nk>(a_matcher) matches a tuple if the selected
477
+ // fields of it matches a_matcher. C++ doesn't support default
478
+ // arguments for function templates, so we have to overload it.
479
+ template <typename InnerMatcher>
480
+ inline internal::ArgsMatcher<InnerMatcher>
481
+ Args(const InnerMatcher& matcher) {
482
+ return internal::ArgsMatcher<InnerMatcher>(matcher);
483
+ }
484
+
485
+ template <int k1, typename InnerMatcher>
486
+ inline internal::ArgsMatcher<InnerMatcher, k1>
487
+ Args(const InnerMatcher& matcher) {
488
+ return internal::ArgsMatcher<InnerMatcher, k1>(matcher);
489
+ }
490
+
491
+ template <int k1, int k2, typename InnerMatcher>
492
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2>
493
+ Args(const InnerMatcher& matcher) {
494
+ return internal::ArgsMatcher<InnerMatcher, k1, k2>(matcher);
495
+ }
496
+
497
+ template <int k1, int k2, int k3, typename InnerMatcher>
498
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3>
499
+ Args(const InnerMatcher& matcher) {
500
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3>(matcher);
501
+ }
502
+
503
+ template <int k1, int k2, int k3, int k4, typename InnerMatcher>
504
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4>
505
+ Args(const InnerMatcher& matcher) {
506
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4>(matcher);
507
+ }
508
+
509
+ template <int k1, int k2, int k3, int k4, int k5, typename InnerMatcher>
510
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5>
511
+ Args(const InnerMatcher& matcher) {
512
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5>(matcher);
513
+ }
514
+
515
+ template <int k1, int k2, int k3, int k4, int k5, int k6, typename InnerMatcher>
516
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6>
517
+ Args(const InnerMatcher& matcher) {
518
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6>(matcher);
519
+ }
520
+
521
+ template <int k1, int k2, int k3, int k4, int k5, int k6, int k7,
522
+ typename InnerMatcher>
523
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7>
524
+ Args(const InnerMatcher& matcher) {
525
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6,
526
+ k7>(matcher);
527
+ }
528
+
529
+ template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
530
+ typename InnerMatcher>
531
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8>
532
+ Args(const InnerMatcher& matcher) {
533
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7,
534
+ k8>(matcher);
535
+ }
536
+
537
+ template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
538
+ int k9, typename InnerMatcher>
539
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9>
540
+ Args(const InnerMatcher& matcher) {
541
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8,
542
+ k9>(matcher);
543
+ }
544
+
545
+ template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
546
+ int k9, int k10, typename InnerMatcher>
547
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9,
548
+ k10>
549
+ Args(const InnerMatcher& matcher) {
550
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8,
551
+ k9, k10>(matcher);
552
+ }
553
+
554
+ // ElementsAre(e_1, e_2, ... e_n) matches an STL-style container with
555
+ // n elements, where the i-th element in the container must
556
+ // match the i-th argument in the list. Each argument of
557
+ // ElementsAre() can be either a value or a matcher. We support up to
558
+ // 10 arguments.
559
+ //
560
+ // The use of DecayArray in the implementation allows ElementsAre()
561
+ // to accept string literals, whose type is const char[N], but we
562
+ // want to treat them as const char*.
563
+ //
564
+ // NOTE: Since ElementsAre() cares about the order of the elements, it
565
+ // must not be used with containers whose elements's order is
566
+ // undefined (e.g. hash_map).
567
+
568
+ inline internal::ElementsAreMatcher<
569
+ ::testing::tuple<> >
570
+ ElementsAre() {
571
+ typedef ::testing::tuple<> Args;
572
+ return internal::ElementsAreMatcher<Args>(Args());
573
+ }
574
+
575
+ template <typename T1>
576
+ inline internal::ElementsAreMatcher<
577
+ ::testing::tuple<
578
+ typename internal::DecayArray<T1>::type> >
579
+ ElementsAre(const T1& e1) {
580
+ typedef ::testing::tuple<
581
+ typename internal::DecayArray<T1>::type> Args;
582
+ return internal::ElementsAreMatcher<Args>(Args(e1));
583
+ }
584
+
585
+ template <typename T1, typename T2>
586
+ inline internal::ElementsAreMatcher<
587
+ ::testing::tuple<
588
+ typename internal::DecayArray<T1>::type,
589
+ typename internal::DecayArray<T2>::type> >
590
+ ElementsAre(const T1& e1, const T2& e2) {
591
+ typedef ::testing::tuple<
592
+ typename internal::DecayArray<T1>::type,
593
+ typename internal::DecayArray<T2>::type> Args;
594
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2));
595
+ }
596
+
597
+ template <typename T1, typename T2, typename T3>
598
+ inline internal::ElementsAreMatcher<
599
+ ::testing::tuple<
600
+ typename internal::DecayArray<T1>::type,
601
+ typename internal::DecayArray<T2>::type,
602
+ typename internal::DecayArray<T3>::type> >
603
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3) {
604
+ typedef ::testing::tuple<
605
+ typename internal::DecayArray<T1>::type,
606
+ typename internal::DecayArray<T2>::type,
607
+ typename internal::DecayArray<T3>::type> Args;
608
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3));
609
+ }
610
+
611
+ template <typename T1, typename T2, typename T3, typename T4>
612
+ inline internal::ElementsAreMatcher<
613
+ ::testing::tuple<
614
+ typename internal::DecayArray<T1>::type,
615
+ typename internal::DecayArray<T2>::type,
616
+ typename internal::DecayArray<T3>::type,
617
+ typename internal::DecayArray<T4>::type> >
618
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
619
+ typedef ::testing::tuple<
620
+ typename internal::DecayArray<T1>::type,
621
+ typename internal::DecayArray<T2>::type,
622
+ typename internal::DecayArray<T3>::type,
623
+ typename internal::DecayArray<T4>::type> Args;
624
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4));
625
+ }
626
+
627
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
628
+ inline internal::ElementsAreMatcher<
629
+ ::testing::tuple<
630
+ typename internal::DecayArray<T1>::type,
631
+ typename internal::DecayArray<T2>::type,
632
+ typename internal::DecayArray<T3>::type,
633
+ typename internal::DecayArray<T4>::type,
634
+ typename internal::DecayArray<T5>::type> >
635
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
636
+ const T5& e5) {
637
+ typedef ::testing::tuple<
638
+ typename internal::DecayArray<T1>::type,
639
+ typename internal::DecayArray<T2>::type,
640
+ typename internal::DecayArray<T3>::type,
641
+ typename internal::DecayArray<T4>::type,
642
+ typename internal::DecayArray<T5>::type> Args;
643
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5));
644
+ }
645
+
646
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
647
+ typename T6>
648
+ inline internal::ElementsAreMatcher<
649
+ ::testing::tuple<
650
+ typename internal::DecayArray<T1>::type,
651
+ typename internal::DecayArray<T2>::type,
652
+ typename internal::DecayArray<T3>::type,
653
+ typename internal::DecayArray<T4>::type,
654
+ typename internal::DecayArray<T5>::type,
655
+ typename internal::DecayArray<T6>::type> >
656
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
657
+ const T5& e5, const T6& e6) {
658
+ typedef ::testing::tuple<
659
+ typename internal::DecayArray<T1>::type,
660
+ typename internal::DecayArray<T2>::type,
661
+ typename internal::DecayArray<T3>::type,
662
+ typename internal::DecayArray<T4>::type,
663
+ typename internal::DecayArray<T5>::type,
664
+ typename internal::DecayArray<T6>::type> Args;
665
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6));
666
+ }
667
+
668
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
669
+ typename T6, typename T7>
670
+ inline internal::ElementsAreMatcher<
671
+ ::testing::tuple<
672
+ typename internal::DecayArray<T1>::type,
673
+ typename internal::DecayArray<T2>::type,
674
+ typename internal::DecayArray<T3>::type,
675
+ typename internal::DecayArray<T4>::type,
676
+ typename internal::DecayArray<T5>::type,
677
+ typename internal::DecayArray<T6>::type,
678
+ typename internal::DecayArray<T7>::type> >
679
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
680
+ const T5& e5, const T6& e6, const T7& e7) {
681
+ typedef ::testing::tuple<
682
+ typename internal::DecayArray<T1>::type,
683
+ typename internal::DecayArray<T2>::type,
684
+ typename internal::DecayArray<T3>::type,
685
+ typename internal::DecayArray<T4>::type,
686
+ typename internal::DecayArray<T5>::type,
687
+ typename internal::DecayArray<T6>::type,
688
+ typename internal::DecayArray<T7>::type> Args;
689
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6, e7));
690
+ }
691
+
692
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
693
+ typename T6, typename T7, typename T8>
694
+ inline internal::ElementsAreMatcher<
695
+ ::testing::tuple<
696
+ typename internal::DecayArray<T1>::type,
697
+ typename internal::DecayArray<T2>::type,
698
+ typename internal::DecayArray<T3>::type,
699
+ typename internal::DecayArray<T4>::type,
700
+ typename internal::DecayArray<T5>::type,
701
+ typename internal::DecayArray<T6>::type,
702
+ typename internal::DecayArray<T7>::type,
703
+ typename internal::DecayArray<T8>::type> >
704
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
705
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
706
+ typedef ::testing::tuple<
707
+ typename internal::DecayArray<T1>::type,
708
+ typename internal::DecayArray<T2>::type,
709
+ typename internal::DecayArray<T3>::type,
710
+ typename internal::DecayArray<T4>::type,
711
+ typename internal::DecayArray<T5>::type,
712
+ typename internal::DecayArray<T6>::type,
713
+ typename internal::DecayArray<T7>::type,
714
+ typename internal::DecayArray<T8>::type> Args;
715
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6, e7,
716
+ e8));
717
+ }
718
+
719
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
720
+ typename T6, typename T7, typename T8, typename T9>
721
+ inline internal::ElementsAreMatcher<
722
+ ::testing::tuple<
723
+ typename internal::DecayArray<T1>::type,
724
+ typename internal::DecayArray<T2>::type,
725
+ typename internal::DecayArray<T3>::type,
726
+ typename internal::DecayArray<T4>::type,
727
+ typename internal::DecayArray<T5>::type,
728
+ typename internal::DecayArray<T6>::type,
729
+ typename internal::DecayArray<T7>::type,
730
+ typename internal::DecayArray<T8>::type,
731
+ typename internal::DecayArray<T9>::type> >
732
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
733
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
734
+ typedef ::testing::tuple<
735
+ typename internal::DecayArray<T1>::type,
736
+ typename internal::DecayArray<T2>::type,
737
+ typename internal::DecayArray<T3>::type,
738
+ typename internal::DecayArray<T4>::type,
739
+ typename internal::DecayArray<T5>::type,
740
+ typename internal::DecayArray<T6>::type,
741
+ typename internal::DecayArray<T7>::type,
742
+ typename internal::DecayArray<T8>::type,
743
+ typename internal::DecayArray<T9>::type> Args;
744
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6, e7,
745
+ e8, e9));
746
+ }
747
+
748
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
749
+ typename T6, typename T7, typename T8, typename T9, typename T10>
750
+ inline internal::ElementsAreMatcher<
751
+ ::testing::tuple<
752
+ typename internal::DecayArray<T1>::type,
753
+ typename internal::DecayArray<T2>::type,
754
+ typename internal::DecayArray<T3>::type,
755
+ typename internal::DecayArray<T4>::type,
756
+ typename internal::DecayArray<T5>::type,
757
+ typename internal::DecayArray<T6>::type,
758
+ typename internal::DecayArray<T7>::type,
759
+ typename internal::DecayArray<T8>::type,
760
+ typename internal::DecayArray<T9>::type,
761
+ typename internal::DecayArray<T10>::type> >
762
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
763
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
764
+ const T10& e10) {
765
+ typedef ::testing::tuple<
766
+ typename internal::DecayArray<T1>::type,
767
+ typename internal::DecayArray<T2>::type,
768
+ typename internal::DecayArray<T3>::type,
769
+ typename internal::DecayArray<T4>::type,
770
+ typename internal::DecayArray<T5>::type,
771
+ typename internal::DecayArray<T6>::type,
772
+ typename internal::DecayArray<T7>::type,
773
+ typename internal::DecayArray<T8>::type,
774
+ typename internal::DecayArray<T9>::type,
775
+ typename internal::DecayArray<T10>::type> Args;
776
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6, e7,
777
+ e8, e9, e10));
778
+ }
779
+
780
+ // UnorderedElementsAre(e_1, e_2, ..., e_n) is an ElementsAre extension
781
+ // that matches n elements in any order. We support up to n=10 arguments.
782
+
783
+ inline internal::UnorderedElementsAreMatcher<
784
+ ::testing::tuple<> >
785
+ UnorderedElementsAre() {
786
+ typedef ::testing::tuple<> Args;
787
+ return internal::UnorderedElementsAreMatcher<Args>(Args());
788
+ }
789
+
790
+ template <typename T1>
791
+ inline internal::UnorderedElementsAreMatcher<
792
+ ::testing::tuple<
793
+ typename internal::DecayArray<T1>::type> >
794
+ UnorderedElementsAre(const T1& e1) {
795
+ typedef ::testing::tuple<
796
+ typename internal::DecayArray<T1>::type> Args;
797
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1));
798
+ }
799
+
800
+ template <typename T1, typename T2>
801
+ inline internal::UnorderedElementsAreMatcher<
802
+ ::testing::tuple<
803
+ typename internal::DecayArray<T1>::type,
804
+ typename internal::DecayArray<T2>::type> >
805
+ UnorderedElementsAre(const T1& e1, const T2& e2) {
806
+ typedef ::testing::tuple<
807
+ typename internal::DecayArray<T1>::type,
808
+ typename internal::DecayArray<T2>::type> Args;
809
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2));
810
+ }
811
+
812
+ template <typename T1, typename T2, typename T3>
813
+ inline internal::UnorderedElementsAreMatcher<
814
+ ::testing::tuple<
815
+ typename internal::DecayArray<T1>::type,
816
+ typename internal::DecayArray<T2>::type,
817
+ typename internal::DecayArray<T3>::type> >
818
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3) {
819
+ typedef ::testing::tuple<
820
+ typename internal::DecayArray<T1>::type,
821
+ typename internal::DecayArray<T2>::type,
822
+ typename internal::DecayArray<T3>::type> Args;
823
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3));
824
+ }
825
+
826
+ template <typename T1, typename T2, typename T3, typename T4>
827
+ inline internal::UnorderedElementsAreMatcher<
828
+ ::testing::tuple<
829
+ typename internal::DecayArray<T1>::type,
830
+ typename internal::DecayArray<T2>::type,
831
+ typename internal::DecayArray<T3>::type,
832
+ typename internal::DecayArray<T4>::type> >
833
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
834
+ typedef ::testing::tuple<
835
+ typename internal::DecayArray<T1>::type,
836
+ typename internal::DecayArray<T2>::type,
837
+ typename internal::DecayArray<T3>::type,
838
+ typename internal::DecayArray<T4>::type> Args;
839
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4));
840
+ }
841
+
842
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
843
+ inline internal::UnorderedElementsAreMatcher<
844
+ ::testing::tuple<
845
+ typename internal::DecayArray<T1>::type,
846
+ typename internal::DecayArray<T2>::type,
847
+ typename internal::DecayArray<T3>::type,
848
+ typename internal::DecayArray<T4>::type,
849
+ typename internal::DecayArray<T5>::type> >
850
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
851
+ const T5& e5) {
852
+ typedef ::testing::tuple<
853
+ typename internal::DecayArray<T1>::type,
854
+ typename internal::DecayArray<T2>::type,
855
+ typename internal::DecayArray<T3>::type,
856
+ typename internal::DecayArray<T4>::type,
857
+ typename internal::DecayArray<T5>::type> Args;
858
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5));
859
+ }
860
+
861
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
862
+ typename T6>
863
+ inline internal::UnorderedElementsAreMatcher<
864
+ ::testing::tuple<
865
+ typename internal::DecayArray<T1>::type,
866
+ typename internal::DecayArray<T2>::type,
867
+ typename internal::DecayArray<T3>::type,
868
+ typename internal::DecayArray<T4>::type,
869
+ typename internal::DecayArray<T5>::type,
870
+ typename internal::DecayArray<T6>::type> >
871
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
872
+ const T5& e5, const T6& e6) {
873
+ typedef ::testing::tuple<
874
+ typename internal::DecayArray<T1>::type,
875
+ typename internal::DecayArray<T2>::type,
876
+ typename internal::DecayArray<T3>::type,
877
+ typename internal::DecayArray<T4>::type,
878
+ typename internal::DecayArray<T5>::type,
879
+ typename internal::DecayArray<T6>::type> Args;
880
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
881
+ e6));
882
+ }
883
+
884
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
885
+ typename T6, typename T7>
886
+ inline internal::UnorderedElementsAreMatcher<
887
+ ::testing::tuple<
888
+ typename internal::DecayArray<T1>::type,
889
+ typename internal::DecayArray<T2>::type,
890
+ typename internal::DecayArray<T3>::type,
891
+ typename internal::DecayArray<T4>::type,
892
+ typename internal::DecayArray<T5>::type,
893
+ typename internal::DecayArray<T6>::type,
894
+ typename internal::DecayArray<T7>::type> >
895
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
896
+ const T5& e5, const T6& e6, const T7& e7) {
897
+ typedef ::testing::tuple<
898
+ typename internal::DecayArray<T1>::type,
899
+ typename internal::DecayArray<T2>::type,
900
+ typename internal::DecayArray<T3>::type,
901
+ typename internal::DecayArray<T4>::type,
902
+ typename internal::DecayArray<T5>::type,
903
+ typename internal::DecayArray<T6>::type,
904
+ typename internal::DecayArray<T7>::type> Args;
905
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
906
+ e6, e7));
907
+ }
908
+
909
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
910
+ typename T6, typename T7, typename T8>
911
+ inline internal::UnorderedElementsAreMatcher<
912
+ ::testing::tuple<
913
+ typename internal::DecayArray<T1>::type,
914
+ typename internal::DecayArray<T2>::type,
915
+ typename internal::DecayArray<T3>::type,
916
+ typename internal::DecayArray<T4>::type,
917
+ typename internal::DecayArray<T5>::type,
918
+ typename internal::DecayArray<T6>::type,
919
+ typename internal::DecayArray<T7>::type,
920
+ typename internal::DecayArray<T8>::type> >
921
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
922
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
923
+ typedef ::testing::tuple<
924
+ typename internal::DecayArray<T1>::type,
925
+ typename internal::DecayArray<T2>::type,
926
+ typename internal::DecayArray<T3>::type,
927
+ typename internal::DecayArray<T4>::type,
928
+ typename internal::DecayArray<T5>::type,
929
+ typename internal::DecayArray<T6>::type,
930
+ typename internal::DecayArray<T7>::type,
931
+ typename internal::DecayArray<T8>::type> Args;
932
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
933
+ e6, e7, e8));
934
+ }
935
+
936
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
937
+ typename T6, typename T7, typename T8, typename T9>
938
+ inline internal::UnorderedElementsAreMatcher<
939
+ ::testing::tuple<
940
+ typename internal::DecayArray<T1>::type,
941
+ typename internal::DecayArray<T2>::type,
942
+ typename internal::DecayArray<T3>::type,
943
+ typename internal::DecayArray<T4>::type,
944
+ typename internal::DecayArray<T5>::type,
945
+ typename internal::DecayArray<T6>::type,
946
+ typename internal::DecayArray<T7>::type,
947
+ typename internal::DecayArray<T8>::type,
948
+ typename internal::DecayArray<T9>::type> >
949
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
950
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
951
+ typedef ::testing::tuple<
952
+ typename internal::DecayArray<T1>::type,
953
+ typename internal::DecayArray<T2>::type,
954
+ typename internal::DecayArray<T3>::type,
955
+ typename internal::DecayArray<T4>::type,
956
+ typename internal::DecayArray<T5>::type,
957
+ typename internal::DecayArray<T6>::type,
958
+ typename internal::DecayArray<T7>::type,
959
+ typename internal::DecayArray<T8>::type,
960
+ typename internal::DecayArray<T9>::type> Args;
961
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
962
+ e6, e7, e8, e9));
963
+ }
964
+
965
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
966
+ typename T6, typename T7, typename T8, typename T9, typename T10>
967
+ inline internal::UnorderedElementsAreMatcher<
968
+ ::testing::tuple<
969
+ typename internal::DecayArray<T1>::type,
970
+ typename internal::DecayArray<T2>::type,
971
+ typename internal::DecayArray<T3>::type,
972
+ typename internal::DecayArray<T4>::type,
973
+ typename internal::DecayArray<T5>::type,
974
+ typename internal::DecayArray<T6>::type,
975
+ typename internal::DecayArray<T7>::type,
976
+ typename internal::DecayArray<T8>::type,
977
+ typename internal::DecayArray<T9>::type,
978
+ typename internal::DecayArray<T10>::type> >
979
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
980
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
981
+ const T10& e10) {
982
+ typedef ::testing::tuple<
983
+ typename internal::DecayArray<T1>::type,
984
+ typename internal::DecayArray<T2>::type,
985
+ typename internal::DecayArray<T3>::type,
986
+ typename internal::DecayArray<T4>::type,
987
+ typename internal::DecayArray<T5>::type,
988
+ typename internal::DecayArray<T6>::type,
989
+ typename internal::DecayArray<T7>::type,
990
+ typename internal::DecayArray<T8>::type,
991
+ typename internal::DecayArray<T9>::type,
992
+ typename internal::DecayArray<T10>::type> Args;
993
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
994
+ e6, e7, e8, e9, e10));
995
+ }
996
+
997
+ // AllOf(m1, m2, ..., mk) matches any value that matches all of the given
998
+ // sub-matchers. AllOf is called fully qualified to prevent ADL from firing.
999
+
1000
+ template <typename M1, typename M2>
1001
+ inline typename internal::AllOfResult2<M1, M2>::type
1002
+ AllOf(M1 m1, M2 m2) {
1003
+ return typename internal::AllOfResult2<M1, M2>::type(
1004
+ m1,
1005
+ m2);
1006
+ }
1007
+
1008
+ template <typename M1, typename M2, typename M3>
1009
+ inline typename internal::AllOfResult3<M1, M2, M3>::type
1010
+ AllOf(M1 m1, M2 m2, M3 m3) {
1011
+ return typename internal::AllOfResult3<M1, M2, M3>::type(
1012
+ m1,
1013
+ ::testing::AllOf(m2, m3));
1014
+ }
1015
+
1016
+ template <typename M1, typename M2, typename M3, typename M4>
1017
+ inline typename internal::AllOfResult4<M1, M2, M3, M4>::type
1018
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4) {
1019
+ return typename internal::AllOfResult4<M1, M2, M3, M4>::type(
1020
+ ::testing::AllOf(m1, m2),
1021
+ ::testing::AllOf(m3, m4));
1022
+ }
1023
+
1024
+ template <typename M1, typename M2, typename M3, typename M4, typename M5>
1025
+ inline typename internal::AllOfResult5<M1, M2, M3, M4, M5>::type
1026
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5) {
1027
+ return typename internal::AllOfResult5<M1, M2, M3, M4, M5>::type(
1028
+ ::testing::AllOf(m1, m2),
1029
+ ::testing::AllOf(m3, m4, m5));
1030
+ }
1031
+
1032
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1033
+ typename M6>
1034
+ inline typename internal::AllOfResult6<M1, M2, M3, M4, M5, M6>::type
1035
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6) {
1036
+ return typename internal::AllOfResult6<M1, M2, M3, M4, M5, M6>::type(
1037
+ ::testing::AllOf(m1, m2, m3),
1038
+ ::testing::AllOf(m4, m5, m6));
1039
+ }
1040
+
1041
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1042
+ typename M6, typename M7>
1043
+ inline typename internal::AllOfResult7<M1, M2, M3, M4, M5, M6, M7>::type
1044
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7) {
1045
+ return typename internal::AllOfResult7<M1, M2, M3, M4, M5, M6, M7>::type(
1046
+ ::testing::AllOf(m1, m2, m3),
1047
+ ::testing::AllOf(m4, m5, m6, m7));
1048
+ }
1049
+
1050
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1051
+ typename M6, typename M7, typename M8>
1052
+ inline typename internal::AllOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type
1053
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8) {
1054
+ return typename internal::AllOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type(
1055
+ ::testing::AllOf(m1, m2, m3, m4),
1056
+ ::testing::AllOf(m5, m6, m7, m8));
1057
+ }
1058
+
1059
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1060
+ typename M6, typename M7, typename M8, typename M9>
1061
+ inline typename internal::AllOfResult9<M1, M2, M3, M4, M5, M6, M7, M8, M9>::type
1062
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9) {
1063
+ return typename internal::AllOfResult9<M1, M2, M3, M4, M5, M6, M7, M8,
1064
+ M9>::type(
1065
+ ::testing::AllOf(m1, m2, m3, m4),
1066
+ ::testing::AllOf(m5, m6, m7, m8, m9));
1067
+ }
1068
+
1069
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1070
+ typename M6, typename M7, typename M8, typename M9, typename M10>
1071
+ inline typename internal::AllOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1072
+ M10>::type
1073
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1074
+ return typename internal::AllOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1075
+ M10>::type(
1076
+ ::testing::AllOf(m1, m2, m3, m4, m5),
1077
+ ::testing::AllOf(m6, m7, m8, m9, m10));
1078
+ }
1079
+
1080
+ // AnyOf(m1, m2, ..., mk) matches any value that matches any of the given
1081
+ // sub-matchers. AnyOf is called fully qualified to prevent ADL from firing.
1082
+
1083
+ template <typename M1, typename M2>
1084
+ inline typename internal::AnyOfResult2<M1, M2>::type
1085
+ AnyOf(M1 m1, M2 m2) {
1086
+ return typename internal::AnyOfResult2<M1, M2>::type(
1087
+ m1,
1088
+ m2);
1089
+ }
1090
+
1091
+ template <typename M1, typename M2, typename M3>
1092
+ inline typename internal::AnyOfResult3<M1, M2, M3>::type
1093
+ AnyOf(M1 m1, M2 m2, M3 m3) {
1094
+ return typename internal::AnyOfResult3<M1, M2, M3>::type(
1095
+ m1,
1096
+ ::testing::AnyOf(m2, m3));
1097
+ }
1098
+
1099
+ template <typename M1, typename M2, typename M3, typename M4>
1100
+ inline typename internal::AnyOfResult4<M1, M2, M3, M4>::type
1101
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4) {
1102
+ return typename internal::AnyOfResult4<M1, M2, M3, M4>::type(
1103
+ ::testing::AnyOf(m1, m2),
1104
+ ::testing::AnyOf(m3, m4));
1105
+ }
1106
+
1107
+ template <typename M1, typename M2, typename M3, typename M4, typename M5>
1108
+ inline typename internal::AnyOfResult5<M1, M2, M3, M4, M5>::type
1109
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5) {
1110
+ return typename internal::AnyOfResult5<M1, M2, M3, M4, M5>::type(
1111
+ ::testing::AnyOf(m1, m2),
1112
+ ::testing::AnyOf(m3, m4, m5));
1113
+ }
1114
+
1115
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1116
+ typename M6>
1117
+ inline typename internal::AnyOfResult6<M1, M2, M3, M4, M5, M6>::type
1118
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6) {
1119
+ return typename internal::AnyOfResult6<M1, M2, M3, M4, M5, M6>::type(
1120
+ ::testing::AnyOf(m1, m2, m3),
1121
+ ::testing::AnyOf(m4, m5, m6));
1122
+ }
1123
+
1124
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1125
+ typename M6, typename M7>
1126
+ inline typename internal::AnyOfResult7<M1, M2, M3, M4, M5, M6, M7>::type
1127
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7) {
1128
+ return typename internal::AnyOfResult7<M1, M2, M3, M4, M5, M6, M7>::type(
1129
+ ::testing::AnyOf(m1, m2, m3),
1130
+ ::testing::AnyOf(m4, m5, m6, m7));
1131
+ }
1132
+
1133
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1134
+ typename M6, typename M7, typename M8>
1135
+ inline typename internal::AnyOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type
1136
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8) {
1137
+ return typename internal::AnyOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type(
1138
+ ::testing::AnyOf(m1, m2, m3, m4),
1139
+ ::testing::AnyOf(m5, m6, m7, m8));
1140
+ }
1141
+
1142
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1143
+ typename M6, typename M7, typename M8, typename M9>
1144
+ inline typename internal::AnyOfResult9<M1, M2, M3, M4, M5, M6, M7, M8, M9>::type
1145
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9) {
1146
+ return typename internal::AnyOfResult9<M1, M2, M3, M4, M5, M6, M7, M8,
1147
+ M9>::type(
1148
+ ::testing::AnyOf(m1, m2, m3, m4),
1149
+ ::testing::AnyOf(m5, m6, m7, m8, m9));
1150
+ }
1151
+
1152
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1153
+ typename M6, typename M7, typename M8, typename M9, typename M10>
1154
+ inline typename internal::AnyOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1155
+ M10>::type
1156
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1157
+ return typename internal::AnyOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1158
+ M10>::type(
1159
+ ::testing::AnyOf(m1, m2, m3, m4, m5),
1160
+ ::testing::AnyOf(m6, m7, m8, m9, m10));
1161
+ }
1162
+
1163
+ } // namespace testing
1164
+
1165
+
1166
+ // The MATCHER* family of macros can be used in a namespace scope to
1167
+ // define custom matchers easily.
1168
+ //
1169
+ // Basic Usage
1170
+ // ===========
1171
+ //
1172
+ // The syntax
1173
+ //
1174
+ // MATCHER(name, description_string) { statements; }
1175
+ //
1176
+ // defines a matcher with the given name that executes the statements,
1177
+ // which must return a bool to indicate if the match succeeds. Inside
1178
+ // the statements, you can refer to the value being matched by 'arg',
1179
+ // and refer to its type by 'arg_type'.
1180
+ //
1181
+ // The description string documents what the matcher does, and is used
1182
+ // to generate the failure message when the match fails. Since a
1183
+ // MATCHER() is usually defined in a header file shared by multiple
1184
+ // C++ source files, we require the description to be a C-string
1185
+ // literal to avoid possible side effects. It can be empty, in which
1186
+ // case we'll use the sequence of words in the matcher name as the
1187
+ // description.
1188
+ //
1189
+ // For example:
1190
+ //
1191
+ // MATCHER(IsEven, "") { return (arg % 2) == 0; }
1192
+ //
1193
+ // allows you to write
1194
+ //
1195
+ // // Expects mock_foo.Bar(n) to be called where n is even.
1196
+ // EXPECT_CALL(mock_foo, Bar(IsEven()));
1197
+ //
1198
+ // or,
1199
+ //
1200
+ // // Verifies that the value of some_expression is even.
1201
+ // EXPECT_THAT(some_expression, IsEven());
1202
+ //
1203
+ // If the above assertion fails, it will print something like:
1204
+ //
1205
+ // Value of: some_expression
1206
+ // Expected: is even
1207
+ // Actual: 7
1208
+ //
1209
+ // where the description "is even" is automatically calculated from the
1210
+ // matcher name IsEven.
1211
+ //
1212
+ // Argument Type
1213
+ // =============
1214
+ //
1215
+ // Note that the type of the value being matched (arg_type) is
1216
+ // determined by the context in which you use the matcher and is
1217
+ // supplied to you by the compiler, so you don't need to worry about
1218
+ // declaring it (nor can you). This allows the matcher to be
1219
+ // polymorphic. For example, IsEven() can be used to match any type
1220
+ // where the value of "(arg % 2) == 0" can be implicitly converted to
1221
+ // a bool. In the "Bar(IsEven())" example above, if method Bar()
1222
+ // takes an int, 'arg_type' will be int; if it takes an unsigned long,
1223
+ // 'arg_type' will be unsigned long; and so on.
1224
+ //
1225
+ // Parameterizing Matchers
1226
+ // =======================
1227
+ //
1228
+ // Sometimes you'll want to parameterize the matcher. For that you
1229
+ // can use another macro:
1230
+ //
1231
+ // MATCHER_P(name, param_name, description_string) { statements; }
1232
+ //
1233
+ // For example:
1234
+ //
1235
+ // MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; }
1236
+ //
1237
+ // will allow you to write:
1238
+ //
1239
+ // EXPECT_THAT(Blah("a"), HasAbsoluteValue(n));
1240
+ //
1241
+ // which may lead to this message (assuming n is 10):
1242
+ //
1243
+ // Value of: Blah("a")
1244
+ // Expected: has absolute value 10
1245
+ // Actual: -9
1246
+ //
1247
+ // Note that both the matcher description and its parameter are
1248
+ // printed, making the message human-friendly.
1249
+ //
1250
+ // In the matcher definition body, you can write 'foo_type' to
1251
+ // reference the type of a parameter named 'foo'. For example, in the
1252
+ // body of MATCHER_P(HasAbsoluteValue, value) above, you can write
1253
+ // 'value_type' to refer to the type of 'value'.
1254
+ //
1255
+ // We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P10 to
1256
+ // support multi-parameter matchers.
1257
+ //
1258
+ // Describing Parameterized Matchers
1259
+ // =================================
1260
+ //
1261
+ // The last argument to MATCHER*() is a string-typed expression. The
1262
+ // expression can reference all of the matcher's parameters and a
1263
+ // special bool-typed variable named 'negation'. When 'negation' is
1264
+ // false, the expression should evaluate to the matcher's description;
1265
+ // otherwise it should evaluate to the description of the negation of
1266
+ // the matcher. For example,
1267
+ //
1268
+ // using testing::PrintToString;
1269
+ //
1270
+ // MATCHER_P2(InClosedRange, low, hi,
1271
+ // string(negation ? "is not" : "is") + " in range [" +
1272
+ // PrintToString(low) + ", " + PrintToString(hi) + "]") {
1273
+ // return low <= arg && arg <= hi;
1274
+ // }
1275
+ // ...
1276
+ // EXPECT_THAT(3, InClosedRange(4, 6));
1277
+ // EXPECT_THAT(3, Not(InClosedRange(2, 4)));
1278
+ //
1279
+ // would generate two failures that contain the text:
1280
+ //
1281
+ // Expected: is in range [4, 6]
1282
+ // ...
1283
+ // Expected: is not in range [2, 4]
1284
+ //
1285
+ // If you specify "" as the description, the failure message will
1286
+ // contain the sequence of words in the matcher name followed by the
1287
+ // parameter values printed as a tuple. For example,
1288
+ //
1289
+ // MATCHER_P2(InClosedRange, low, hi, "") { ... }
1290
+ // ...
1291
+ // EXPECT_THAT(3, InClosedRange(4, 6));
1292
+ // EXPECT_THAT(3, Not(InClosedRange(2, 4)));
1293
+ //
1294
+ // would generate two failures that contain the text:
1295
+ //
1296
+ // Expected: in closed range (4, 6)
1297
+ // ...
1298
+ // Expected: not (in closed range (2, 4))
1299
+ //
1300
+ // Types of Matcher Parameters
1301
+ // ===========================
1302
+ //
1303
+ // For the purpose of typing, you can view
1304
+ //
1305
+ // MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... }
1306
+ //
1307
+ // as shorthand for
1308
+ //
1309
+ // template <typename p1_type, ..., typename pk_type>
1310
+ // FooMatcherPk<p1_type, ..., pk_type>
1311
+ // Foo(p1_type p1, ..., pk_type pk) { ... }
1312
+ //
1313
+ // When you write Foo(v1, ..., vk), the compiler infers the types of
1314
+ // the parameters v1, ..., and vk for you. If you are not happy with
1315
+ // the result of the type inference, you can specify the types by
1316
+ // explicitly instantiating the template, as in Foo<long, bool>(5,
1317
+ // false). As said earlier, you don't get to (or need to) specify
1318
+ // 'arg_type' as that's determined by the context in which the matcher
1319
+ // is used. You can assign the result of expression Foo(p1, ..., pk)
1320
+ // to a variable of type FooMatcherPk<p1_type, ..., pk_type>. This
1321
+ // can be useful when composing matchers.
1322
+ //
1323
+ // While you can instantiate a matcher template with reference types,
1324
+ // passing the parameters by pointer usually makes your code more
1325
+ // readable. If, however, you still want to pass a parameter by
1326
+ // reference, be aware that in the failure message generated by the
1327
+ // matcher you will see the value of the referenced object but not its
1328
+ // address.
1329
+ //
1330
+ // Explaining Match Results
1331
+ // ========================
1332
+ //
1333
+ // Sometimes the matcher description alone isn't enough to explain why
1334
+ // the match has failed or succeeded. For example, when expecting a
1335
+ // long string, it can be very helpful to also print the diff between
1336
+ // the expected string and the actual one. To achieve that, you can
1337
+ // optionally stream additional information to a special variable
1338
+ // named result_listener, whose type is a pointer to class
1339
+ // MatchResultListener:
1340
+ //
1341
+ // MATCHER_P(EqualsLongString, str, "") {
1342
+ // if (arg == str) return true;
1343
+ //
1344
+ // *result_listener << "the difference: "
1345
+ /// << DiffStrings(str, arg);
1346
+ // return false;
1347
+ // }
1348
+ //
1349
+ // Overloading Matchers
1350
+ // ====================
1351
+ //
1352
+ // You can overload matchers with different numbers of parameters:
1353
+ //
1354
+ // MATCHER_P(Blah, a, description_string1) { ... }
1355
+ // MATCHER_P2(Blah, a, b, description_string2) { ... }
1356
+ //
1357
+ // Caveats
1358
+ // =======
1359
+ //
1360
+ // When defining a new matcher, you should also consider implementing
1361
+ // MatcherInterface or using MakePolymorphicMatcher(). These
1362
+ // approaches require more work than the MATCHER* macros, but also
1363
+ // give you more control on the types of the value being matched and
1364
+ // the matcher parameters, which may leads to better compiler error
1365
+ // messages when the matcher is used wrong. They also allow
1366
+ // overloading matchers based on parameter types (as opposed to just
1367
+ // based on the number of parameters).
1368
+ //
1369
+ // MATCHER*() can only be used in a namespace scope. The reason is
1370
+ // that C++ doesn't yet allow function-local types to be used to
1371
+ // instantiate templates. The up-coming C++0x standard will fix this.
1372
+ // Once that's done, we'll consider supporting using MATCHER*() inside
1373
+ // a function.
1374
+ //
1375
+ // More Information
1376
+ // ================
1377
+ //
1378
+ // To learn more about using these macros, please search for 'MATCHER'
1379
+ // on http://code.google.com/p/googlemock/wiki/CookBook.
1380
+
1381
+ #define MATCHER(name, description)\
1382
+ class name##Matcher {\
1383
+ public:\
1384
+ template <typename arg_type>\
1385
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1386
+ public:\
1387
+ gmock_Impl()\
1388
+ {}\
1389
+ virtual bool MatchAndExplain(\
1390
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1391
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1392
+ *gmock_os << FormatDescription(false);\
1393
+ }\
1394
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1395
+ *gmock_os << FormatDescription(true);\
1396
+ }\
1397
+ private:\
1398
+ ::testing::internal::string FormatDescription(bool negation) const {\
1399
+ const ::testing::internal::string gmock_description = (description);\
1400
+ if (!gmock_description.empty())\
1401
+ return gmock_description;\
1402
+ return ::testing::internal::FormatMatcherDescription(\
1403
+ negation, #name, \
1404
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1405
+ ::testing::tuple<>()));\
1406
+ }\
1407
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1408
+ };\
1409
+ template <typename arg_type>\
1410
+ operator ::testing::Matcher<arg_type>() const {\
1411
+ return ::testing::Matcher<arg_type>(\
1412
+ new gmock_Impl<arg_type>());\
1413
+ }\
1414
+ name##Matcher() {\
1415
+ }\
1416
+ private:\
1417
+ GTEST_DISALLOW_ASSIGN_(name##Matcher);\
1418
+ };\
1419
+ inline name##Matcher name() {\
1420
+ return name##Matcher();\
1421
+ }\
1422
+ template <typename arg_type>\
1423
+ bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(\
1424
+ arg_type arg, \
1425
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1426
+ const
1427
+
1428
+ #define MATCHER_P(name, p0, description)\
1429
+ template <typename p0##_type>\
1430
+ class name##MatcherP {\
1431
+ public:\
1432
+ template <typename arg_type>\
1433
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1434
+ public:\
1435
+ explicit gmock_Impl(p0##_type gmock_p0)\
1436
+ : p0(gmock_p0) {}\
1437
+ virtual bool MatchAndExplain(\
1438
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1439
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1440
+ *gmock_os << FormatDescription(false);\
1441
+ }\
1442
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1443
+ *gmock_os << FormatDescription(true);\
1444
+ }\
1445
+ p0##_type p0;\
1446
+ private:\
1447
+ ::testing::internal::string FormatDescription(bool negation) const {\
1448
+ const ::testing::internal::string gmock_description = (description);\
1449
+ if (!gmock_description.empty())\
1450
+ return gmock_description;\
1451
+ return ::testing::internal::FormatMatcherDescription(\
1452
+ negation, #name, \
1453
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1454
+ ::testing::tuple<p0##_type>(p0)));\
1455
+ }\
1456
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1457
+ };\
1458
+ template <typename arg_type>\
1459
+ operator ::testing::Matcher<arg_type>() const {\
1460
+ return ::testing::Matcher<arg_type>(\
1461
+ new gmock_Impl<arg_type>(p0));\
1462
+ }\
1463
+ explicit name##MatcherP(p0##_type gmock_p0) : p0(gmock_p0) {\
1464
+ }\
1465
+ p0##_type p0;\
1466
+ private:\
1467
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP);\
1468
+ };\
1469
+ template <typename p0##_type>\
1470
+ inline name##MatcherP<p0##_type> name(p0##_type p0) {\
1471
+ return name##MatcherP<p0##_type>(p0);\
1472
+ }\
1473
+ template <typename p0##_type>\
1474
+ template <typename arg_type>\
1475
+ bool name##MatcherP<p0##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1476
+ arg_type arg, \
1477
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1478
+ const
1479
+
1480
+ #define MATCHER_P2(name, p0, p1, description)\
1481
+ template <typename p0##_type, typename p1##_type>\
1482
+ class name##MatcherP2 {\
1483
+ public:\
1484
+ template <typename arg_type>\
1485
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1486
+ public:\
1487
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\
1488
+ : p0(gmock_p0), p1(gmock_p1) {}\
1489
+ virtual bool MatchAndExplain(\
1490
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1491
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1492
+ *gmock_os << FormatDescription(false);\
1493
+ }\
1494
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1495
+ *gmock_os << FormatDescription(true);\
1496
+ }\
1497
+ p0##_type p0;\
1498
+ p1##_type p1;\
1499
+ private:\
1500
+ ::testing::internal::string FormatDescription(bool negation) const {\
1501
+ const ::testing::internal::string gmock_description = (description);\
1502
+ if (!gmock_description.empty())\
1503
+ return gmock_description;\
1504
+ return ::testing::internal::FormatMatcherDescription(\
1505
+ negation, #name, \
1506
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1507
+ ::testing::tuple<p0##_type, p1##_type>(p0, p1)));\
1508
+ }\
1509
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1510
+ };\
1511
+ template <typename arg_type>\
1512
+ operator ::testing::Matcher<arg_type>() const {\
1513
+ return ::testing::Matcher<arg_type>(\
1514
+ new gmock_Impl<arg_type>(p0, p1));\
1515
+ }\
1516
+ name##MatcherP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
1517
+ p1(gmock_p1) {\
1518
+ }\
1519
+ p0##_type p0;\
1520
+ p1##_type p1;\
1521
+ private:\
1522
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP2);\
1523
+ };\
1524
+ template <typename p0##_type, typename p1##_type>\
1525
+ inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \
1526
+ p1##_type p1) {\
1527
+ return name##MatcherP2<p0##_type, p1##_type>(p0, p1);\
1528
+ }\
1529
+ template <typename p0##_type, typename p1##_type>\
1530
+ template <typename arg_type>\
1531
+ bool name##MatcherP2<p0##_type, \
1532
+ p1##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1533
+ arg_type arg, \
1534
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1535
+ const
1536
+
1537
+ #define MATCHER_P3(name, p0, p1, p2, description)\
1538
+ template <typename p0##_type, typename p1##_type, typename p2##_type>\
1539
+ class name##MatcherP3 {\
1540
+ public:\
1541
+ template <typename arg_type>\
1542
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1543
+ public:\
1544
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\
1545
+ : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
1546
+ virtual bool MatchAndExplain(\
1547
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1548
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1549
+ *gmock_os << FormatDescription(false);\
1550
+ }\
1551
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1552
+ *gmock_os << FormatDescription(true);\
1553
+ }\
1554
+ p0##_type p0;\
1555
+ p1##_type p1;\
1556
+ p2##_type p2;\
1557
+ private:\
1558
+ ::testing::internal::string FormatDescription(bool negation) const {\
1559
+ const ::testing::internal::string gmock_description = (description);\
1560
+ if (!gmock_description.empty())\
1561
+ return gmock_description;\
1562
+ return ::testing::internal::FormatMatcherDescription(\
1563
+ negation, #name, \
1564
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1565
+ ::testing::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \
1566
+ p2)));\
1567
+ }\
1568
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1569
+ };\
1570
+ template <typename arg_type>\
1571
+ operator ::testing::Matcher<arg_type>() const {\
1572
+ return ::testing::Matcher<arg_type>(\
1573
+ new gmock_Impl<arg_type>(p0, p1, p2));\
1574
+ }\
1575
+ name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \
1576
+ p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {\
1577
+ }\
1578
+ p0##_type p0;\
1579
+ p1##_type p1;\
1580
+ p2##_type p2;\
1581
+ private:\
1582
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP3);\
1583
+ };\
1584
+ template <typename p0##_type, typename p1##_type, typename p2##_type>\
1585
+ inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
1586
+ p1##_type p1, p2##_type p2) {\
1587
+ return name##MatcherP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
1588
+ }\
1589
+ template <typename p0##_type, typename p1##_type, typename p2##_type>\
1590
+ template <typename arg_type>\
1591
+ bool name##MatcherP3<p0##_type, p1##_type, \
1592
+ p2##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1593
+ arg_type arg, \
1594
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1595
+ const
1596
+
1597
+ #define MATCHER_P4(name, p0, p1, p2, p3, description)\
1598
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1599
+ typename p3##_type>\
1600
+ class name##MatcherP4 {\
1601
+ public:\
1602
+ template <typename arg_type>\
1603
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1604
+ public:\
1605
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1606
+ p3##_type gmock_p3)\
1607
+ : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3) {}\
1608
+ virtual bool MatchAndExplain(\
1609
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1610
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1611
+ *gmock_os << FormatDescription(false);\
1612
+ }\
1613
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1614
+ *gmock_os << FormatDescription(true);\
1615
+ }\
1616
+ p0##_type p0;\
1617
+ p1##_type p1;\
1618
+ p2##_type p2;\
1619
+ p3##_type p3;\
1620
+ private:\
1621
+ ::testing::internal::string FormatDescription(bool negation) const {\
1622
+ const ::testing::internal::string gmock_description = (description);\
1623
+ if (!gmock_description.empty())\
1624
+ return gmock_description;\
1625
+ return ::testing::internal::FormatMatcherDescription(\
1626
+ negation, #name, \
1627
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1628
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, \
1629
+ p3##_type>(p0, p1, p2, p3)));\
1630
+ }\
1631
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1632
+ };\
1633
+ template <typename arg_type>\
1634
+ operator ::testing::Matcher<arg_type>() const {\
1635
+ return ::testing::Matcher<arg_type>(\
1636
+ new gmock_Impl<arg_type>(p0, p1, p2, p3));\
1637
+ }\
1638
+ 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) {\
1641
+ }\
1642
+ p0##_type p0;\
1643
+ p1##_type p1;\
1644
+ p2##_type p2;\
1645
+ p3##_type p3;\
1646
+ private:\
1647
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP4);\
1648
+ };\
1649
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1650
+ typename p3##_type>\
1651
+ inline name##MatcherP4<p0##_type, p1##_type, p2##_type, \
1652
+ p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
1653
+ p3##_type p3) {\
1654
+ return name##MatcherP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \
1655
+ p1, p2, p3);\
1656
+ }\
1657
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1658
+ typename p3##_type>\
1659
+ template <typename arg_type>\
1660
+ bool name##MatcherP4<p0##_type, p1##_type, p2##_type, \
1661
+ p3##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1662
+ arg_type arg, \
1663
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1664
+ const
1665
+
1666
+ #define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\
1667
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1668
+ typename p3##_type, typename p4##_type>\
1669
+ class name##MatcherP5 {\
1670
+ public:\
1671
+ template <typename arg_type>\
1672
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1673
+ public:\
1674
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1675
+ 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) {}\
1678
+ virtual bool MatchAndExplain(\
1679
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1680
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1681
+ *gmock_os << FormatDescription(false);\
1682
+ }\
1683
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1684
+ *gmock_os << FormatDescription(true);\
1685
+ }\
1686
+ p0##_type p0;\
1687
+ p1##_type p1;\
1688
+ p2##_type p2;\
1689
+ p3##_type p3;\
1690
+ p4##_type p4;\
1691
+ private:\
1692
+ ::testing::internal::string FormatDescription(bool negation) const {\
1693
+ const ::testing::internal::string gmock_description = (description);\
1694
+ if (!gmock_description.empty())\
1695
+ return gmock_description;\
1696
+ return ::testing::internal::FormatMatcherDescription(\
1697
+ negation, #name, \
1698
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1699
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1700
+ p4##_type>(p0, p1, p2, p3, p4)));\
1701
+ }\
1702
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1703
+ };\
1704
+ template <typename arg_type>\
1705
+ operator ::testing::Matcher<arg_type>() const {\
1706
+ return ::testing::Matcher<arg_type>(\
1707
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4));\
1708
+ }\
1709
+ name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \
1710
+ 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) {\
1713
+ }\
1714
+ p0##_type p0;\
1715
+ p1##_type p1;\
1716
+ p2##_type p2;\
1717
+ p3##_type p3;\
1718
+ p4##_type p4;\
1719
+ private:\
1720
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP5);\
1721
+ };\
1722
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1723
+ typename p3##_type, typename p4##_type>\
1724
+ inline name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1725
+ p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
1726
+ p4##_type p4) {\
1727
+ return name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1728
+ p4##_type>(p0, p1, p2, p3, p4);\
1729
+ }\
1730
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1731
+ typename p3##_type, typename p4##_type>\
1732
+ template <typename arg_type>\
1733
+ bool name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1734
+ p4##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1735
+ arg_type arg, \
1736
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1737
+ const
1738
+
1739
+ #define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\
1740
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1741
+ typename p3##_type, typename p4##_type, typename p5##_type>\
1742
+ class name##MatcherP6 {\
1743
+ public:\
1744
+ template <typename arg_type>\
1745
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1746
+ public:\
1747
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1748
+ 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) {}\
1751
+ virtual bool MatchAndExplain(\
1752
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1753
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1754
+ *gmock_os << FormatDescription(false);\
1755
+ }\
1756
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1757
+ *gmock_os << FormatDescription(true);\
1758
+ }\
1759
+ p0##_type p0;\
1760
+ p1##_type p1;\
1761
+ p2##_type p2;\
1762
+ p3##_type p3;\
1763
+ p4##_type p4;\
1764
+ p5##_type p5;\
1765
+ private:\
1766
+ ::testing::internal::string FormatDescription(bool negation) const {\
1767
+ const ::testing::internal::string gmock_description = (description);\
1768
+ if (!gmock_description.empty())\
1769
+ return gmock_description;\
1770
+ return ::testing::internal::FormatMatcherDescription(\
1771
+ negation, #name, \
1772
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1773
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1774
+ p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\
1775
+ }\
1776
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1777
+ };\
1778
+ template <typename arg_type>\
1779
+ operator ::testing::Matcher<arg_type>() const {\
1780
+ return ::testing::Matcher<arg_type>(\
1781
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5));\
1782
+ }\
1783
+ name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \
1784
+ 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) {\
1787
+ }\
1788
+ p0##_type p0;\
1789
+ p1##_type p1;\
1790
+ p2##_type p2;\
1791
+ p3##_type p3;\
1792
+ p4##_type p4;\
1793
+ p5##_type p5;\
1794
+ private:\
1795
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP6);\
1796
+ };\
1797
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1798
+ typename p3##_type, typename p4##_type, typename p5##_type>\
1799
+ inline name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
1800
+ p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
1801
+ p3##_type p3, p4##_type p4, p5##_type p5) {\
1802
+ return name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
1803
+ p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
1804
+ }\
1805
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1806
+ typename p3##_type, typename p4##_type, typename p5##_type>\
1807
+ template <typename arg_type>\
1808
+ bool name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1809
+ p5##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1810
+ arg_type arg, \
1811
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1812
+ const
1813
+
1814
+ #define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\
1815
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1816
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1817
+ typename p6##_type>\
1818
+ class name##MatcherP7 {\
1819
+ public:\
1820
+ template <typename arg_type>\
1821
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1822
+ public:\
1823
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1824
+ p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1825
+ 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) {}\
1828
+ virtual bool MatchAndExplain(\
1829
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1830
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1831
+ *gmock_os << FormatDescription(false);\
1832
+ }\
1833
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1834
+ *gmock_os << FormatDescription(true);\
1835
+ }\
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;\
1843
+ private:\
1844
+ ::testing::internal::string FormatDescription(bool negation) const {\
1845
+ const ::testing::internal::string gmock_description = (description);\
1846
+ if (!gmock_description.empty())\
1847
+ return gmock_description;\
1848
+ return ::testing::internal::FormatMatcherDescription(\
1849
+ negation, #name, \
1850
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1851
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1852
+ p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \
1853
+ p6)));\
1854
+ }\
1855
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1856
+ };\
1857
+ template <typename arg_type>\
1858
+ operator ::testing::Matcher<arg_type>() const {\
1859
+ return ::testing::Matcher<arg_type>(\
1860
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6));\
1861
+ }\
1862
+ name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \
1863
+ 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) {\
1867
+ }\
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;\
1875
+ private:\
1876
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP7);\
1877
+ };\
1878
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1879
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1880
+ typename p6##_type>\
1881
+ inline name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
1882
+ p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
1883
+ p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
1884
+ p6##_type p6) {\
1885
+ return name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
1886
+ p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
1887
+ }\
1888
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1889
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1890
+ typename p6##_type>\
1891
+ template <typename arg_type>\
1892
+ bool name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1893
+ p5##_type, p6##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1894
+ arg_type arg, \
1895
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1896
+ const
1897
+
1898
+ #define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\
1899
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1900
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1901
+ typename p6##_type, typename p7##_type>\
1902
+ class name##MatcherP8 {\
1903
+ public:\
1904
+ template <typename arg_type>\
1905
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1906
+ public:\
1907
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1908
+ p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1909
+ 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) {}\
1912
+ virtual bool MatchAndExplain(\
1913
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
1914
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1915
+ *gmock_os << FormatDescription(false);\
1916
+ }\
1917
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1918
+ *gmock_os << FormatDescription(true);\
1919
+ }\
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;\
1928
+ private:\
1929
+ ::testing::internal::string FormatDescription(bool negation) const {\
1930
+ const ::testing::internal::string gmock_description = (description);\
1931
+ if (!gmock_description.empty())\
1932
+ return gmock_description;\
1933
+ return ::testing::internal::FormatMatcherDescription(\
1934
+ negation, #name, \
1935
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1936
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1937
+ p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \
1938
+ p3, p4, p5, p6, p7)));\
1939
+ }\
1940
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1941
+ };\
1942
+ template <typename arg_type>\
1943
+ operator ::testing::Matcher<arg_type>() const {\
1944
+ return ::testing::Matcher<arg_type>(\
1945
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7));\
1946
+ }\
1947
+ name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \
1948
+ p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1949
+ 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) {\
1953
+ }\
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;\
1962
+ private:\
1963
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP8);\
1964
+ };\
1965
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1966
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1967
+ typename p6##_type, typename p7##_type>\
1968
+ inline name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
1969
+ p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
1970
+ p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
1971
+ p6##_type p6, p7##_type p7) {\
1972
+ return name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
1973
+ p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
1974
+ p6, p7);\
1975
+ }\
1976
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1977
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1978
+ typename p6##_type, typename p7##_type>\
1979
+ template <typename arg_type>\
1980
+ bool name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1981
+ p5##_type, p6##_type, \
1982
+ p7##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1983
+ arg_type arg, \
1984
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1985
+ const
1986
+
1987
+ #define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\
1988
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1989
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1990
+ typename p6##_type, typename p7##_type, typename p8##_type>\
1991
+ class name##MatcherP9 {\
1992
+ public:\
1993
+ template <typename arg_type>\
1994
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
1995
+ public:\
1996
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1997
+ p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1998
+ 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) {}\
2002
+ virtual bool MatchAndExplain(\
2003
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
2004
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
2005
+ *gmock_os << FormatDescription(false);\
2006
+ }\
2007
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
2008
+ *gmock_os << FormatDescription(true);\
2009
+ }\
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;\
2019
+ private:\
2020
+ ::testing::internal::string FormatDescription(bool negation) const {\
2021
+ const ::testing::internal::string gmock_description = (description);\
2022
+ if (!gmock_description.empty())\
2023
+ return gmock_description;\
2024
+ return ::testing::internal::FormatMatcherDescription(\
2025
+ negation, #name, \
2026
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
2027
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
2028
+ p4##_type, p5##_type, p6##_type, p7##_type, \
2029
+ p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\
2030
+ }\
2031
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
2032
+ };\
2033
+ template <typename arg_type>\
2034
+ operator ::testing::Matcher<arg_type>() const {\
2035
+ return ::testing::Matcher<arg_type>(\
2036
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8));\
2037
+ }\
2038
+ name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \
2039
+ p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
2040
+ 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) {\
2044
+ }\
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;\
2054
+ private:\
2055
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP9);\
2056
+ };\
2057
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2058
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2059
+ typename p6##_type, typename p7##_type, typename p8##_type>\
2060
+ inline name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
2061
+ p4##_type, p5##_type, p6##_type, p7##_type, \
2062
+ p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
2063
+ p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
2064
+ p8##_type p8) {\
2065
+ return name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
2066
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
2067
+ p3, p4, p5, p6, p7, p8);\
2068
+ }\
2069
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2070
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2071
+ typename p6##_type, typename p7##_type, typename p8##_type>\
2072
+ template <typename arg_type>\
2073
+ bool name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
2074
+ p5##_type, p6##_type, p7##_type, \
2075
+ p8##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2076
+ arg_type arg, \
2077
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
2078
+ const
2079
+
2080
+ #define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\
2081
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2082
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2083
+ typename p6##_type, typename p7##_type, typename p8##_type, \
2084
+ typename p9##_type>\
2085
+ class name##MatcherP10 {\
2086
+ public:\
2087
+ template <typename arg_type>\
2088
+ class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
2089
+ public:\
2090
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
2091
+ p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
2092
+ p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
2093
+ 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) {}\
2097
+ virtual bool MatchAndExplain(\
2098
+ arg_type arg, ::testing::MatchResultListener* result_listener) const;\
2099
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
2100
+ *gmock_os << FormatDescription(false);\
2101
+ }\
2102
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
2103
+ *gmock_os << FormatDescription(true);\
2104
+ }\
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;\
2115
+ private:\
2116
+ ::testing::internal::string FormatDescription(bool negation) const {\
2117
+ const ::testing::internal::string gmock_description = (description);\
2118
+ if (!gmock_description.empty())\
2119
+ return gmock_description;\
2120
+ return ::testing::internal::FormatMatcherDescription(\
2121
+ negation, #name, \
2122
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
2123
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
2124
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2125
+ p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\
2126
+ }\
2127
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
2128
+ };\
2129
+ template <typename arg_type>\
2130
+ operator ::testing::Matcher<arg_type>() const {\
2131
+ return ::testing::Matcher<arg_type>(\
2132
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\
2133
+ }\
2134
+ name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \
2135
+ p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
2136
+ 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) {\
2140
+ }\
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;\
2151
+ private:\
2152
+ GTEST_DISALLOW_ASSIGN_(name##MatcherP10);\
2153
+ };\
2154
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2155
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2156
+ typename p6##_type, typename p7##_type, typename p8##_type, \
2157
+ typename p9##_type>\
2158
+ inline name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2159
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2160
+ p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
2161
+ p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
2162
+ p9##_type p9) {\
2163
+ return name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2164
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
2165
+ p1, p2, p3, p4, p5, p6, p7, p8, p9);\
2166
+ }\
2167
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2168
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2169
+ typename p6##_type, typename p7##_type, typename p8##_type, \
2170
+ typename p9##_type>\
2171
+ template <typename arg_type>\
2172
+ bool name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2173
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2174
+ p9##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2175
+ arg_type arg, \
2176
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
2177
+ const
2178
+
2179
+ #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_