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,622 @@
1
+ // Copyright 2007, Google Inc.
2
+ // All rights reserved.
3
+ //
4
+ // Redistribution and use in source and binary forms, with or without
5
+ // modification, are permitted provided that the following conditions are
6
+ // met:
7
+ //
8
+ // * Redistributions of source code must retain the above copyright
9
+ // notice, this list of conditions and the following disclaimer.
10
+ // * Redistributions in binary form must reproduce the above
11
+ // copyright notice, this list of conditions and the following disclaimer
12
+ // in the documentation and/or other materials provided with the
13
+ // distribution.
14
+ // * Neither the name of Google Inc. nor the names of its
15
+ // contributors may be used to endorse or promote products derived from
16
+ // this software without specific prior written permission.
17
+ //
18
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
+ //
30
+ // Author: wan@google.com (Zhanyong Wan)
31
+
32
+ // Google Mock - a framework for writing C++ mock classes.
33
+ //
34
+ // This file tests the function mocker classes.
35
+
36
+ #include "gmock/gmock-generated-function-mockers.h"
37
+
38
+ #if GTEST_OS_WINDOWS
39
+ // MSDN says the header file to be included for STDMETHOD is BaseTyps.h but
40
+ // we are getting compiler errors if we use basetyps.h, hence including
41
+ // objbase.h for definition of STDMETHOD.
42
+ # include <objbase.h>
43
+ #endif // GTEST_OS_WINDOWS
44
+
45
+ #include <map>
46
+ #include <string>
47
+ #include "gmock/gmock.h"
48
+ #include "gtest/gtest.h"
49
+
50
+ // There is a bug in MSVC (fixed in VS 2008) that prevents creating a
51
+ // mock for a function with const arguments, so we don't test such
52
+ // cases for MSVC versions older than 2008.
53
+ #if !GTEST_OS_WINDOWS || (_MSC_VER >= 1500)
54
+ # define GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
55
+ #endif // !GTEST_OS_WINDOWS || (_MSC_VER >= 1500)
56
+
57
+ namespace testing {
58
+ namespace gmock_generated_function_mockers_test {
59
+
60
+ using testing::internal::string;
61
+ using testing::_;
62
+ using testing::A;
63
+ using testing::An;
64
+ using testing::AnyNumber;
65
+ using testing::Const;
66
+ using testing::DoDefault;
67
+ using testing::Eq;
68
+ using testing::Lt;
69
+ using testing::MockFunction;
70
+ using testing::Ref;
71
+ using testing::Return;
72
+ using testing::ReturnRef;
73
+ using testing::TypedEq;
74
+
75
+ class FooInterface {
76
+ public:
77
+ virtual ~FooInterface() {}
78
+
79
+ virtual void VoidReturning(int x) = 0;
80
+
81
+ virtual int Nullary() = 0;
82
+ virtual bool Unary(int x) = 0;
83
+ virtual long Binary(short x, int y) = 0; // NOLINT
84
+ virtual int Decimal(bool b, char c, short d, int e, long f, // NOLINT
85
+ float g, double h, unsigned i, char* j, const string& k)
86
+ = 0;
87
+
88
+ virtual bool TakesNonConstReference(int& n) = 0; // NOLINT
89
+ virtual string TakesConstReference(const int& n) = 0;
90
+ #ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
91
+ virtual bool TakesConst(const int x) = 0;
92
+ #endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
93
+
94
+ virtual int OverloadedOnArgumentNumber() = 0;
95
+ virtual int OverloadedOnArgumentNumber(int n) = 0;
96
+
97
+ virtual int OverloadedOnArgumentType(int n) = 0;
98
+ virtual char OverloadedOnArgumentType(char c) = 0;
99
+
100
+ virtual int OverloadedOnConstness() = 0;
101
+ virtual char OverloadedOnConstness() const = 0;
102
+
103
+ virtual int TypeWithHole(int (*func)()) = 0;
104
+ virtual int TypeWithComma(const std::map<int, string>& a_map) = 0;
105
+
106
+ #if GTEST_OS_WINDOWS
107
+ STDMETHOD_(int, CTNullary)() = 0;
108
+ STDMETHOD_(bool, CTUnary)(int x) = 0;
109
+ STDMETHOD_(int, CTDecimal)(bool b, char c, short d, int e, long f, // NOLINT
110
+ float g, double h, unsigned i, char* j, const string& k) = 0;
111
+ STDMETHOD_(char, CTConst)(int x) const = 0;
112
+ #endif // GTEST_OS_WINDOWS
113
+ };
114
+
115
+ // Const qualifiers on arguments were once (incorrectly) considered
116
+ // significant in determining whether two virtual functions had the same
117
+ // signature. This was fixed in Visual Studio 2008. However, the compiler
118
+ // still emits a warning that alerts about this change in behavior.
119
+ #ifdef _MSC_VER
120
+ # pragma warning(push)
121
+ # pragma warning(disable : 4373)
122
+ #endif
123
+ class MockFoo : public FooInterface {
124
+ public:
125
+ MockFoo() {}
126
+
127
+ // Makes sure that a mock function parameter can be named.
128
+ MOCK_METHOD1(VoidReturning, void(int n)); // NOLINT
129
+
130
+ MOCK_METHOD0(Nullary, int()); // NOLINT
131
+
132
+ // Makes sure that a mock function parameter can be unnamed.
133
+ MOCK_METHOD1(Unary, bool(int)); // NOLINT
134
+ MOCK_METHOD2(Binary, long(short, int)); // NOLINT
135
+ MOCK_METHOD10(Decimal, int(bool, char, short, int, long, float, // NOLINT
136
+ double, unsigned, char*, const string& str));
137
+
138
+ MOCK_METHOD1(TakesNonConstReference, bool(int&)); // NOLINT
139
+ MOCK_METHOD1(TakesConstReference, string(const int&));
140
+
141
+ #ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
142
+ MOCK_METHOD1(TakesConst, bool(const int)); // NOLINT
143
+ #endif
144
+
145
+ // Tests that the function return type can contain unprotected comma.
146
+ MOCK_METHOD0(ReturnTypeWithComma, std::map<int, string>());
147
+ MOCK_CONST_METHOD1(ReturnTypeWithComma,
148
+ std::map<int, string>(int)); // NOLINT
149
+
150
+ MOCK_METHOD0(OverloadedOnArgumentNumber, int()); // NOLINT
151
+ MOCK_METHOD1(OverloadedOnArgumentNumber, int(int)); // NOLINT
152
+
153
+ MOCK_METHOD1(OverloadedOnArgumentType, int(int)); // NOLINT
154
+ MOCK_METHOD1(OverloadedOnArgumentType, char(char)); // NOLINT
155
+
156
+ MOCK_METHOD0(OverloadedOnConstness, int()); // NOLINT
157
+ MOCK_CONST_METHOD0(OverloadedOnConstness, char()); // NOLINT
158
+
159
+ MOCK_METHOD1(TypeWithHole, int(int (*)())); // NOLINT
160
+ MOCK_METHOD1(TypeWithComma, int(const std::map<int, string>&)); // NOLINT
161
+
162
+ #if GTEST_OS_WINDOWS
163
+ MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, CTNullary, int());
164
+ MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, CTUnary, bool(int));
165
+ MOCK_METHOD10_WITH_CALLTYPE(STDMETHODCALLTYPE, CTDecimal, int(bool b, char c,
166
+ short d, int e, long f, float g, double h, unsigned i, char* j,
167
+ const string& k));
168
+ MOCK_CONST_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, CTConst, char(int));
169
+
170
+ // Tests that the function return type can contain unprotected comma.
171
+ MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, CTReturnTypeWithComma,
172
+ std::map<int, string>());
173
+ #endif // GTEST_OS_WINDOWS
174
+
175
+ private:
176
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo);
177
+ };
178
+ #ifdef _MSC_VER
179
+ # pragma warning(pop)
180
+ #endif
181
+
182
+ class FunctionMockerTest : public testing::Test {
183
+ protected:
184
+ FunctionMockerTest() : foo_(&mock_foo_) {}
185
+
186
+ FooInterface* const foo_;
187
+ MockFoo mock_foo_;
188
+ };
189
+
190
+ // Tests mocking a void-returning function.
191
+ TEST_F(FunctionMockerTest, MocksVoidFunction) {
192
+ EXPECT_CALL(mock_foo_, VoidReturning(Lt(100)));
193
+ foo_->VoidReturning(0);
194
+ }
195
+
196
+ // Tests mocking a nullary function.
197
+ TEST_F(FunctionMockerTest, MocksNullaryFunction) {
198
+ EXPECT_CALL(mock_foo_, Nullary())
199
+ .WillOnce(DoDefault())
200
+ .WillOnce(Return(1));
201
+
202
+ EXPECT_EQ(0, foo_->Nullary());
203
+ EXPECT_EQ(1, foo_->Nullary());
204
+ }
205
+
206
+ // Tests mocking a unary function.
207
+ TEST_F(FunctionMockerTest, MocksUnaryFunction) {
208
+ EXPECT_CALL(mock_foo_, Unary(Eq(2)))
209
+ .Times(2)
210
+ .WillOnce(Return(true));
211
+
212
+ EXPECT_TRUE(foo_->Unary(2));
213
+ EXPECT_FALSE(foo_->Unary(2));
214
+ }
215
+
216
+ // Tests mocking a binary function.
217
+ TEST_F(FunctionMockerTest, MocksBinaryFunction) {
218
+ EXPECT_CALL(mock_foo_, Binary(2, _))
219
+ .WillOnce(Return(3));
220
+
221
+ EXPECT_EQ(3, foo_->Binary(2, 1));
222
+ }
223
+
224
+ // Tests mocking a decimal function.
225
+ TEST_F(FunctionMockerTest, MocksDecimalFunction) {
226
+ EXPECT_CALL(mock_foo_, Decimal(true, 'a', 0, 0, 1L, A<float>(),
227
+ Lt(100), 5U, NULL, "hi"))
228
+ .WillOnce(Return(5));
229
+
230
+ EXPECT_EQ(5, foo_->Decimal(true, 'a', 0, 0, 1, 0, 0, 5, NULL, "hi"));
231
+ }
232
+
233
+ // Tests mocking a function that takes a non-const reference.
234
+ TEST_F(FunctionMockerTest, MocksFunctionWithNonConstReferenceArgument) {
235
+ int a = 0;
236
+ EXPECT_CALL(mock_foo_, TakesNonConstReference(Ref(a)))
237
+ .WillOnce(Return(true));
238
+
239
+ EXPECT_TRUE(foo_->TakesNonConstReference(a));
240
+ }
241
+
242
+ // Tests mocking a function that takes a const reference.
243
+ TEST_F(FunctionMockerTest, MocksFunctionWithConstReferenceArgument) {
244
+ int a = 0;
245
+ EXPECT_CALL(mock_foo_, TakesConstReference(Ref(a)))
246
+ .WillOnce(Return("Hello"));
247
+
248
+ EXPECT_EQ("Hello", foo_->TakesConstReference(a));
249
+ }
250
+
251
+ #ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
252
+ // Tests mocking a function that takes a const variable.
253
+ TEST_F(FunctionMockerTest, MocksFunctionWithConstArgument) {
254
+ EXPECT_CALL(mock_foo_, TakesConst(Lt(10)))
255
+ .WillOnce(DoDefault());
256
+
257
+ EXPECT_FALSE(foo_->TakesConst(5));
258
+ }
259
+ #endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
260
+
261
+ // Tests mocking functions overloaded on the number of arguments.
262
+ TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentNumber) {
263
+ EXPECT_CALL(mock_foo_, OverloadedOnArgumentNumber())
264
+ .WillOnce(Return(1));
265
+ EXPECT_CALL(mock_foo_, OverloadedOnArgumentNumber(_))
266
+ .WillOnce(Return(2));
267
+
268
+ EXPECT_EQ(2, foo_->OverloadedOnArgumentNumber(1));
269
+ EXPECT_EQ(1, foo_->OverloadedOnArgumentNumber());
270
+ }
271
+
272
+ // Tests mocking functions overloaded on the types of argument.
273
+ TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentType) {
274
+ EXPECT_CALL(mock_foo_, OverloadedOnArgumentType(An<int>()))
275
+ .WillOnce(Return(1));
276
+ EXPECT_CALL(mock_foo_, OverloadedOnArgumentType(TypedEq<char>('a')))
277
+ .WillOnce(Return('b'));
278
+
279
+ EXPECT_EQ(1, foo_->OverloadedOnArgumentType(0));
280
+ EXPECT_EQ('b', foo_->OverloadedOnArgumentType('a'));
281
+ }
282
+
283
+ // Tests mocking functions overloaded on the const-ness of this object.
284
+ TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnConstnessOfThis) {
285
+ EXPECT_CALL(mock_foo_, OverloadedOnConstness());
286
+ EXPECT_CALL(Const(mock_foo_), OverloadedOnConstness())
287
+ .WillOnce(Return('a'));
288
+
289
+ EXPECT_EQ(0, foo_->OverloadedOnConstness());
290
+ EXPECT_EQ('a', Const(*foo_).OverloadedOnConstness());
291
+ }
292
+
293
+ TEST_F(FunctionMockerTest, MocksReturnTypeWithComma) {
294
+ const std::map<int, string> a_map;
295
+ EXPECT_CALL(mock_foo_, ReturnTypeWithComma())
296
+ .WillOnce(Return(a_map));
297
+ EXPECT_CALL(mock_foo_, ReturnTypeWithComma(42))
298
+ .WillOnce(Return(a_map));
299
+
300
+ EXPECT_EQ(a_map, mock_foo_.ReturnTypeWithComma());
301
+ EXPECT_EQ(a_map, mock_foo_.ReturnTypeWithComma(42));
302
+ }
303
+
304
+ #if GTEST_OS_WINDOWS
305
+ // Tests mocking a nullary function with calltype.
306
+ TEST_F(FunctionMockerTest, MocksNullaryFunctionWithCallType) {
307
+ EXPECT_CALL(mock_foo_, CTNullary())
308
+ .WillOnce(Return(-1))
309
+ .WillOnce(Return(0));
310
+
311
+ EXPECT_EQ(-1, foo_->CTNullary());
312
+ EXPECT_EQ(0, foo_->CTNullary());
313
+ }
314
+
315
+ // Tests mocking a unary function with calltype.
316
+ TEST_F(FunctionMockerTest, MocksUnaryFunctionWithCallType) {
317
+ EXPECT_CALL(mock_foo_, CTUnary(Eq(2)))
318
+ .Times(2)
319
+ .WillOnce(Return(true))
320
+ .WillOnce(Return(false));
321
+
322
+ EXPECT_TRUE(foo_->CTUnary(2));
323
+ EXPECT_FALSE(foo_->CTUnary(2));
324
+ }
325
+
326
+ // Tests mocking a decimal function with calltype.
327
+ TEST_F(FunctionMockerTest, MocksDecimalFunctionWithCallType) {
328
+ EXPECT_CALL(mock_foo_, CTDecimal(true, 'a', 0, 0, 1L, A<float>(),
329
+ Lt(100), 5U, NULL, "hi"))
330
+ .WillOnce(Return(10));
331
+
332
+ EXPECT_EQ(10, foo_->CTDecimal(true, 'a', 0, 0, 1, 0, 0, 5, NULL, "hi"));
333
+ }
334
+
335
+ // Tests mocking functions overloaded on the const-ness of this object.
336
+ TEST_F(FunctionMockerTest, MocksFunctionsConstFunctionWithCallType) {
337
+ EXPECT_CALL(Const(mock_foo_), CTConst(_))
338
+ .WillOnce(Return('a'));
339
+
340
+ EXPECT_EQ('a', Const(*foo_).CTConst(0));
341
+ }
342
+
343
+ TEST_F(FunctionMockerTest, MocksReturnTypeWithCommaAndCallType) {
344
+ const std::map<int, string> a_map;
345
+ EXPECT_CALL(mock_foo_, CTReturnTypeWithComma())
346
+ .WillOnce(Return(a_map));
347
+
348
+ EXPECT_EQ(a_map, mock_foo_.CTReturnTypeWithComma());
349
+ }
350
+
351
+ #endif // GTEST_OS_WINDOWS
352
+
353
+ class MockB {
354
+ public:
355
+ MockB() {}
356
+
357
+ MOCK_METHOD0(DoB, void());
358
+
359
+ private:
360
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(MockB);
361
+ };
362
+
363
+ // Tests that functions with no EXPECT_CALL() ruls can be called any
364
+ // number of times.
365
+ TEST(ExpectCallTest, UnmentionedFunctionCanBeCalledAnyNumberOfTimes) {
366
+ {
367
+ MockB b;
368
+ }
369
+
370
+ {
371
+ MockB b;
372
+ b.DoB();
373
+ }
374
+
375
+ {
376
+ MockB b;
377
+ b.DoB();
378
+ b.DoB();
379
+ }
380
+ }
381
+
382
+ // Tests mocking template interfaces.
383
+
384
+ template <typename T>
385
+ class StackInterface {
386
+ public:
387
+ virtual ~StackInterface() {}
388
+
389
+ // Template parameter appears in function parameter.
390
+ virtual void Push(const T& value) = 0;
391
+ virtual void Pop() = 0;
392
+ virtual int GetSize() const = 0;
393
+ // Template parameter appears in function return type.
394
+ virtual const T& GetTop() const = 0;
395
+ };
396
+
397
+ template <typename T>
398
+ class MockStack : public StackInterface<T> {
399
+ public:
400
+ MockStack() {}
401
+
402
+ MOCK_METHOD1_T(Push, void(const T& elem));
403
+ MOCK_METHOD0_T(Pop, void());
404
+ MOCK_CONST_METHOD0_T(GetSize, int()); // NOLINT
405
+ MOCK_CONST_METHOD0_T(GetTop, const T&());
406
+
407
+ // Tests that the function return type can contain unprotected comma.
408
+ MOCK_METHOD0_T(ReturnTypeWithComma, std::map<int, int>());
409
+ MOCK_CONST_METHOD1_T(ReturnTypeWithComma, std::map<int, int>(int)); // NOLINT
410
+
411
+ private:
412
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(MockStack);
413
+ };
414
+
415
+ // Tests that template mock works.
416
+ TEST(TemplateMockTest, Works) {
417
+ MockStack<int> mock;
418
+
419
+ EXPECT_CALL(mock, GetSize())
420
+ .WillOnce(Return(0))
421
+ .WillOnce(Return(1))
422
+ .WillOnce(Return(0));
423
+ EXPECT_CALL(mock, Push(_));
424
+ int n = 5;
425
+ EXPECT_CALL(mock, GetTop())
426
+ .WillOnce(ReturnRef(n));
427
+ EXPECT_CALL(mock, Pop())
428
+ .Times(AnyNumber());
429
+
430
+ EXPECT_EQ(0, mock.GetSize());
431
+ mock.Push(5);
432
+ EXPECT_EQ(1, mock.GetSize());
433
+ EXPECT_EQ(5, mock.GetTop());
434
+ mock.Pop();
435
+ EXPECT_EQ(0, mock.GetSize());
436
+ }
437
+
438
+ TEST(TemplateMockTest, MethodWithCommaInReturnTypeWorks) {
439
+ MockStack<int> mock;
440
+
441
+ const std::map<int, int> a_map;
442
+ EXPECT_CALL(mock, ReturnTypeWithComma())
443
+ .WillOnce(Return(a_map));
444
+ EXPECT_CALL(mock, ReturnTypeWithComma(1))
445
+ .WillOnce(Return(a_map));
446
+
447
+ EXPECT_EQ(a_map, mock.ReturnTypeWithComma());
448
+ EXPECT_EQ(a_map, mock.ReturnTypeWithComma(1));
449
+ }
450
+
451
+ #if GTEST_OS_WINDOWS
452
+ // Tests mocking template interfaces with calltype.
453
+
454
+ template <typename T>
455
+ class StackInterfaceWithCallType {
456
+ public:
457
+ virtual ~StackInterfaceWithCallType() {}
458
+
459
+ // Template parameter appears in function parameter.
460
+ STDMETHOD_(void, Push)(const T& value) = 0;
461
+ STDMETHOD_(void, Pop)() = 0;
462
+ STDMETHOD_(int, GetSize)() const = 0;
463
+ // Template parameter appears in function return type.
464
+ STDMETHOD_(const T&, GetTop)() const = 0;
465
+ };
466
+
467
+ template <typename T>
468
+ class MockStackWithCallType : public StackInterfaceWithCallType<T> {
469
+ public:
470
+ MockStackWithCallType() {}
471
+
472
+ MOCK_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Push, void(const T& elem));
473
+ MOCK_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Pop, void());
474
+ MOCK_CONST_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, GetSize, int());
475
+ MOCK_CONST_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, GetTop, const T&());
476
+
477
+ private:
478
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(MockStackWithCallType);
479
+ };
480
+
481
+ // Tests that template mock with calltype works.
482
+ TEST(TemplateMockTestWithCallType, Works) {
483
+ MockStackWithCallType<int> mock;
484
+
485
+ EXPECT_CALL(mock, GetSize())
486
+ .WillOnce(Return(0))
487
+ .WillOnce(Return(1))
488
+ .WillOnce(Return(0));
489
+ EXPECT_CALL(mock, Push(_));
490
+ int n = 5;
491
+ EXPECT_CALL(mock, GetTop())
492
+ .WillOnce(ReturnRef(n));
493
+ EXPECT_CALL(mock, Pop())
494
+ .Times(AnyNumber());
495
+
496
+ EXPECT_EQ(0, mock.GetSize());
497
+ mock.Push(5);
498
+ EXPECT_EQ(1, mock.GetSize());
499
+ EXPECT_EQ(5, mock.GetTop());
500
+ mock.Pop();
501
+ EXPECT_EQ(0, mock.GetSize());
502
+ }
503
+ #endif // GTEST_OS_WINDOWS
504
+
505
+ #define MY_MOCK_METHODS1_ \
506
+ MOCK_METHOD0(Overloaded, void()); \
507
+ MOCK_CONST_METHOD1(Overloaded, int(int n)); \
508
+ MOCK_METHOD2(Overloaded, bool(bool f, int n))
509
+
510
+ class MockOverloadedOnArgNumber {
511
+ public:
512
+ MockOverloadedOnArgNumber() {}
513
+
514
+ MY_MOCK_METHODS1_;
515
+
516
+ private:
517
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(MockOverloadedOnArgNumber);
518
+ };
519
+
520
+ TEST(OverloadedMockMethodTest, CanOverloadOnArgNumberInMacroBody) {
521
+ MockOverloadedOnArgNumber mock;
522
+ EXPECT_CALL(mock, Overloaded());
523
+ EXPECT_CALL(mock, Overloaded(1)).WillOnce(Return(2));
524
+ EXPECT_CALL(mock, Overloaded(true, 1)).WillOnce(Return(true));
525
+
526
+ mock.Overloaded();
527
+ EXPECT_EQ(2, mock.Overloaded(1));
528
+ EXPECT_TRUE(mock.Overloaded(true, 1));
529
+ }
530
+
531
+ #define MY_MOCK_METHODS2_ \
532
+ MOCK_CONST_METHOD1(Overloaded, int(int n)); \
533
+ MOCK_METHOD1(Overloaded, int(int n));
534
+
535
+ class MockOverloadedOnConstness {
536
+ public:
537
+ MockOverloadedOnConstness() {}
538
+
539
+ MY_MOCK_METHODS2_;
540
+
541
+ private:
542
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(MockOverloadedOnConstness);
543
+ };
544
+
545
+ TEST(OverloadedMockMethodTest, CanOverloadOnConstnessInMacroBody) {
546
+ MockOverloadedOnConstness mock;
547
+ const MockOverloadedOnConstness* const_mock = &mock;
548
+ EXPECT_CALL(mock, Overloaded(1)).WillOnce(Return(2));
549
+ EXPECT_CALL(*const_mock, Overloaded(1)).WillOnce(Return(3));
550
+
551
+ EXPECT_EQ(2, mock.Overloaded(1));
552
+ EXPECT_EQ(3, const_mock->Overloaded(1));
553
+ }
554
+
555
+ TEST(MockFunctionTest, WorksForVoidNullary) {
556
+ MockFunction<void()> foo;
557
+ EXPECT_CALL(foo, Call());
558
+ foo.Call();
559
+ }
560
+
561
+ TEST(MockFunctionTest, WorksForNonVoidNullary) {
562
+ MockFunction<int()> foo;
563
+ EXPECT_CALL(foo, Call())
564
+ .WillOnce(Return(1))
565
+ .WillOnce(Return(2));
566
+ EXPECT_EQ(1, foo.Call());
567
+ EXPECT_EQ(2, foo.Call());
568
+ }
569
+
570
+ TEST(MockFunctionTest, WorksForVoidUnary) {
571
+ MockFunction<void(int)> foo;
572
+ EXPECT_CALL(foo, Call(1));
573
+ foo.Call(1);
574
+ }
575
+
576
+ TEST(MockFunctionTest, WorksForNonVoidBinary) {
577
+ MockFunction<int(bool, int)> foo;
578
+ EXPECT_CALL(foo, Call(false, 42))
579
+ .WillOnce(Return(1))
580
+ .WillOnce(Return(2));
581
+ EXPECT_CALL(foo, Call(true, Ge(100)))
582
+ .WillOnce(Return(3));
583
+ EXPECT_EQ(1, foo.Call(false, 42));
584
+ EXPECT_EQ(2, foo.Call(false, 42));
585
+ EXPECT_EQ(3, foo.Call(true, 120));
586
+ }
587
+
588
+ TEST(MockFunctionTest, WorksFor10Arguments) {
589
+ MockFunction<int(bool a0, char a1, int a2, int a3, int a4,
590
+ int a5, int a6, char a7, int a8, bool a9)> foo;
591
+ EXPECT_CALL(foo, Call(_, 'a', _, _, _, _, _, _, _, _))
592
+ .WillOnce(Return(1))
593
+ .WillOnce(Return(2));
594
+ EXPECT_EQ(1, foo.Call(false, 'a', 0, 0, 0, 0, 0, 'b', 0, true));
595
+ EXPECT_EQ(2, foo.Call(true, 'a', 0, 0, 0, 0, 0, 'b', 1, false));
596
+ }
597
+
598
+ #if GTEST_HAS_STD_FUNCTION_
599
+ TEST(MockFunctionTest, AsStdFunction) {
600
+ MockFunction<int(int)> foo;
601
+ auto call = [](const std::function<int(int)> &f, int i) {
602
+ return f(i);
603
+ };
604
+ EXPECT_CALL(foo, Call(1)).WillOnce(Return(-1));
605
+ EXPECT_CALL(foo, Call(2)).WillOnce(Return(-2));
606
+ EXPECT_EQ(-1, call(foo.AsStdFunction(), 1));
607
+ EXPECT_EQ(-2, call(foo.AsStdFunction(), 2));
608
+ }
609
+
610
+ TEST(MockFunctionTest, AsStdFunctionReturnsReference) {
611
+ MockFunction<int&()> foo;
612
+ int value = 1;
613
+ EXPECT_CALL(foo, Call()).WillOnce(ReturnRef(value));
614
+ int& ref = foo.AsStdFunction()();
615
+ EXPECT_EQ(1, ref);
616
+ value = 2;
617
+ EXPECT_EQ(2, ref);
618
+ }
619
+ #endif // GTEST_HAS_STD_FUNCTION_
620
+
621
+ } // namespace gmock_generated_function_mockers_test
622
+ } // namespace testing