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,136 @@
1
+ $$ -*- mode: c++; -*-
2
+ $$ This is a Pump source file. Please use Pump to convert it to
3
+ $$ gmock-generated-function-mockers.h.
4
+ $$
5
+ $var n = 10 $$ The maximum arity we support.
6
+ // Copyright 2007, Google Inc.
7
+ // All rights reserved.
8
+ //
9
+ // Redistribution and use in source and binary forms, with or without
10
+ // modification, are permitted provided that the following conditions are
11
+ // met:
12
+ //
13
+ // * Redistributions of source code must retain the above copyright
14
+ // notice, this list of conditions and the following disclaimer.
15
+ // * Redistributions in binary form must reproduce the above
16
+ // copyright notice, this list of conditions and the following disclaimer
17
+ // in the documentation and/or other materials provided with the
18
+ // distribution.
19
+ // * Neither the name of Google Inc. nor the names of its
20
+ // contributors may be used to endorse or promote products derived from
21
+ // this software without specific prior written permission.
22
+ //
23
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ //
35
+ // Author: wan@google.com (Zhanyong Wan)
36
+
37
+ // Google Mock - a framework for writing C++ mock classes.
38
+ //
39
+ // This file contains template meta-programming utility classes needed
40
+ // for implementing Google Mock.
41
+
42
+ #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
43
+ #define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
44
+
45
+ #include "gmock/internal/gmock-port.h"
46
+
47
+ namespace testing {
48
+
49
+ template <typename T>
50
+ class Matcher;
51
+
52
+ namespace internal {
53
+
54
+ // An IgnoredValue object can be implicitly constructed from ANY value.
55
+ // This is used in implementing the IgnoreResult(a) action.
56
+ class IgnoredValue {
57
+ public:
58
+ // This constructor template allows any value to be implicitly
59
+ // converted to IgnoredValue. The object has no data member and
60
+ // doesn't try to remember anything about the argument. We
61
+ // deliberately omit the 'explicit' keyword in order to allow the
62
+ // conversion to be implicit.
63
+ template <typename T>
64
+ IgnoredValue(const T& /* ignored */) {} // NOLINT(runtime/explicit)
65
+ };
66
+
67
+ // MatcherTuple<T>::type is a tuple type where each field is a Matcher
68
+ // for the corresponding field in tuple type T.
69
+ template <typename Tuple>
70
+ struct MatcherTuple;
71
+
72
+
73
+ $range i 0..n
74
+ $for i [[
75
+ $range j 1..i
76
+ $var typename_As = [[$for j, [[typename A$j]]]]
77
+ $var As = [[$for j, [[A$j]]]]
78
+ $var matcher_As = [[$for j, [[Matcher<A$j>]]]]
79
+ template <$typename_As>
80
+ struct MatcherTuple< ::testing::tuple<$As> > {
81
+ typedef ::testing::tuple<$matcher_As > type;
82
+ };
83
+
84
+
85
+ ]]
86
+ // Template struct Function<F>, where F must be a function type, contains
87
+ // the following typedefs:
88
+ //
89
+ // Result: the function's return type.
90
+ // ArgumentN: the type of the N-th argument, where N starts with 1.
91
+ // ArgumentTuple: the tuple type consisting of all parameters of F.
92
+ // ArgumentMatcherTuple: the tuple type consisting of Matchers for all
93
+ // parameters of F.
94
+ // MakeResultVoid: the function type obtained by substituting void
95
+ // for the return type of F.
96
+ // MakeResultIgnoredValue:
97
+ // the function type obtained by substituting Something
98
+ // for the return type of F.
99
+ template <typename F>
100
+ struct Function;
101
+
102
+ template <typename R>
103
+ struct Function<R()> {
104
+ typedef R Result;
105
+ typedef ::testing::tuple<> ArgumentTuple;
106
+ typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
107
+ typedef void MakeResultVoid();
108
+ typedef IgnoredValue MakeResultIgnoredValue();
109
+ };
110
+
111
+
112
+ $range i 1..n
113
+ $for i [[
114
+ $range j 1..i
115
+ $var typename_As = [[$for j [[, typename A$j]]]]
116
+ $var As = [[$for j, [[A$j]]]]
117
+ $var matcher_As = [[$for j, [[Matcher<A$j>]]]]
118
+ $range k 1..i-1
119
+ $var prev_As = [[$for k, [[A$k]]]]
120
+ template <typename R$typename_As>
121
+ struct Function<R($As)>
122
+ : Function<R($prev_As)> {
123
+ typedef A$i Argument$i;
124
+ typedef ::testing::tuple<$As> ArgumentTuple;
125
+ typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
126
+ typedef void MakeResultVoid($As);
127
+ typedef IgnoredValue MakeResultIgnoredValue($As);
128
+ };
129
+
130
+
131
+ ]]
132
+ } // namespace internal
133
+
134
+ } // namespace testing
135
+
136
+ #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
@@ -0,0 +1,511 @@
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 defines some utilities useful for implementing Google
35
+ // Mock. They are subject to change without notice, so please DO NOT
36
+ // USE THEM IN USER CODE.
37
+
38
+ #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
39
+ #define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
40
+
41
+ #include <stdio.h>
42
+ #include <ostream> // NOLINT
43
+ #include <string>
44
+
45
+ #include "gmock/internal/gmock-generated-internal-utils.h"
46
+ #include "gmock/internal/gmock-port.h"
47
+ #include "gtest/gtest.h"
48
+
49
+ namespace testing {
50
+ namespace internal {
51
+
52
+ // Converts an identifier name to a space-separated list of lower-case
53
+ // words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is
54
+ // treated as one word. For example, both "FooBar123" and
55
+ // "foo_bar_123" are converted to "foo bar 123".
56
+ GTEST_API_ string ConvertIdentifierNameToWords(const char* id_name);
57
+
58
+ // PointeeOf<Pointer>::type is the type of a value pointed to by a
59
+ // Pointer, which can be either a smart pointer or a raw pointer. The
60
+ // following default implementation is for the case where Pointer is a
61
+ // smart pointer.
62
+ template <typename Pointer>
63
+ struct PointeeOf {
64
+ // Smart pointer classes define type element_type as the type of
65
+ // their pointees.
66
+ typedef typename Pointer::element_type type;
67
+ };
68
+ // This specialization is for the raw pointer case.
69
+ template <typename T>
70
+ struct PointeeOf<T*> { typedef T type; }; // NOLINT
71
+
72
+ // GetRawPointer(p) returns the raw pointer underlying p when p is a
73
+ // smart pointer, or returns p itself when p is already a raw pointer.
74
+ // The following default implementation is for the smart pointer case.
75
+ template <typename Pointer>
76
+ inline const typename Pointer::element_type* GetRawPointer(const Pointer& p) {
77
+ return p.get();
78
+ }
79
+ // This overloaded version is for the raw pointer case.
80
+ template <typename Element>
81
+ inline Element* GetRawPointer(Element* p) { return p; }
82
+
83
+ // This comparator allows linked_ptr to be stored in sets.
84
+ template <typename T>
85
+ struct LinkedPtrLessThan {
86
+ bool operator()(const ::testing::internal::linked_ptr<T>& lhs,
87
+ const ::testing::internal::linked_ptr<T>& rhs) const {
88
+ return lhs.get() < rhs.get();
89
+ }
90
+ };
91
+
92
+ // Symbian compilation can be done with wchar_t being either a native
93
+ // type or a typedef. Using Google Mock with OpenC without wchar_t
94
+ // should require the definition of _STLP_NO_WCHAR_T.
95
+ //
96
+ // MSVC treats wchar_t as a native type usually, but treats it as the
97
+ // same as unsigned short when the compiler option /Zc:wchar_t- is
98
+ // specified. It defines _NATIVE_WCHAR_T_DEFINED symbol when wchar_t
99
+ // is a native type.
100
+ #if (GTEST_OS_SYMBIAN && defined(_STLP_NO_WCHAR_T)) || \
101
+ (defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED))
102
+ // wchar_t is a typedef.
103
+ #else
104
+ # define GMOCK_WCHAR_T_IS_NATIVE_ 1
105
+ #endif
106
+
107
+ // signed wchar_t and unsigned wchar_t are NOT in the C++ standard.
108
+ // Using them is a bad practice and not portable. So DON'T use them.
109
+ //
110
+ // Still, Google Mock is designed to work even if the user uses signed
111
+ // wchar_t or unsigned wchar_t (obviously, assuming the compiler
112
+ // supports them).
113
+ //
114
+ // To gcc,
115
+ // wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
116
+ #ifdef __GNUC__
117
+ // signed/unsigned wchar_t are valid types.
118
+ # define GMOCK_HAS_SIGNED_WCHAR_T_ 1
119
+ #endif
120
+
121
+ // In what follows, we use the term "kind" to indicate whether a type
122
+ // is bool, an integer type (excluding bool), a floating-point type,
123
+ // or none of them. This categorization is useful for determining
124
+ // when a matcher argument type can be safely converted to another
125
+ // type in the implementation of SafeMatcherCast.
126
+ enum TypeKind {
127
+ kBool, kInteger, kFloatingPoint, kOther
128
+ };
129
+
130
+ // KindOf<T>::value is the kind of type T.
131
+ template <typename T> struct KindOf {
132
+ enum { value = kOther }; // The default kind.
133
+ };
134
+
135
+ // This macro declares that the kind of 'type' is 'kind'.
136
+ #define GMOCK_DECLARE_KIND_(type, kind) \
137
+ template <> struct KindOf<type> { enum { value = kind }; }
138
+
139
+ GMOCK_DECLARE_KIND_(bool, kBool);
140
+
141
+ // All standard integer types.
142
+ GMOCK_DECLARE_KIND_(char, kInteger);
143
+ GMOCK_DECLARE_KIND_(signed char, kInteger);
144
+ GMOCK_DECLARE_KIND_(unsigned char, kInteger);
145
+ GMOCK_DECLARE_KIND_(short, kInteger); // NOLINT
146
+ GMOCK_DECLARE_KIND_(unsigned short, kInteger); // NOLINT
147
+ GMOCK_DECLARE_KIND_(int, kInteger);
148
+ GMOCK_DECLARE_KIND_(unsigned int, kInteger);
149
+ GMOCK_DECLARE_KIND_(long, kInteger); // NOLINT
150
+ GMOCK_DECLARE_KIND_(unsigned long, kInteger); // NOLINT
151
+
152
+ #if GMOCK_WCHAR_T_IS_NATIVE_
153
+ GMOCK_DECLARE_KIND_(wchar_t, kInteger);
154
+ #endif
155
+
156
+ // Non-standard integer types.
157
+ GMOCK_DECLARE_KIND_(Int64, kInteger);
158
+ GMOCK_DECLARE_KIND_(UInt64, kInteger);
159
+
160
+ // All standard floating-point types.
161
+ GMOCK_DECLARE_KIND_(float, kFloatingPoint);
162
+ GMOCK_DECLARE_KIND_(double, kFloatingPoint);
163
+ GMOCK_DECLARE_KIND_(long double, kFloatingPoint);
164
+
165
+ #undef GMOCK_DECLARE_KIND_
166
+
167
+ // Evaluates to the kind of 'type'.
168
+ #define GMOCK_KIND_OF_(type) \
169
+ static_cast< ::testing::internal::TypeKind>( \
170
+ ::testing::internal::KindOf<type>::value)
171
+
172
+ // Evaluates to true iff integer type T is signed.
173
+ #define GMOCK_IS_SIGNED_(T) (static_cast<T>(-1) < 0)
174
+
175
+ // LosslessArithmeticConvertibleImpl<kFromKind, From, kToKind, To>::value
176
+ // is true iff arithmetic type From can be losslessly converted to
177
+ // arithmetic type To.
178
+ //
179
+ // It's the user's responsibility to ensure that both From and To are
180
+ // raw (i.e. has no CV modifier, is not a pointer, and is not a
181
+ // reference) built-in arithmetic types, kFromKind is the kind of
182
+ // From, and kToKind is the kind of To; the value is
183
+ // implementation-defined when the above pre-condition is violated.
184
+ template <TypeKind kFromKind, typename From, TypeKind kToKind, typename To>
185
+ struct LosslessArithmeticConvertibleImpl : public false_type {};
186
+
187
+ // Converting bool to bool is lossless.
188
+ template <>
189
+ struct LosslessArithmeticConvertibleImpl<kBool, bool, kBool, bool>
190
+ : public true_type {}; // NOLINT
191
+
192
+ // Converting bool to any integer type is lossless.
193
+ template <typename To>
194
+ struct LosslessArithmeticConvertibleImpl<kBool, bool, kInteger, To>
195
+ : public true_type {}; // NOLINT
196
+
197
+ // Converting bool to any floating-point type is lossless.
198
+ template <typename To>
199
+ struct LosslessArithmeticConvertibleImpl<kBool, bool, kFloatingPoint, To>
200
+ : public true_type {}; // NOLINT
201
+
202
+ // Converting an integer to bool is lossy.
203
+ template <typename From>
204
+ struct LosslessArithmeticConvertibleImpl<kInteger, From, kBool, bool>
205
+ : public false_type {}; // NOLINT
206
+
207
+ // Converting an integer to another non-bool integer is lossless iff
208
+ // the target type's range encloses the source type's range.
209
+ template <typename From, typename To>
210
+ struct LosslessArithmeticConvertibleImpl<kInteger, From, kInteger, To>
211
+ : public bool_constant<
212
+ // When converting from a smaller size to a larger size, we are
213
+ // fine as long as we are not converting from signed to unsigned.
214
+ ((sizeof(From) < sizeof(To)) &&
215
+ (!GMOCK_IS_SIGNED_(From) || GMOCK_IS_SIGNED_(To))) ||
216
+ // When converting between the same size, the signedness must match.
217
+ ((sizeof(From) == sizeof(To)) &&
218
+ (GMOCK_IS_SIGNED_(From) == GMOCK_IS_SIGNED_(To)))> {}; // NOLINT
219
+
220
+ #undef GMOCK_IS_SIGNED_
221
+
222
+ // Converting an integer to a floating-point type may be lossy, since
223
+ // the format of a floating-point number is implementation-defined.
224
+ template <typename From, typename To>
225
+ struct LosslessArithmeticConvertibleImpl<kInteger, From, kFloatingPoint, To>
226
+ : public false_type {}; // NOLINT
227
+
228
+ // Converting a floating-point to bool is lossy.
229
+ template <typename From>
230
+ struct LosslessArithmeticConvertibleImpl<kFloatingPoint, From, kBool, bool>
231
+ : public false_type {}; // NOLINT
232
+
233
+ // Converting a floating-point to an integer is lossy.
234
+ template <typename From, typename To>
235
+ struct LosslessArithmeticConvertibleImpl<kFloatingPoint, From, kInteger, To>
236
+ : public false_type {}; // NOLINT
237
+
238
+ // Converting a floating-point to another floating-point is lossless
239
+ // iff the target type is at least as big as the source type.
240
+ template <typename From, typename To>
241
+ struct LosslessArithmeticConvertibleImpl<
242
+ kFloatingPoint, From, kFloatingPoint, To>
243
+ : public bool_constant<sizeof(From) <= sizeof(To)> {}; // NOLINT
244
+
245
+ // LosslessArithmeticConvertible<From, To>::value is true iff arithmetic
246
+ // type From can be losslessly converted to arithmetic type To.
247
+ //
248
+ // It's the user's responsibility to ensure that both From and To are
249
+ // raw (i.e. has no CV modifier, is not a pointer, and is not a
250
+ // reference) built-in arithmetic types; the value is
251
+ // implementation-defined when the above pre-condition is violated.
252
+ template <typename From, typename To>
253
+ struct LosslessArithmeticConvertible
254
+ : public LosslessArithmeticConvertibleImpl<
255
+ GMOCK_KIND_OF_(From), From, GMOCK_KIND_OF_(To), To> {}; // NOLINT
256
+
257
+ // This interface knows how to report a Google Mock failure (either
258
+ // non-fatal or fatal).
259
+ class FailureReporterInterface {
260
+ public:
261
+ // The type of a failure (either non-fatal or fatal).
262
+ enum FailureType {
263
+ kNonfatal, kFatal
264
+ };
265
+
266
+ virtual ~FailureReporterInterface() {}
267
+
268
+ // Reports a failure that occurred at the given source file location.
269
+ virtual void ReportFailure(FailureType type, const char* file, int line,
270
+ const string& message) = 0;
271
+ };
272
+
273
+ // Returns the failure reporter used by Google Mock.
274
+ GTEST_API_ FailureReporterInterface* GetFailureReporter();
275
+
276
+ // Asserts that condition is true; aborts the process with the given
277
+ // message if condition is false. We cannot use LOG(FATAL) or CHECK()
278
+ // as Google Mock might be used to mock the log sink itself. We
279
+ // inline this function to prevent it from showing up in the stack
280
+ // trace.
281
+ inline void Assert(bool condition, const char* file, int line,
282
+ const string& msg) {
283
+ if (!condition) {
284
+ GetFailureReporter()->ReportFailure(FailureReporterInterface::kFatal,
285
+ file, line, msg);
286
+ }
287
+ }
288
+ inline void Assert(bool condition, const char* file, int line) {
289
+ Assert(condition, file, line, "Assertion failed.");
290
+ }
291
+
292
+ // Verifies that condition is true; generates a non-fatal failure if
293
+ // condition is false.
294
+ inline void Expect(bool condition, const char* file, int line,
295
+ const string& msg) {
296
+ if (!condition) {
297
+ GetFailureReporter()->ReportFailure(FailureReporterInterface::kNonfatal,
298
+ file, line, msg);
299
+ }
300
+ }
301
+ inline void Expect(bool condition, const char* file, int line) {
302
+ Expect(condition, file, line, "Expectation failed.");
303
+ }
304
+
305
+ // Severity level of a log.
306
+ enum LogSeverity {
307
+ kInfo = 0,
308
+ kWarning = 1
309
+ };
310
+
311
+ // Valid values for the --gmock_verbose flag.
312
+
313
+ // All logs (informational and warnings) are printed.
314
+ const char kInfoVerbosity[] = "info";
315
+ // Only warnings are printed.
316
+ const char kWarningVerbosity[] = "warning";
317
+ // No logs are printed.
318
+ const char kErrorVerbosity[] = "error";
319
+
320
+ // Returns true iff a log with the given severity is visible according
321
+ // to the --gmock_verbose flag.
322
+ GTEST_API_ bool LogIsVisible(LogSeverity severity);
323
+
324
+ // Prints the given message to stdout iff 'severity' >= the level
325
+ // specified by the --gmock_verbose flag. If stack_frames_to_skip >=
326
+ // 0, also prints the stack trace excluding the top
327
+ // stack_frames_to_skip frames. In opt mode, any positive
328
+ // stack_frames_to_skip is treated as 0, since we don't know which
329
+ // function calls will be inlined by the compiler and need to be
330
+ // conservative.
331
+ GTEST_API_ void Log(LogSeverity severity,
332
+ const string& message,
333
+ int stack_frames_to_skip);
334
+
335
+ // TODO(wan@google.com): group all type utilities together.
336
+
337
+ // Type traits.
338
+
339
+ // is_reference<T>::value is non-zero iff T is a reference type.
340
+ template <typename T> struct is_reference : public false_type {};
341
+ template <typename T> struct is_reference<T&> : public true_type {};
342
+
343
+ // type_equals<T1, T2>::value is non-zero iff T1 and T2 are the same type.
344
+ template <typename T1, typename T2> struct type_equals : public false_type {};
345
+ template <typename T> struct type_equals<T, T> : public true_type {};
346
+
347
+ // remove_reference<T>::type removes the reference from type T, if any.
348
+ template <typename T> struct remove_reference { typedef T type; }; // NOLINT
349
+ template <typename T> struct remove_reference<T&> { typedef T type; }; // NOLINT
350
+
351
+ // DecayArray<T>::type turns an array type U[N] to const U* and preserves
352
+ // other types. Useful for saving a copy of a function argument.
353
+ template <typename T> struct DecayArray { typedef T type; }; // NOLINT
354
+ template <typename T, size_t N> struct DecayArray<T[N]> {
355
+ typedef const T* type;
356
+ };
357
+ // Sometimes people use arrays whose size is not available at the use site
358
+ // (e.g. extern const char kNamePrefix[]). This specialization covers that
359
+ // case.
360
+ template <typename T> struct DecayArray<T[]> {
361
+ typedef const T* type;
362
+ };
363
+
364
+ // Disable MSVC warnings for infinite recursion, since in this case the
365
+ // the recursion is unreachable.
366
+ #ifdef _MSC_VER
367
+ # pragma warning(push)
368
+ # pragma warning(disable:4717)
369
+ #endif
370
+
371
+ // Invalid<T>() is usable as an expression of type T, but will terminate
372
+ // the program with an assertion failure if actually run. This is useful
373
+ // when a value of type T is needed for compilation, but the statement
374
+ // will not really be executed (or we don't care if the statement
375
+ // crashes).
376
+ template <typename T>
377
+ inline T Invalid() {
378
+ Assert(false, "", -1, "Internal error: attempt to return invalid value");
379
+ // This statement is unreachable, and would never terminate even if it
380
+ // could be reached. It is provided only to placate compiler warnings
381
+ // about missing return statements.
382
+ return Invalid<T>();
383
+ }
384
+
385
+ #ifdef _MSC_VER
386
+ # pragma warning(pop)
387
+ #endif
388
+
389
+ // Given a raw type (i.e. having no top-level reference or const
390
+ // modifier) RawContainer that's either an STL-style container or a
391
+ // native array, class StlContainerView<RawContainer> has the
392
+ // following members:
393
+ //
394
+ // - type is a type that provides an STL-style container view to
395
+ // (i.e. implements the STL container concept for) RawContainer;
396
+ // - const_reference is a type that provides a reference to a const
397
+ // RawContainer;
398
+ // - ConstReference(raw_container) returns a const reference to an STL-style
399
+ // container view to raw_container, which is a RawContainer.
400
+ // - Copy(raw_container) returns an STL-style container view of a
401
+ // copy of raw_container, which is a RawContainer.
402
+ //
403
+ // This generic version is used when RawContainer itself is already an
404
+ // STL-style container.
405
+ template <class RawContainer>
406
+ class StlContainerView {
407
+ public:
408
+ typedef RawContainer type;
409
+ typedef const type& const_reference;
410
+
411
+ static const_reference ConstReference(const RawContainer& container) {
412
+ // Ensures that RawContainer is not a const type.
413
+ testing::StaticAssertTypeEq<RawContainer,
414
+ GTEST_REMOVE_CONST_(RawContainer)>();
415
+ return container;
416
+ }
417
+ static type Copy(const RawContainer& container) { return container; }
418
+ };
419
+
420
+ // This specialization is used when RawContainer is a native array type.
421
+ template <typename Element, size_t N>
422
+ class StlContainerView<Element[N]> {
423
+ public:
424
+ typedef GTEST_REMOVE_CONST_(Element) RawElement;
425
+ typedef internal::NativeArray<RawElement> type;
426
+ // NativeArray<T> can represent a native array either by value or by
427
+ // reference (selected by a constructor argument), so 'const type'
428
+ // can be used to reference a const native array. We cannot
429
+ // 'typedef const type& const_reference' here, as that would mean
430
+ // ConstReference() has to return a reference to a local variable.
431
+ typedef const type const_reference;
432
+
433
+ static const_reference ConstReference(const Element (&array)[N]) {
434
+ // Ensures that Element is not a const type.
435
+ testing::StaticAssertTypeEq<Element, RawElement>();
436
+ #if GTEST_OS_SYMBIAN
437
+ // The Nokia Symbian compiler confuses itself in template instantiation
438
+ // for this call without the cast to Element*:
439
+ // function call '[testing::internal::NativeArray<char *>].NativeArray(
440
+ // {lval} const char *[4], long, testing::internal::RelationToSource)'
441
+ // does not match
442
+ // 'testing::internal::NativeArray<char *>::NativeArray(
443
+ // char *const *, unsigned int, testing::internal::RelationToSource)'
444
+ // (instantiating: 'testing::internal::ContainsMatcherImpl
445
+ // <const char * (&)[4]>::Matches(const char * (&)[4]) const')
446
+ // (instantiating: 'testing::internal::StlContainerView<char *[4]>::
447
+ // ConstReference(const char * (&)[4])')
448
+ // (and though the N parameter type is mismatched in the above explicit
449
+ // conversion of it doesn't help - only the conversion of the array).
450
+ return type(const_cast<Element*>(&array[0]), N,
451
+ RelationToSourceReference());
452
+ #else
453
+ return type(array, N, RelationToSourceReference());
454
+ #endif // GTEST_OS_SYMBIAN
455
+ }
456
+ static type Copy(const Element (&array)[N]) {
457
+ #if GTEST_OS_SYMBIAN
458
+ return type(const_cast<Element*>(&array[0]), N, RelationToSourceCopy());
459
+ #else
460
+ return type(array, N, RelationToSourceCopy());
461
+ #endif // GTEST_OS_SYMBIAN
462
+ }
463
+ };
464
+
465
+ // This specialization is used when RawContainer is a native array
466
+ // represented as a (pointer, size) tuple.
467
+ template <typename ElementPointer, typename Size>
468
+ class StlContainerView< ::testing::tuple<ElementPointer, Size> > {
469
+ public:
470
+ typedef GTEST_REMOVE_CONST_(
471
+ typename internal::PointeeOf<ElementPointer>::type) RawElement;
472
+ typedef internal::NativeArray<RawElement> type;
473
+ typedef const type const_reference;
474
+
475
+ static const_reference ConstReference(
476
+ const ::testing::tuple<ElementPointer, Size>& array) {
477
+ return type(get<0>(array), get<1>(array), RelationToSourceReference());
478
+ }
479
+ static type Copy(const ::testing::tuple<ElementPointer, Size>& array) {
480
+ return type(get<0>(array), get<1>(array), RelationToSourceCopy());
481
+ }
482
+ };
483
+
484
+ // The following specialization prevents the user from instantiating
485
+ // StlContainer with a reference type.
486
+ template <typename T> class StlContainerView<T&>;
487
+
488
+ // A type transform to remove constness from the first part of a pair.
489
+ // Pairs like that are used as the value_type of associative containers,
490
+ // and this transform produces a similar but assignable pair.
491
+ template <typename T>
492
+ struct RemoveConstFromKey {
493
+ typedef T type;
494
+ };
495
+
496
+ // Partially specialized to remove constness from std::pair<const K, V>.
497
+ template <typename K, typename V>
498
+ struct RemoveConstFromKey<std::pair<const K, V> > {
499
+ typedef std::pair<K, V> type;
500
+ };
501
+
502
+ // Mapping from booleans to types. Similar to boost::bool_<kValue> and
503
+ // std::integral_constant<bool, kValue>.
504
+ template <bool kValue>
505
+ struct BooleanConstant {};
506
+
507
+ } // namespace internal
508
+ } // namespace testing
509
+
510
+ #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
511
+