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,794 @@
1
+ $$ -*- mode: c++; -*-
2
+ $$ This is a Pump source file. Please use Pump to convert it to
3
+ $$ gmock-generated-actions.h.
4
+ $$
5
+ $var n = 10 $$ The maximum arity we support.
6
+ $$}} This meta comment fixes auto-indentation in editors.
7
+ // Copyright 2007, Google Inc.
8
+ // All rights reserved.
9
+ //
10
+ // Redistribution and use in source and binary forms, with or without
11
+ // modification, are permitted provided that the following conditions are
12
+ // met:
13
+ //
14
+ // * Redistributions of source code must retain the above copyright
15
+ // notice, this list of conditions and the following disclaimer.
16
+ // * Redistributions in binary form must reproduce the above
17
+ // copyright notice, this list of conditions and the following disclaimer
18
+ // in the documentation and/or other materials provided with the
19
+ // distribution.
20
+ // * Neither the name of Google Inc. nor the names of its
21
+ // contributors may be used to endorse or promote products derived from
22
+ // this software without specific prior written permission.
23
+ //
24
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+ //
36
+ // Author: wan@google.com (Zhanyong Wan)
37
+
38
+ // Google Mock - a framework for writing C++ mock classes.
39
+ //
40
+ // This file implements some commonly used variadic actions.
41
+
42
+ #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
43
+ #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
44
+
45
+ #include "gmock/gmock-actions.h"
46
+ #include "gmock/internal/gmock-port.h"
47
+
48
+ namespace testing {
49
+ namespace internal {
50
+
51
+ // InvokeHelper<F> knows how to unpack an N-tuple and invoke an N-ary
52
+ // function or method with the unpacked values, where F is a function
53
+ // type that takes N arguments.
54
+ template <typename Result, typename ArgumentTuple>
55
+ class InvokeHelper;
56
+
57
+
58
+ $range i 0..n
59
+ $for i [[
60
+ $range j 1..i
61
+ $var types = [[$for j [[, typename A$j]]]]
62
+ $var as = [[$for j, [[A$j]]]]
63
+ $var args = [[$if i==0 [[]] $else [[ args]]]]
64
+ $var gets = [[$for j, [[get<$(j - 1)>(args)]]]]
65
+ template <typename R$types>
66
+ class InvokeHelper<R, ::testing::tuple<$as> > {
67
+ public:
68
+ template <typename Function>
69
+ static R Invoke(Function function, const ::testing::tuple<$as>&$args) {
70
+ return function($gets);
71
+ }
72
+
73
+ template <class Class, typename MethodPtr>
74
+ static R InvokeMethod(Class* obj_ptr,
75
+ MethodPtr method_ptr,
76
+ const ::testing::tuple<$as>&$args) {
77
+ return (obj_ptr->*method_ptr)($gets);
78
+ }
79
+ };
80
+
81
+
82
+ ]]
83
+ // An INTERNAL macro for extracting the type of a tuple field. It's
84
+ // subject to change without notice - DO NOT USE IN USER CODE!
85
+ #define GMOCK_FIELD_(Tuple, N) \
86
+ typename ::testing::tuple_element<N, Tuple>::type
87
+
88
+ $range i 1..n
89
+
90
+ // SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::type is the
91
+ // type of an n-ary function whose i-th (1-based) argument type is the
92
+ // k{i}-th (0-based) field of ArgumentTuple, which must be a tuple
93
+ // type, and whose return type is Result. For example,
94
+ // SelectArgs<int, ::testing::tuple<bool, char, double, long>, 0, 3>::type
95
+ // is int(bool, long).
96
+ //
97
+ // SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::Select(args)
98
+ // returns the selected fields (k1, k2, ..., k_n) of args as a tuple.
99
+ // For example,
100
+ // SelectArgs<int, tuple<bool, char, double>, 2, 0>::Select(
101
+ // ::testing::make_tuple(true, 'a', 2.5))
102
+ // returns tuple (2.5, true).
103
+ //
104
+ // The numbers in list k1, k2, ..., k_n must be >= 0, where n can be
105
+ // in the range [0, $n]. Duplicates are allowed and they don't have
106
+ // to be in an ascending or descending order.
107
+
108
+ template <typename Result, typename ArgumentTuple, $for i, [[int k$i]]>
109
+ class SelectArgs {
110
+ public:
111
+ typedef Result type($for i, [[GMOCK_FIELD_(ArgumentTuple, k$i)]]);
112
+ typedef typename Function<type>::ArgumentTuple SelectedArgs;
113
+ static SelectedArgs Select(const ArgumentTuple& args) {
114
+ return SelectedArgs($for i, [[get<k$i>(args)]]);
115
+ }
116
+ };
117
+
118
+
119
+ $for i [[
120
+ $range j 1..n
121
+ $range j1 1..i-1
122
+ template <typename Result, typename ArgumentTuple$for j1[[, int k$j1]]>
123
+ class SelectArgs<Result, ArgumentTuple,
124
+ $for j, [[$if j <= i-1 [[k$j]] $else [[-1]]]]> {
125
+ public:
126
+ typedef Result type($for j1, [[GMOCK_FIELD_(ArgumentTuple, k$j1)]]);
127
+ typedef typename Function<type>::ArgumentTuple SelectedArgs;
128
+ static SelectedArgs Select(const ArgumentTuple& [[]]
129
+ $if i == 1 [[/* args */]] $else [[args]]) {
130
+ return SelectedArgs($for j1, [[get<k$j1>(args)]]);
131
+ }
132
+ };
133
+
134
+
135
+ ]]
136
+ #undef GMOCK_FIELD_
137
+
138
+ $var ks = [[$for i, [[k$i]]]]
139
+
140
+ // Implements the WithArgs action.
141
+ template <typename InnerAction, $for i, [[int k$i = -1]]>
142
+ class WithArgsAction {
143
+ public:
144
+ explicit WithArgsAction(const InnerAction& action) : action_(action) {}
145
+
146
+ template <typename F>
147
+ operator Action<F>() const { return MakeAction(new Impl<F>(action_)); }
148
+
149
+ private:
150
+ template <typename F>
151
+ class Impl : public ActionInterface<F> {
152
+ public:
153
+ typedef typename Function<F>::Result Result;
154
+ typedef typename Function<F>::ArgumentTuple ArgumentTuple;
155
+
156
+ explicit Impl(const InnerAction& action) : action_(action) {}
157
+
158
+ virtual Result Perform(const ArgumentTuple& args) {
159
+ return action_.Perform(SelectArgs<Result, ArgumentTuple, $ks>::Select(args));
160
+ }
161
+
162
+ private:
163
+ typedef typename SelectArgs<Result, ArgumentTuple,
164
+ $ks>::type InnerFunctionType;
165
+
166
+ Action<InnerFunctionType> action_;
167
+ };
168
+
169
+ const InnerAction action_;
170
+
171
+ GTEST_DISALLOW_ASSIGN_(WithArgsAction);
172
+ };
173
+
174
+ // A macro from the ACTION* family (defined later in this file)
175
+ // defines an action that can be used in a mock function. Typically,
176
+ // these actions only care about a subset of the arguments of the mock
177
+ // function. For example, if such an action only uses the second
178
+ // argument, it can be used in any mock function that takes >= 2
179
+ // arguments where the type of the second argument is compatible.
180
+ //
181
+ // Therefore, the action implementation must be prepared to take more
182
+ // arguments than it needs. The ExcessiveArg type is used to
183
+ // represent those excessive arguments. In order to keep the compiler
184
+ // error messages tractable, we define it in the testing namespace
185
+ // instead of testing::internal. However, this is an INTERNAL TYPE
186
+ // and subject to change without notice, so a user MUST NOT USE THIS
187
+ // TYPE DIRECTLY.
188
+ struct ExcessiveArg {};
189
+
190
+ // A helper class needed for implementing the ACTION* macros.
191
+ template <typename Result, class Impl>
192
+ class ActionHelper {
193
+ public:
194
+ $range i 0..n
195
+ $for i
196
+
197
+ [[
198
+ $var template = [[$if i==0 [[]] $else [[
199
+ $range j 0..i-1
200
+ template <$for j, [[typename A$j]]>
201
+ ]]]]
202
+ $range j 0..i-1
203
+ $var As = [[$for j, [[A$j]]]]
204
+ $var as = [[$for j, [[get<$j>(args)]]]]
205
+ $range k 1..n-i
206
+ $var eas = [[$for k, [[ExcessiveArg()]]]]
207
+ $var arg_list = [[$if (i==0) | (i==n) [[$as$eas]] $else [[$as, $eas]]]]
208
+ $template
209
+ static Result Perform(Impl* impl, const ::testing::tuple<$As>& args) {
210
+ return impl->template gmock_PerformImpl<$As>(args, $arg_list);
211
+ }
212
+
213
+ ]]
214
+ };
215
+
216
+ } // namespace internal
217
+
218
+ // Various overloads for Invoke().
219
+
220
+ // WithArgs<N1, N2, ..., Nk>(an_action) creates an action that passes
221
+ // the selected arguments of the mock function to an_action and
222
+ // performs it. It serves as an adaptor between actions with
223
+ // different argument lists. C++ doesn't support default arguments for
224
+ // function templates, so we have to overload it.
225
+
226
+ $range i 1..n
227
+ $for i [[
228
+ $range j 1..i
229
+ template <$for j [[int k$j, ]]typename InnerAction>
230
+ inline internal::WithArgsAction<InnerAction$for j [[, k$j]]>
231
+ WithArgs(const InnerAction& action) {
232
+ return internal::WithArgsAction<InnerAction$for j [[, k$j]]>(action);
233
+ }
234
+
235
+
236
+ ]]
237
+ // Creates an action that does actions a1, a2, ..., sequentially in
238
+ // each invocation.
239
+ $range i 2..n
240
+ $for i [[
241
+ $range j 2..i
242
+ $var types = [[$for j, [[typename Action$j]]]]
243
+ $var Aas = [[$for j [[, Action$j a$j]]]]
244
+
245
+ template <typename Action1, $types>
246
+ $range k 1..i-1
247
+
248
+ inline $for k [[internal::DoBothAction<Action$k, ]]Action$i$for k [[>]]
249
+
250
+ DoAll(Action1 a1$Aas) {
251
+ $if i==2 [[
252
+
253
+ return internal::DoBothAction<Action1, Action2>(a1, a2);
254
+ ]] $else [[
255
+ $range j2 2..i
256
+
257
+ return DoAll(a1, DoAll($for j2, [[a$j2]]));
258
+ ]]
259
+
260
+ }
261
+
262
+ ]]
263
+
264
+ } // namespace testing
265
+
266
+ // The ACTION* family of macros can be used in a namespace scope to
267
+ // define custom actions easily. The syntax:
268
+ //
269
+ // ACTION(name) { statements; }
270
+ //
271
+ // will define an action with the given name that executes the
272
+ // statements. The value returned by the statements will be used as
273
+ // the return value of the action. Inside the statements, you can
274
+ // refer to the K-th (0-based) argument of the mock function by
275
+ // 'argK', and refer to its type by 'argK_type'. For example:
276
+ //
277
+ // ACTION(IncrementArg1) {
278
+ // arg1_type temp = arg1;
279
+ // return ++(*temp);
280
+ // }
281
+ //
282
+ // allows you to write
283
+ //
284
+ // ...WillOnce(IncrementArg1());
285
+ //
286
+ // You can also refer to the entire argument tuple and its type by
287
+ // 'args' and 'args_type', and refer to the mock function type and its
288
+ // return type by 'function_type' and 'return_type'.
289
+ //
290
+ // Note that you don't need to specify the types of the mock function
291
+ // arguments. However rest assured that your code is still type-safe:
292
+ // you'll get a compiler error if *arg1 doesn't support the ++
293
+ // operator, or if the type of ++(*arg1) isn't compatible with the
294
+ // mock function's return type, for example.
295
+ //
296
+ // Sometimes you'll want to parameterize the action. For that you can use
297
+ // another macro:
298
+ //
299
+ // ACTION_P(name, param_name) { statements; }
300
+ //
301
+ // For example:
302
+ //
303
+ // ACTION_P(Add, n) { return arg0 + n; }
304
+ //
305
+ // will allow you to write:
306
+ //
307
+ // ...WillOnce(Add(5));
308
+ //
309
+ // Note that you don't need to provide the type of the parameter
310
+ // either. If you need to reference the type of a parameter named
311
+ // 'foo', you can write 'foo_type'. For example, in the body of
312
+ // ACTION_P(Add, n) above, you can write 'n_type' to refer to the type
313
+ // of 'n'.
314
+ //
315
+ // We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P$n to support
316
+ // multi-parameter actions.
317
+ //
318
+ // For the purpose of typing, you can view
319
+ //
320
+ // ACTION_Pk(Foo, p1, ..., pk) { ... }
321
+ //
322
+ // as shorthand for
323
+ //
324
+ // template <typename p1_type, ..., typename pk_type>
325
+ // FooActionPk<p1_type, ..., pk_type> Foo(p1_type p1, ..., pk_type pk) { ... }
326
+ //
327
+ // In particular, you can provide the template type arguments
328
+ // explicitly when invoking Foo(), as in Foo<long, bool>(5, false);
329
+ // although usually you can rely on the compiler to infer the types
330
+ // for you automatically. You can assign the result of expression
331
+ // Foo(p1, ..., pk) to a variable of type FooActionPk<p1_type, ...,
332
+ // pk_type>. This can be useful when composing actions.
333
+ //
334
+ // You can also overload actions with different numbers of parameters:
335
+ //
336
+ // ACTION_P(Plus, a) { ... }
337
+ // ACTION_P2(Plus, a, b) { ... }
338
+ //
339
+ // While it's tempting to always use the ACTION* macros when defining
340
+ // a new action, you should also consider implementing ActionInterface
341
+ // or using MakePolymorphicAction() instead, especially if you need to
342
+ // use the action a lot. While these approaches require more work,
343
+ // they give you more control on the types of the mock function
344
+ // arguments and the action parameters, which in general leads to
345
+ // better compiler error messages that pay off in the long run. They
346
+ // also allow overloading actions based on parameter types (as opposed
347
+ // to just based on the number of parameters).
348
+ //
349
+ // CAVEAT:
350
+ //
351
+ // ACTION*() can only be used in a namespace scope. The reason is
352
+ // that C++ doesn't yet allow function-local types to be used to
353
+ // instantiate templates. The up-coming C++0x standard will fix this.
354
+ // Once that's done, we'll consider supporting using ACTION*() inside
355
+ // a function.
356
+ //
357
+ // MORE INFORMATION:
358
+ //
359
+ // To learn more about using these macros, please search for 'ACTION'
360
+ // on http://code.google.com/p/googlemock/wiki/CookBook.
361
+
362
+ $range i 0..n
363
+ $range k 0..n-1
364
+
365
+ // An internal macro needed for implementing ACTION*().
366
+ #define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\
367
+ const args_type& args GTEST_ATTRIBUTE_UNUSED_
368
+ $for k [[, \
369
+ arg$k[[]]_type arg$k GTEST_ATTRIBUTE_UNUSED_]]
370
+
371
+
372
+ // Sometimes you want to give an action explicit template parameters
373
+ // that cannot be inferred from its value parameters. ACTION() and
374
+ // ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that
375
+ // and can be viewed as an extension to ACTION() and ACTION_P*().
376
+ //
377
+ // The syntax:
378
+ //
379
+ // ACTION_TEMPLATE(ActionName,
380
+ // HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m),
381
+ // AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; }
382
+ //
383
+ // defines an action template that takes m explicit template
384
+ // parameters and n value parameters. name_i is the name of the i-th
385
+ // template parameter, and kind_i specifies whether it's a typename,
386
+ // an integral constant, or a template. p_i is the name of the i-th
387
+ // value parameter.
388
+ //
389
+ // Example:
390
+ //
391
+ // // DuplicateArg<k, T>(output) converts the k-th argument of the mock
392
+ // // function to type T and copies it to *output.
393
+ // ACTION_TEMPLATE(DuplicateArg,
394
+ // HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
395
+ // AND_1_VALUE_PARAMS(output)) {
396
+ // *output = T(::testing::get<k>(args));
397
+ // }
398
+ // ...
399
+ // int n;
400
+ // EXPECT_CALL(mock, Foo(_, _))
401
+ // .WillOnce(DuplicateArg<1, unsigned char>(&n));
402
+ //
403
+ // To create an instance of an action template, write:
404
+ //
405
+ // ActionName<t1, ..., t_m>(v1, ..., v_n)
406
+ //
407
+ // where the ts are the template arguments and the vs are the value
408
+ // arguments. The value argument types are inferred by the compiler.
409
+ // If you want to explicitly specify the value argument types, you can
410
+ // provide additional template arguments:
411
+ //
412
+ // ActionName<t1, ..., t_m, u1, ..., u_k>(v1, ..., v_n)
413
+ //
414
+ // where u_i is the desired type of v_i.
415
+ //
416
+ // ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the
417
+ // number of value parameters, but not on the number of template
418
+ // parameters. Without the restriction, the meaning of the following
419
+ // is unclear:
420
+ //
421
+ // OverloadedAction<int, bool>(x);
422
+ //
423
+ // Are we using a single-template-parameter action where 'bool' refers
424
+ // to the type of x, or are we using a two-template-parameter action
425
+ // where the compiler is asked to infer the type of x?
426
+ //
427
+ // Implementation notes:
428
+ //
429
+ // GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and
430
+ // GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for
431
+ // implementing ACTION_TEMPLATE. The main trick we use is to create
432
+ // new macro invocations when expanding a macro. For example, we have
433
+ //
434
+ // #define ACTION_TEMPLATE(name, template_params, value_params)
435
+ // ... GMOCK_INTERNAL_DECL_##template_params ...
436
+ //
437
+ // which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...)
438
+ // to expand to
439
+ //
440
+ // ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ...
441
+ //
442
+ // Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the
443
+ // preprocessor will continue to expand it to
444
+ //
445
+ // ... typename T ...
446
+ //
447
+ // This technique conforms to the C++ standard and is portable. It
448
+ // allows us to implement action templates using O(N) code, where N is
449
+ // the maximum number of template/value parameters supported. Without
450
+ // using it, we'd have to devote O(N^2) amount of code to implement all
451
+ // combinations of m and n.
452
+
453
+ // Declares the template parameters.
454
+
455
+ $range j 1..n
456
+ $for j [[
457
+ $range m 0..j-1
458
+ #define GMOCK_INTERNAL_DECL_HAS_$j[[]]
459
+ _TEMPLATE_PARAMS($for m, [[kind$m, name$m]]) $for m, [[kind$m name$m]]
460
+
461
+
462
+ ]]
463
+
464
+ // Lists the template parameters.
465
+
466
+ $for j [[
467
+ $range m 0..j-1
468
+ #define GMOCK_INTERNAL_LIST_HAS_$j[[]]
469
+ _TEMPLATE_PARAMS($for m, [[kind$m, name$m]]) $for m, [[name$m]]
470
+
471
+
472
+ ]]
473
+
474
+ // Declares the types of value parameters.
475
+
476
+ $for i [[
477
+ $range j 0..i-1
478
+ #define GMOCK_INTERNAL_DECL_TYPE_AND_$i[[]]
479
+ _VALUE_PARAMS($for j, [[p$j]]) $for j [[, typename p$j##_type]]
480
+
481
+
482
+ ]]
483
+
484
+ // Initializes the value parameters.
485
+
486
+ $for i [[
487
+ $range j 0..i-1
488
+ #define GMOCK_INTERNAL_INIT_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])\
489
+ ($for j, [[p$j##_type gmock_p$j]])$if i>0 [[ : ]]$for j, [[p$j(gmock_p$j)]]
490
+
491
+
492
+ ]]
493
+
494
+ // Declares the fields for storing the value parameters.
495
+
496
+ $for i [[
497
+ $range j 0..i-1
498
+ #define GMOCK_INTERNAL_DEFN_AND_$i[[]]
499
+ _VALUE_PARAMS($for j, [[p$j]]) $for j [[p$j##_type p$j; ]]
500
+
501
+
502
+ ]]
503
+
504
+ // Lists the value parameters.
505
+
506
+ $for i [[
507
+ $range j 0..i-1
508
+ #define GMOCK_INTERNAL_LIST_AND_$i[[]]
509
+ _VALUE_PARAMS($for j, [[p$j]]) $for j, [[p$j]]
510
+
511
+
512
+ ]]
513
+
514
+ // Lists the value parameter types.
515
+
516
+ $for i [[
517
+ $range j 0..i-1
518
+ #define GMOCK_INTERNAL_LIST_TYPE_AND_$i[[]]
519
+ _VALUE_PARAMS($for j, [[p$j]]) $for j [[, p$j##_type]]
520
+
521
+
522
+ ]]
523
+
524
+ // Declares the value parameters.
525
+
526
+ $for i [[
527
+ $range j 0..i-1
528
+ #define GMOCK_INTERNAL_DECL_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]]) [[]]
529
+ $for j, [[p$j##_type p$j]]
530
+
531
+
532
+ ]]
533
+
534
+ // The suffix of the class template implementing the action template.
535
+ $for i [[
536
+
537
+
538
+ $range j 0..i-1
539
+ #define GMOCK_INTERNAL_COUNT_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]]) [[]]
540
+ $if i==1 [[P]] $elif i>=2 [[P$i]]
541
+ ]]
542
+
543
+
544
+ // The name of the class template implementing the action template.
545
+ #define GMOCK_ACTION_CLASS_(name, value_params)\
546
+ GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
547
+
548
+ $range k 0..n-1
549
+
550
+ #define ACTION_TEMPLATE(name, template_params, value_params)\
551
+ template <GMOCK_INTERNAL_DECL_##template_params\
552
+ GMOCK_INTERNAL_DECL_TYPE_##value_params>\
553
+ class GMOCK_ACTION_CLASS_(name, value_params) {\
554
+ public:\
555
+ explicit GMOCK_ACTION_CLASS_(name, value_params)\
556
+ GMOCK_INTERNAL_INIT_##value_params {}\
557
+ template <typename F>\
558
+ class gmock_Impl : public ::testing::ActionInterface<F> {\
559
+ public:\
560
+ typedef F function_type;\
561
+ typedef typename ::testing::internal::Function<F>::Result return_type;\
562
+ typedef typename ::testing::internal::Function<F>::ArgumentTuple\
563
+ args_type;\
564
+ explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\
565
+ virtual return_type Perform(const args_type& args) {\
566
+ return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
567
+ Perform(this, args);\
568
+ }\
569
+ template <$for k, [[typename arg$k[[]]_type]]>\
570
+ return_type gmock_PerformImpl(const args_type& args[[]]
571
+ $for k [[, arg$k[[]]_type arg$k]]) const;\
572
+ GMOCK_INTERNAL_DEFN_##value_params\
573
+ private:\
574
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
575
+ };\
576
+ template <typename F> operator ::testing::Action<F>() const {\
577
+ return ::testing::Action<F>(\
578
+ new gmock_Impl<F>(GMOCK_INTERNAL_LIST_##value_params));\
579
+ }\
580
+ GMOCK_INTERNAL_DEFN_##value_params\
581
+ private:\
582
+ GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\
583
+ };\
584
+ template <GMOCK_INTERNAL_DECL_##template_params\
585
+ GMOCK_INTERNAL_DECL_TYPE_##value_params>\
586
+ inline GMOCK_ACTION_CLASS_(name, value_params)<\
587
+ GMOCK_INTERNAL_LIST_##template_params\
588
+ GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\
589
+ GMOCK_INTERNAL_DECL_##value_params) {\
590
+ return GMOCK_ACTION_CLASS_(name, value_params)<\
591
+ GMOCK_INTERNAL_LIST_##template_params\
592
+ GMOCK_INTERNAL_LIST_TYPE_##value_params>(\
593
+ GMOCK_INTERNAL_LIST_##value_params);\
594
+ }\
595
+ template <GMOCK_INTERNAL_DECL_##template_params\
596
+ GMOCK_INTERNAL_DECL_TYPE_##value_params>\
597
+ template <typename F>\
598
+ template <typename arg0_type, typename arg1_type, typename arg2_type, \
599
+ typename arg3_type, typename arg4_type, typename arg5_type, \
600
+ typename arg6_type, typename arg7_type, typename arg8_type, \
601
+ typename arg9_type>\
602
+ typename ::testing::internal::Function<F>::Result\
603
+ GMOCK_ACTION_CLASS_(name, value_params)<\
604
+ GMOCK_INTERNAL_LIST_##template_params\
605
+ GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl<F>::\
606
+ gmock_PerformImpl(\
607
+ GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
608
+
609
+ $for i
610
+
611
+ [[
612
+ $var template = [[$if i==0 [[]] $else [[
613
+ $range j 0..i-1
614
+
615
+ template <$for j, [[typename p$j##_type]]>\
616
+ ]]]]
617
+ $var class_name = [[name##Action[[$if i==0 [[]] $elif i==1 [[P]]
618
+ $else [[P$i]]]]]]
619
+ $range j 0..i-1
620
+ $var ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]]
621
+ $var param_types_and_names = [[$for j, [[p$j##_type p$j]]]]
622
+ $var inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(gmock_p$j)]]]]]]
623
+ $var param_field_decls = [[$for j
624
+ [[
625
+
626
+ p$j##_type p$j;\
627
+ ]]]]
628
+ $var param_field_decls2 = [[$for j
629
+ [[
630
+
631
+ p$j##_type p$j;\
632
+ ]]]]
633
+ $var params = [[$for j, [[p$j]]]]
634
+ $var param_types = [[$if i==0 [[]] $else [[<$for j, [[p$j##_type]]>]]]]
635
+ $var typename_arg_types = [[$for k, [[typename arg$k[[]]_type]]]]
636
+ $var arg_types_and_names = [[$for k, [[arg$k[[]]_type arg$k]]]]
637
+ $var macro_name = [[$if i==0 [[ACTION]] $elif i==1 [[ACTION_P]]
638
+ $else [[ACTION_P$i]]]]
639
+
640
+ #define $macro_name(name$for j [[, p$j]])\$template
641
+ class $class_name {\
642
+ public:\
643
+ [[$if i==1 [[explicit ]]]]$class_name($ctor_param_list)$inits {}\
644
+ template <typename F>\
645
+ class gmock_Impl : public ::testing::ActionInterface<F> {\
646
+ public:\
647
+ typedef F function_type;\
648
+ typedef typename ::testing::internal::Function<F>::Result return_type;\
649
+ typedef typename ::testing::internal::Function<F>::ArgumentTuple\
650
+ args_type;\
651
+ [[$if i==1 [[explicit ]]]]gmock_Impl($ctor_param_list)$inits {}\
652
+ virtual return_type Perform(const args_type& args) {\
653
+ return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
654
+ Perform(this, args);\
655
+ }\
656
+ template <$typename_arg_types>\
657
+ return_type gmock_PerformImpl(const args_type& args, [[]]
658
+ $arg_types_and_names) const;\$param_field_decls
659
+ private:\
660
+ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
661
+ };\
662
+ template <typename F> operator ::testing::Action<F>() const {\
663
+ return ::testing::Action<F>(new gmock_Impl<F>($params));\
664
+ }\$param_field_decls2
665
+ private:\
666
+ GTEST_DISALLOW_ASSIGN_($class_name);\
667
+ };\$template
668
+ inline $class_name$param_types name($param_types_and_names) {\
669
+ return $class_name$param_types($params);\
670
+ }\$template
671
+ template <typename F>\
672
+ template <$typename_arg_types>\
673
+ typename ::testing::internal::Function<F>::Result\
674
+ $class_name$param_types::gmock_Impl<F>::gmock_PerformImpl(\
675
+ GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
676
+ ]]
677
+ $$ } // This meta comment fixes auto-indentation in Emacs. It won't
678
+ $$ // show up in the generated code.
679
+
680
+
681
+ namespace testing {
682
+
683
+
684
+ // The ACTION*() macros trigger warning C4100 (unreferenced formal
685
+ // parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
686
+ // the macro definition, as the warnings are generated when the macro
687
+ // is expanded and macro expansion cannot contain #pragma. Therefore
688
+ // we suppress them here.
689
+ #ifdef _MSC_VER
690
+ # pragma warning(push)
691
+ # pragma warning(disable:4100)
692
+ #endif
693
+
694
+ // Various overloads for InvokeArgument<N>().
695
+ //
696
+ // The InvokeArgument<N>(a1, a2, ..., a_k) action invokes the N-th
697
+ // (0-based) argument, which must be a k-ary callable, of the mock
698
+ // function, with arguments a1, a2, ..., a_k.
699
+ //
700
+ // Notes:
701
+ //
702
+ // 1. The arguments are passed by value by default. If you need to
703
+ // pass an argument by reference, wrap it inside ByRef(). For
704
+ // example,
705
+ //
706
+ // InvokeArgument<1>(5, string("Hello"), ByRef(foo))
707
+ //
708
+ // passes 5 and string("Hello") by value, and passes foo by
709
+ // reference.
710
+ //
711
+ // 2. If the callable takes an argument by reference but ByRef() is
712
+ // not used, it will receive the reference to a copy of the value,
713
+ // instead of the original value. For example, when the 0-th
714
+ // argument of the mock function takes a const string&, the action
715
+ //
716
+ // InvokeArgument<0>(string("Hello"))
717
+ //
718
+ // makes a copy of the temporary string("Hello") object and passes a
719
+ // reference of the copy, instead of the original temporary object,
720
+ // to the callable. This makes it easy for a user to define an
721
+ // InvokeArgument action from temporary values and have it performed
722
+ // later.
723
+
724
+ namespace internal {
725
+ namespace invoke_argument {
726
+
727
+ // Appears in InvokeArgumentAdl's argument list to help avoid
728
+ // accidental calls to user functions of the same name.
729
+ struct AdlTag {};
730
+
731
+ // InvokeArgumentAdl - a helper for InvokeArgument.
732
+ // The basic overloads are provided here for generic functors.
733
+ // Overloads for other custom-callables are provided in the
734
+ // internal/custom/callback-actions.h header.
735
+
736
+ $range i 0..n
737
+ $for i
738
+ [[
739
+ $range j 1..i
740
+
741
+ template <typename R, typename F[[$for j [[, typename A$j]]]]>
742
+ R InvokeArgumentAdl(AdlTag, F f[[$for j [[, A$j a$j]]]]) {
743
+ return f([[$for j, [[a$j]]]]);
744
+ }
745
+ ]]
746
+
747
+ } // namespace invoke_argument
748
+ } // namespace internal
749
+
750
+ $range i 0..n
751
+ $for i [[
752
+ $range j 0..i-1
753
+
754
+ ACTION_TEMPLATE(InvokeArgument,
755
+ HAS_1_TEMPLATE_PARAMS(int, k),
756
+ AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])) {
757
+ using internal::invoke_argument::InvokeArgumentAdl;
758
+ return InvokeArgumentAdl<return_type>(
759
+ internal::invoke_argument::AdlTag(),
760
+ ::testing::get<k>(args)$for j [[, p$j]]);
761
+ }
762
+
763
+ ]]
764
+
765
+ // Various overloads for ReturnNew<T>().
766
+ //
767
+ // The ReturnNew<T>(a1, a2, ..., a_k) action returns a pointer to a new
768
+ // instance of type T, constructed on the heap with constructor arguments
769
+ // a1, a2, ..., and a_k. The caller assumes ownership of the returned value.
770
+ $range i 0..n
771
+ $for i [[
772
+ $range j 0..i-1
773
+ $var ps = [[$for j, [[p$j]]]]
774
+
775
+ ACTION_TEMPLATE(ReturnNew,
776
+ HAS_1_TEMPLATE_PARAMS(typename, T),
777
+ AND_$i[[]]_VALUE_PARAMS($ps)) {
778
+ return new T($ps);
779
+ }
780
+
781
+ ]]
782
+
783
+ #ifdef _MSC_VER
784
+ # pragma warning(pop)
785
+ #endif
786
+
787
+ } // namespace testing
788
+
789
+ // Include any custom callback actions added by the local installation.
790
+ // We must include this header at the end to make sure it can use the
791
+ // declarations from this file.
792
+ #include "gmock/internal/custom/gmock-generated-actions.h"
793
+
794
+ #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_