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,130 @@
1
+ #!/usr/bin/env python
2
+ #
3
+ # Copyright 2008, Google Inc.
4
+ # All rights reserved.
5
+ #
6
+ # Redistribution and use in source and binary forms, with or without
7
+ # modification, are permitted provided that the following conditions are
8
+ # met:
9
+ #
10
+ # * Redistributions of source code must retain the above copyright
11
+ # notice, this list of conditions and the following disclaimer.
12
+ # * Redistributions in binary form must reproduce the above
13
+ # copyright notice, this list of conditions and the following disclaimer
14
+ # in the documentation and/or other materials provided with the
15
+ # distribution.
16
+ # * Neither the name of Google Inc. nor the names of its
17
+ # contributors may be used to endorse or promote products derived from
18
+ # this software without specific prior written permission.
19
+ #
20
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+
32
+ """Verifies that Google Test correctly determines whether to use colors."""
33
+
34
+ __author__ = 'wan@google.com (Zhanyong Wan)'
35
+
36
+ import os
37
+ import gtest_test_utils
38
+
39
+
40
+ IS_WINDOWS = os.name = 'nt'
41
+
42
+ COLOR_ENV_VAR = 'GTEST_COLOR'
43
+ COLOR_FLAG = 'gtest_color'
44
+ COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_color_test_')
45
+
46
+
47
+ def SetEnvVar(env_var, value):
48
+ """Sets the env variable to 'value'; unsets it when 'value' is None."""
49
+
50
+ if value is not None:
51
+ os.environ[env_var] = value
52
+ elif env_var in os.environ:
53
+ del os.environ[env_var]
54
+
55
+
56
+ def UsesColor(term, color_env_var, color_flag):
57
+ """Runs gtest_color_test_ and returns its exit code."""
58
+
59
+ SetEnvVar('TERM', term)
60
+ SetEnvVar(COLOR_ENV_VAR, color_env_var)
61
+
62
+ if color_flag is None:
63
+ args = []
64
+ else:
65
+ args = ['--%s=%s' % (COLOR_FLAG, color_flag)]
66
+ p = gtest_test_utils.Subprocess([COMMAND] + args)
67
+ return not p.exited or p.exit_code
68
+
69
+
70
+ class GTestColorTest(gtest_test_utils.TestCase):
71
+ def testNoEnvVarNoFlag(self):
72
+ """Tests the case when there's neither GTEST_COLOR nor --gtest_color."""
73
+
74
+ if not IS_WINDOWS:
75
+ self.assert_(not UsesColor('dumb', None, None))
76
+ self.assert_(not UsesColor('emacs', None, None))
77
+ self.assert_(not UsesColor('xterm-mono', None, None))
78
+ self.assert_(not UsesColor('unknown', None, None))
79
+ self.assert_(not UsesColor(None, None, None))
80
+ self.assert_(UsesColor('linux', None, None))
81
+ self.assert_(UsesColor('cygwin', None, None))
82
+ self.assert_(UsesColor('xterm', None, None))
83
+ self.assert_(UsesColor('xterm-color', None, None))
84
+ self.assert_(UsesColor('xterm-256color', None, None))
85
+
86
+ def testFlagOnly(self):
87
+ """Tests the case when there's --gtest_color but not GTEST_COLOR."""
88
+
89
+ self.assert_(not UsesColor('dumb', None, 'no'))
90
+ self.assert_(not UsesColor('xterm-color', None, 'no'))
91
+ if not IS_WINDOWS:
92
+ self.assert_(not UsesColor('emacs', None, 'auto'))
93
+ self.assert_(UsesColor('xterm', None, 'auto'))
94
+ self.assert_(UsesColor('dumb', None, 'yes'))
95
+ self.assert_(UsesColor('xterm', None, 'yes'))
96
+
97
+ def testEnvVarOnly(self):
98
+ """Tests the case when there's GTEST_COLOR but not --gtest_color."""
99
+
100
+ self.assert_(not UsesColor('dumb', 'no', None))
101
+ self.assert_(not UsesColor('xterm-color', 'no', None))
102
+ if not IS_WINDOWS:
103
+ self.assert_(not UsesColor('dumb', 'auto', None))
104
+ self.assert_(UsesColor('xterm-color', 'auto', None))
105
+ self.assert_(UsesColor('dumb', 'yes', None))
106
+ self.assert_(UsesColor('xterm-color', 'yes', None))
107
+
108
+ def testEnvVarAndFlag(self):
109
+ """Tests the case when there are both GTEST_COLOR and --gtest_color."""
110
+
111
+ self.assert_(not UsesColor('xterm-color', 'no', 'no'))
112
+ self.assert_(UsesColor('dumb', 'no', 'yes'))
113
+ self.assert_(UsesColor('xterm-color', 'no', 'auto'))
114
+
115
+ def testAliasesOfYesAndNo(self):
116
+ """Tests using aliases in specifying --gtest_color."""
117
+
118
+ self.assert_(UsesColor('dumb', None, 'true'))
119
+ self.assert_(UsesColor('dumb', None, 'YES'))
120
+ self.assert_(UsesColor('dumb', None, 'T'))
121
+ self.assert_(UsesColor('dumb', None, '1'))
122
+
123
+ self.assert_(not UsesColor('xterm', None, 'f'))
124
+ self.assert_(not UsesColor('xterm', None, 'false'))
125
+ self.assert_(not UsesColor('xterm', None, '0'))
126
+ self.assert_(not UsesColor('xterm', None, 'unknown'))
127
+
128
+
129
+ if __name__ == '__main__':
130
+ gtest_test_utils.Main()
@@ -0,0 +1,71 @@
1
+ // Copyright 2008, 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
+ // A helper program for testing how Google Test determines whether to use
33
+ // colors in the output. It prints "YES" and returns 1 if Google Test
34
+ // decides to use colors, and prints "NO" and returns 0 otherwise.
35
+
36
+ #include <stdio.h>
37
+
38
+ #include "gtest/gtest.h"
39
+
40
+ // Indicates that this translation unit is part of Google Test's
41
+ // implementation. It must come before gtest-internal-inl.h is
42
+ // included, or there will be a compiler error. This trick is to
43
+ // prevent a user from accidentally including gtest-internal-inl.h in
44
+ // his code.
45
+ #define GTEST_IMPLEMENTATION_ 1
46
+ #include "src/gtest-internal-inl.h"
47
+ #undef GTEST_IMPLEMENTATION_
48
+
49
+ using testing::internal::ShouldUseColor;
50
+
51
+ // The purpose of this is to ensure that the UnitTest singleton is
52
+ // created before main() is entered, and thus that ShouldUseColor()
53
+ // works the same way as in a real Google-Test-based test. We don't actual
54
+ // run the TEST itself.
55
+ TEST(GTestColorTest, Dummy) {
56
+ }
57
+
58
+ int main(int argc, char** argv) {
59
+ testing::InitGoogleTest(&argc, argv);
60
+
61
+ if (ShouldUseColor(true)) {
62
+ // Google Test decides to use colors in the output (assuming it
63
+ // goes to a TTY).
64
+ printf("YES\n");
65
+ return 1;
66
+ } else {
67
+ // Google Test decides not to use colors in the output.
68
+ printf("NO\n");
69
+ return 0;
70
+ }
71
+ }
@@ -0,0 +1,117 @@
1
+ #!/usr/bin/env python
2
+ #
3
+ # Copyright 2008, Google Inc.
4
+ # All rights reserved.
5
+ #
6
+ # Redistribution and use in source and binary forms, with or without
7
+ # modification, are permitted provided that the following conditions are
8
+ # met:
9
+ #
10
+ # * Redistributions of source code must retain the above copyright
11
+ # notice, this list of conditions and the following disclaimer.
12
+ # * Redistributions in binary form must reproduce the above
13
+ # copyright notice, this list of conditions and the following disclaimer
14
+ # in the documentation and/or other materials provided with the
15
+ # distribution.
16
+ # * Neither the name of Google Inc. nor the names of its
17
+ # contributors may be used to endorse or promote products derived from
18
+ # this software without specific prior written permission.
19
+ #
20
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+
32
+ """Verifies that Google Test correctly parses environment variables."""
33
+
34
+ __author__ = 'wan@google.com (Zhanyong Wan)'
35
+
36
+ import os
37
+ import gtest_test_utils
38
+
39
+
40
+ IS_WINDOWS = os.name == 'nt'
41
+ IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
42
+
43
+ COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_env_var_test_')
44
+
45
+ environ = os.environ.copy()
46
+
47
+
48
+ def AssertEq(expected, actual):
49
+ if expected != actual:
50
+ print('Expected: %s' % (expected,))
51
+ print(' Actual: %s' % (actual,))
52
+ raise AssertionError
53
+
54
+
55
+ def SetEnvVar(env_var, value):
56
+ """Sets the env variable to 'value'; unsets it when 'value' is None."""
57
+
58
+ if value is not None:
59
+ environ[env_var] = value
60
+ elif env_var in environ:
61
+ del environ[env_var]
62
+
63
+
64
+ def GetFlag(flag):
65
+ """Runs gtest_env_var_test_ and returns its output."""
66
+
67
+ args = [COMMAND]
68
+ if flag is not None:
69
+ args += [flag]
70
+ return gtest_test_utils.Subprocess(args, env=environ).output
71
+
72
+
73
+ def TestFlag(flag, test_val, default_val):
74
+ """Verifies that the given flag is affected by the corresponding env var."""
75
+
76
+ env_var = 'GTEST_' + flag.upper()
77
+ SetEnvVar(env_var, test_val)
78
+ AssertEq(test_val, GetFlag(flag))
79
+ SetEnvVar(env_var, None)
80
+ AssertEq(default_val, GetFlag(flag))
81
+
82
+
83
+ class GTestEnvVarTest(gtest_test_utils.TestCase):
84
+ def testEnvVarAffectsFlag(self):
85
+ """Tests that environment variable should affect the corresponding flag."""
86
+
87
+ TestFlag('break_on_failure', '1', '0')
88
+ TestFlag('color', 'yes', 'auto')
89
+ TestFlag('filter', 'FooTest.Bar', '*')
90
+ SetEnvVar('XML_OUTPUT_FILE', None) # For 'output' test
91
+ TestFlag('output', 'xml:tmp/foo.xml', '')
92
+ TestFlag('print_time', '0', '1')
93
+ TestFlag('repeat', '999', '1')
94
+ TestFlag('throw_on_failure', '1', '0')
95
+ TestFlag('death_test_style', 'threadsafe', 'fast')
96
+ TestFlag('catch_exceptions', '0', '1')
97
+
98
+ if IS_LINUX:
99
+ TestFlag('death_test_use_fork', '1', '0')
100
+ TestFlag('stack_trace_depth', '0', '100')
101
+
102
+ def testXmlOutputFile(self):
103
+ """Tests that $XML_OUTPUT_FILE affects the output flag."""
104
+
105
+ SetEnvVar('GTEST_OUTPUT', None)
106
+ SetEnvVar('XML_OUTPUT_FILE', 'tmp/bar.xml')
107
+ AssertEq('xml:tmp/bar.xml', GetFlag('output'))
108
+
109
+ def testXmlOutputFileOverride(self):
110
+ """Tests that $XML_OUTPUT_FILE is overridden by $GTEST_OUTPUT"""
111
+
112
+ SetEnvVar('GTEST_OUTPUT', 'xml:tmp/foo.xml')
113
+ SetEnvVar('XML_OUTPUT_FILE', 'tmp/bar.xml')
114
+ AssertEq('xml:tmp/foo.xml', GetFlag('output'))
115
+
116
+ if __name__ == '__main__':
117
+ gtest_test_utils.Main()
@@ -0,0 +1,126 @@
1
+ // Copyright 2008, 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
+ // A helper program for testing that Google Test parses the environment
33
+ // variables correctly.
34
+
35
+ #include "gtest/gtest.h"
36
+
37
+ #include <iostream>
38
+
39
+ #define GTEST_IMPLEMENTATION_ 1
40
+ #include "src/gtest-internal-inl.h"
41
+ #undef GTEST_IMPLEMENTATION_
42
+
43
+ using ::std::cout;
44
+
45
+ namespace testing {
46
+
47
+ // The purpose of this is to make the test more realistic by ensuring
48
+ // that the UnitTest singleton is created before main() is entered.
49
+ // We don't actual run the TEST itself.
50
+ TEST(GTestEnvVarTest, Dummy) {
51
+ }
52
+
53
+ void PrintFlag(const char* flag) {
54
+ if (strcmp(flag, "break_on_failure") == 0) {
55
+ cout << GTEST_FLAG(break_on_failure);
56
+ return;
57
+ }
58
+
59
+ if (strcmp(flag, "catch_exceptions") == 0) {
60
+ cout << GTEST_FLAG(catch_exceptions);
61
+ return;
62
+ }
63
+
64
+ if (strcmp(flag, "color") == 0) {
65
+ cout << GTEST_FLAG(color);
66
+ return;
67
+ }
68
+
69
+ if (strcmp(flag, "death_test_style") == 0) {
70
+ cout << GTEST_FLAG(death_test_style);
71
+ return;
72
+ }
73
+
74
+ if (strcmp(flag, "death_test_use_fork") == 0) {
75
+ cout << GTEST_FLAG(death_test_use_fork);
76
+ return;
77
+ }
78
+
79
+ if (strcmp(flag, "filter") == 0) {
80
+ cout << GTEST_FLAG(filter);
81
+ return;
82
+ }
83
+
84
+ if (strcmp(flag, "output") == 0) {
85
+ cout << GTEST_FLAG(output);
86
+ return;
87
+ }
88
+
89
+ if (strcmp(flag, "print_time") == 0) {
90
+ cout << GTEST_FLAG(print_time);
91
+ return;
92
+ }
93
+
94
+ if (strcmp(flag, "repeat") == 0) {
95
+ cout << GTEST_FLAG(repeat);
96
+ return;
97
+ }
98
+
99
+ if (strcmp(flag, "stack_trace_depth") == 0) {
100
+ cout << GTEST_FLAG(stack_trace_depth);
101
+ return;
102
+ }
103
+
104
+ if (strcmp(flag, "throw_on_failure") == 0) {
105
+ cout << GTEST_FLAG(throw_on_failure);
106
+ return;
107
+ }
108
+
109
+ cout << "Invalid flag name " << flag
110
+ << ". Valid names are break_on_failure, color, filter, etc.\n";
111
+ exit(1);
112
+ }
113
+
114
+ } // namespace testing
115
+
116
+ int main(int argc, char** argv) {
117
+ testing::InitGoogleTest(&argc, argv);
118
+
119
+ if (argc != 2) {
120
+ cout << "Usage: gtest_env_var_test_ NAME_OF_FLAG\n";
121
+ return 1;
122
+ }
123
+
124
+ testing::PrintFlag(argv[1]);
125
+ return 0;
126
+ }
@@ -0,0 +1,192 @@
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
+ // Tests using global test environments.
33
+
34
+ #include <stdlib.h>
35
+ #include <stdio.h>
36
+ #include "gtest/gtest.h"
37
+
38
+ #define GTEST_IMPLEMENTATION_ 1 // Required for the next #include.
39
+ #include "src/gtest-internal-inl.h"
40
+ #undef GTEST_IMPLEMENTATION_
41
+
42
+ namespace testing {
43
+ GTEST_DECLARE_string_(filter);
44
+ }
45
+
46
+ namespace {
47
+
48
+ enum FailureType {
49
+ NO_FAILURE, NON_FATAL_FAILURE, FATAL_FAILURE
50
+ };
51
+
52
+ // For testing using global test environments.
53
+ class MyEnvironment : public testing::Environment {
54
+ public:
55
+ MyEnvironment() { Reset(); }
56
+
57
+ // Depending on the value of failure_in_set_up_, SetUp() will
58
+ // generate a non-fatal failure, generate a fatal failure, or
59
+ // succeed.
60
+ virtual void SetUp() {
61
+ set_up_was_run_ = true;
62
+
63
+ switch (failure_in_set_up_) {
64
+ case NON_FATAL_FAILURE:
65
+ ADD_FAILURE() << "Expected non-fatal failure in global set-up.";
66
+ break;
67
+ case FATAL_FAILURE:
68
+ FAIL() << "Expected fatal failure in global set-up.";
69
+ break;
70
+ default:
71
+ break;
72
+ }
73
+ }
74
+
75
+ // Generates a non-fatal failure.
76
+ virtual void TearDown() {
77
+ tear_down_was_run_ = true;
78
+ ADD_FAILURE() << "Expected non-fatal failure in global tear-down.";
79
+ }
80
+
81
+ // Resets the state of the environment s.t. it can be reused.
82
+ void Reset() {
83
+ failure_in_set_up_ = NO_FAILURE;
84
+ set_up_was_run_ = false;
85
+ tear_down_was_run_ = false;
86
+ }
87
+
88
+ // We call this function to set the type of failure SetUp() should
89
+ // generate.
90
+ void set_failure_in_set_up(FailureType type) {
91
+ failure_in_set_up_ = type;
92
+ }
93
+
94
+ // Was SetUp() run?
95
+ bool set_up_was_run() const { return set_up_was_run_; }
96
+
97
+ // Was TearDown() run?
98
+ bool tear_down_was_run() const { return tear_down_was_run_; }
99
+
100
+ private:
101
+ FailureType failure_in_set_up_;
102
+ bool set_up_was_run_;
103
+ bool tear_down_was_run_;
104
+ };
105
+
106
+ // Was the TEST run?
107
+ bool test_was_run;
108
+
109
+ // The sole purpose of this TEST is to enable us to check whether it
110
+ // was run.
111
+ TEST(FooTest, Bar) {
112
+ test_was_run = true;
113
+ }
114
+
115
+ // Prints the message and aborts the program if condition is false.
116
+ void Check(bool condition, const char* msg) {
117
+ if (!condition) {
118
+ printf("FAILED: %s\n", msg);
119
+ testing::internal::posix::Abort();
120
+ }
121
+ }
122
+
123
+ // Runs the tests. Return true iff successful.
124
+ //
125
+ // The 'failure' parameter specifies the type of failure that should
126
+ // be generated by the global set-up.
127
+ int RunAllTests(MyEnvironment* env, FailureType failure) {
128
+ env->Reset();
129
+ env->set_failure_in_set_up(failure);
130
+ test_was_run = false;
131
+ testing::internal::GetUnitTestImpl()->ClearAdHocTestResult();
132
+ return RUN_ALL_TESTS();
133
+ }
134
+
135
+ } // namespace
136
+
137
+ int main(int argc, char **argv) {
138
+ testing::InitGoogleTest(&argc, argv);
139
+
140
+ // Registers a global test environment, and verifies that the
141
+ // registration function returns its argument.
142
+ MyEnvironment* const env = new MyEnvironment;
143
+ Check(testing::AddGlobalTestEnvironment(env) == env,
144
+ "AddGlobalTestEnvironment() should return its argument.");
145
+
146
+ // Verifies that RUN_ALL_TESTS() runs the tests when the global
147
+ // set-up is successful.
148
+ Check(RunAllTests(env, NO_FAILURE) != 0,
149
+ "RUN_ALL_TESTS() should return non-zero, as the global tear-down "
150
+ "should generate a failure.");
151
+ Check(test_was_run,
152
+ "The tests should run, as the global set-up should generate no "
153
+ "failure");
154
+ Check(env->tear_down_was_run(),
155
+ "The global tear-down should run, as the global set-up was run.");
156
+
157
+ // Verifies that RUN_ALL_TESTS() runs the tests when the global
158
+ // set-up generates no fatal failure.
159
+ Check(RunAllTests(env, NON_FATAL_FAILURE) != 0,
160
+ "RUN_ALL_TESTS() should return non-zero, as both the global set-up "
161
+ "and the global tear-down should generate a non-fatal failure.");
162
+ Check(test_was_run,
163
+ "The tests should run, as the global set-up should generate no "
164
+ "fatal failure.");
165
+ Check(env->tear_down_was_run(),
166
+ "The global tear-down should run, as the global set-up was run.");
167
+
168
+ // Verifies that RUN_ALL_TESTS() runs no test when the global set-up
169
+ // generates a fatal failure.
170
+ Check(RunAllTests(env, FATAL_FAILURE) != 0,
171
+ "RUN_ALL_TESTS() should return non-zero, as the global set-up "
172
+ "should generate a fatal failure.");
173
+ Check(!test_was_run,
174
+ "The tests should not run, as the global set-up should generate "
175
+ "a fatal failure.");
176
+ Check(env->tear_down_was_run(),
177
+ "The global tear-down should run, as the global set-up was run.");
178
+
179
+ // Verifies that RUN_ALL_TESTS() doesn't do global set-up or
180
+ // tear-down when there is no test to run.
181
+ testing::GTEST_FLAG(filter) = "-*";
182
+ Check(RunAllTests(env, NO_FAILURE) == 0,
183
+ "RUN_ALL_TESTS() should return zero, as there is no test to run.");
184
+ Check(!env->set_up_was_run(),
185
+ "The global set-up should not run, as there is no test to run.");
186
+ Check(!env->tear_down_was_run(),
187
+ "The global tear-down should not run, "
188
+ "as the global set-up was not run.");
189
+
190
+ printf("PASS\n");
191
+ return 0;
192
+ }