rj_schema 0.2.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (371) hide show
  1. checksums.yaml +4 -4
  2. data/ext/rj_schema/rapidjson/CMakeLists.txt +9 -4
  3. data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +10 -0
  4. data/ext/rj_schema/rapidjson/appveyor.yml +22 -9
  5. data/ext/rj_schema/rapidjson/bin/data/abcde.txt +1 -0
  6. data/ext/rj_schema/rapidjson/bin/unittestschema/address.json +139 -0
  7. data/ext/rj_schema/rapidjson/bin/unittestschema/allOf_address.json +7 -0
  8. data/ext/rj_schema/rapidjson/bin/unittestschema/anyOf_address.json +7 -0
  9. data/ext/rj_schema/rapidjson/bin/unittestschema/oneOf_address.json +7 -0
  10. data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +2 -2
  11. data/ext/rj_schema/rapidjson/doc/dom.md +1 -0
  12. data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +1 -0
  13. data/ext/rj_schema/rapidjson/doc/faq.md +3 -3
  14. data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +8 -8
  15. data/ext/rj_schema/rapidjson/doc/internals.md +1 -1
  16. data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +2 -2
  17. data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +1 -1
  18. data/ext/rj_schema/rapidjson/doc/sax.md +1 -1
  19. data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +2 -2
  20. data/ext/rj_schema/rapidjson/doc/stream.md +1 -1
  21. data/ext/rj_schema/rapidjson/doc/tutorial.md +1 -1
  22. data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +7 -6
  23. data/ext/rj_schema/rapidjson/example/CMakeLists.txt +1 -0
  24. data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +118 -0
  25. data/ext/rj_schema/rapidjson/example/sortkeys/sortkeys.cpp +62 -0
  26. data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +1 -1
  27. data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +6 -6
  28. data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +1 -1
  29. data/ext/rj_schema/rapidjson/include/rapidjson/document.h +124 -35
  30. data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +1 -1
  31. data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +1 -1
  32. data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +49 -1
  33. data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +56 -1
  34. data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +2 -2
  35. data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +1 -1
  36. data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +2 -2
  37. data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +2 -2
  38. data/ext/rj_schema/rapidjson/include/rapidjson/internal/clzll.h +71 -0
  39. data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +3 -17
  40. data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +1 -1
  41. data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +1 -1
  42. data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +1 -1
  43. data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +1 -1
  44. data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +1 -1
  45. data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +20 -13
  46. data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +4 -3
  47. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +1 -1
  48. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +1 -1
  49. data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +1 -1
  50. data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +50 -35
  51. data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +1 -1
  52. data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +1 -1
  53. data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +1 -1
  54. data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +63 -5
  55. data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +2 -2
  56. data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +63 -1
  57. data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +67 -53
  58. data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +318 -164
  59. data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +1 -1
  60. data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +1 -1
  61. data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +10 -10
  62. data/ext/rj_schema/rapidjson/readme.md +51 -1
  63. data/ext/rj_schema/rapidjson/readme.zh-cn.md +2 -2
  64. data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +1 -1
  65. data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +1 -1
  66. data/ext/rj_schema/rapidjson/test/perftest/perftest.h +1 -1
  67. data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +2 -2
  68. data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +75 -1
  69. data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +1 -0
  70. data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +1 -1
  71. data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +1 -1
  72. data/ext/rj_schema/rapidjson/test/unittest/clzlltest.cpp +34 -0
  73. data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +19 -19
  74. data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +1 -1
  75. data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +1 -1
  76. data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +1 -1
  77. data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +1 -1
  78. data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +45 -2
  79. data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +1 -1
  80. data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +10 -10
  81. data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +8 -8
  82. data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +1 -1
  83. data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +1 -1
  84. data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +1 -1
  85. data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +157 -16
  86. data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +1 -1
  87. data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +113 -75
  88. data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +2 -1
  89. data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +593 -78
  90. data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +1 -1
  91. data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +1 -1
  92. data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +5 -5
  93. data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +1 -1
  94. data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +1 -1
  95. data/ext/rj_schema/rapidjson/test/unittest/unittest.h +4 -1
  96. data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +12 -12
  97. data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +1 -1
  98. data/ext/rj_schema/rapidjson/thirdparty/gtest/BUILD.bazel +175 -0
  99. data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +18 -1
  100. data/ext/rj_schema/rapidjson/thirdparty/gtest/CONTRIBUTING.md +160 -0
  101. data/ext/rj_schema/rapidjson/thirdparty/gtest/LICENSE +28 -0
  102. data/ext/rj_schema/rapidjson/thirdparty/gtest/Makefile.am +14 -0
  103. data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +16 -35
  104. data/ext/rj_schema/rapidjson/thirdparty/gtest/WORKSPACE +8 -0
  105. data/ext/rj_schema/rapidjson/thirdparty/gtest/appveyor.yml +104 -0
  106. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-autotools.sh +44 -0
  107. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-bazel.sh +36 -0
  108. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-linux.sh +41 -0
  109. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-osx.sh +40 -0
  110. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/get-nprocessors.sh +48 -0
  111. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-linux.sh +49 -0
  112. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-osx.sh +39 -0
  113. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/log-config.sh +51 -0
  114. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/travis.sh +44 -0
  115. data/ext/rj_schema/rapidjson/thirdparty/gtest/configure.ac +16 -0
  116. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +1 -1
  117. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +72 -32
  118. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +53 -42
  119. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock.pc.in +9 -0
  120. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock_main.pc.in +9 -0
  121. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +4 -4
  122. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +6 -4
  123. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +117 -132
  124. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +7 -4
  125. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +20 -12
  126. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +1 -2
  127. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +83 -26
  128. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +262 -68
  129. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +45 -6
  130. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +650 -366
  131. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +76 -20
  132. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +308 -229
  133. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +18 -15
  134. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +87 -26
  135. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +33 -16
  136. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +1209 -353
  137. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +33 -0
  138. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +159 -88
  139. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +2 -1
  140. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +1 -1
  141. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +3 -4
  142. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +16 -9
  143. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +71 -8
  144. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +7 -11
  145. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +14 -0
  146. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +69 -6
  147. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +2 -2
  148. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +69 -6
  149. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +83 -8
  150. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +14 -0
  151. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +63 -2
  152. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +63 -2
  153. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +76 -3
  154. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +1 -1
  155. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +4 -5
  156. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +3 -3
  157. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +1 -1
  158. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +36 -6
  159. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +210 -135
  160. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +108 -48
  161. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +23 -1
  162. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/BUILD.bazel +123 -0
  163. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +166 -2
  164. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +1 -1
  165. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +64 -62
  166. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +43 -18
  167. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +11 -9
  168. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +91 -36
  169. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +33 -14
  170. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +1286 -167
  171. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +85 -83
  172. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +102 -15
  173. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +136 -9
  174. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +1 -1
  175. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +1 -1
  176. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +24 -2
  177. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +8 -5
  178. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +20 -1
  179. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +8 -1
  180. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +3 -2
  181. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +44 -2
  182. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +5 -7
  183. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +40 -14
  184. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +60 -31
  185. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +232 -171
  186. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest.pc.in +9 -0
  187. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest_main.pc.in +10 -0
  188. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +54 -16
  189. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +1 -1
  190. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Pkgconfig.md +146 -0
  191. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +2 -2
  192. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +6 -6
  193. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{AdvancedGuide.md → advanced.md} +260 -26
  194. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{FAQ.md → faq.md} +62 -57
  195. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Primer.md → primer.md} +43 -9
  196. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Samples.md → samples.md} +0 -0
  197. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +53 -5
  198. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +1 -2
  199. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +30 -36
  200. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +8 -17
  201. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +140 -51
  202. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +2 -3
  203. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +4 -3
  204. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +126 -30
  205. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +6 -7
  206. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +8 -5
  207. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +6 -5
  208. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +4 -0
  209. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +13 -57
  210. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +1 -2
  211. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +98 -59
  212. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +34 -41
  213. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +3 -10
  214. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +9 -17
  215. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +8 -1
  216. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +232 -99
  217. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +3 -3
  218. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +17 -1
  219. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +17 -1
  220. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.sln +55 -0
  221. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj +149 -0
  222. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj.filters +18 -0
  223. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.sln +55 -0
  224. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj +149 -0
  225. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj.filters +18 -0
  226. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj +154 -0
  227. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj.filters +18 -0
  228. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj +162 -0
  229. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj.filters +18 -0
  230. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj +199 -0
  231. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters +26 -0
  232. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj +191 -0
  233. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters +26 -0
  234. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj +188 -0
  235. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters +18 -0
  236. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj +180 -0
  237. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj.filters +18 -0
  238. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +6 -2
  239. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +1 -1
  240. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -4
  241. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +2 -1
  242. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +2 -1
  243. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +7 -6
  244. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +5 -1
  245. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +3 -3
  246. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +2 -1
  247. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +10 -22
  248. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +2 -1
  249. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -3
  250. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +1 -1
  251. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +10 -10
  252. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1 -1
  253. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +1 -1
  254. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +226 -32
  255. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +5 -7
  256. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +21 -29
  257. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +85 -67
  258. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +93 -8
  259. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +1 -9
  260. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +1 -0
  261. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +622 -164
  262. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +1 -1
  263. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/BUILD.bazel +396 -0
  264. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +12 -15
  265. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +2 -12
  266. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +1 -1
  267. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +6 -8
  268. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +1 -5
  269. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +84 -29
  270. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +1 -5
  271. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +11 -12
  272. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +165 -63
  273. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +1 -1
  274. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +1 -1
  275. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +1 -1
  276. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +13 -13
  277. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_assert_by_exception_test.cc +119 -0
  278. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +1 -3
  279. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +1 -2
  280. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -2
  281. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +1 -1
  282. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +1 -2
  283. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -8
  284. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +6 -4
  285. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -2
  286. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -3
  287. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +20 -18
  288. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -2
  289. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +1 -1
  290. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_outfiles_test.py +162 -0
  291. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_output_unittest.py +611 -0
  292. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_test_utils.py +60 -0
  293. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +4 -4
  294. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +2 -2
  295. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +11 -7
  296. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +17 -12
  297. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +104 -66
  298. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +1 -1
  299. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +2 -2
  300. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +2 -19
  301. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -6
  302. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +12 -14
  303. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test.py +65 -0
  304. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test_.cc +44 -0
  305. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +1 -1
  306. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +4 -5
  307. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +2 -2
  308. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +240 -149
  309. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -1
  310. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -1
  311. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +15 -7
  312. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +100 -30
  313. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -2
  314. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +25 -23
  315. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +1 -1
  316. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +1 -1
  317. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +4 -4
  318. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +47 -0
  319. data/ext/rj_schema/rapidjson/travis-doxygen.sh +13 -6
  320. data/ext/rj_schema/rj_schema.cpp +161 -17
  321. data/lib/rj_schema.rb +1 -1
  322. metadata +63 -58
  323. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
  324. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +0 -525
  325. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +0 -3250
  326. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +0 -11
  327. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +0 -439
  328. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +0 -624
  329. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +0 -534
  330. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +0 -3342
  331. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +0 -12
  332. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +0 -439
  333. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +0 -628
  334. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +0 -556
  335. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +0 -3432
  336. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +0 -12
  337. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +0 -439
  338. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +0 -628
  339. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +0 -126
  340. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +0 -14
  341. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +0 -2096
  342. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +0 -12
  343. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +0 -886
  344. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +0 -497
  345. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +0 -177
  346. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +0 -93
  347. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +0 -2178
  348. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +0 -14
  349. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +0 -1038
  350. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +0 -501
  351. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +0 -177
  352. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +0 -14
  353. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +0 -93
  354. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +0 -2181
  355. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +0 -14
  356. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +0 -1082
  357. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +0 -501
  358. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +0 -177
  359. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +0 -14
  360. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +0 -93
  361. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +0 -45
  362. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +0 -126
  363. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +0 -45
  364. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +0 -126
  365. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +0 -129
  366. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +0 -129
  367. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +0 -164
  368. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +0 -164
  369. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +0 -147
  370. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +0 -147
  371. data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
@@ -37,7 +37,7 @@
37
37
  #include "prime_tables.h"
38
38
 
39
39
  #include "gtest/gtest.h"
40
-
40
+ namespace {
41
41
  #if GTEST_HAS_COMBINE
42
42
 
43
43
  // Suppose we want to introduce a new, improved implementation of PrimeTable
@@ -171,3 +171,4 @@ INSTANTIATE_TEST_CASE_P(MeaningfulTestParameters,
171
171
  TEST(DummyTest, CombineIsNotSupportedOnThisPlatform) {}
172
172
 
173
173
  #endif // GTEST_HAS_COMBINE
174
+ } // namespace
@@ -44,9 +44,7 @@ using ::testing::TestEventListeners;
44
44
  using ::testing::TestInfo;
45
45
  using ::testing::TestPartResult;
46
46
  using ::testing::UnitTest;
47
-
48
47
  namespace {
49
-
50
48
  // Provides alternative output mode which produces minimal amount of
51
49
  // information about tests.
52
50
  class TersePrinter : public EmptyTestEventListener {
@@ -102,7 +100,6 @@ TEST(CustomOutputTest, Fails) {
102
100
  EXPECT_EQ(1, 2)
103
101
  << "This test fails in order to demonstrate alternative failure messages";
104
102
  }
105
-
106
103
  } // namespace
107
104
 
108
105
  int main(int argc, char **argv) {
@@ -52,7 +52,7 @@ EXAMPLES
52
52
  This tool is experimental. In particular, it assumes that there is no
53
53
  conditional inclusion of Google Test headers. Please report any
54
54
  problems to googletestframework@googlegroups.com. You can read
55
- http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide for
55
+ https://github.com/google/googletest/blob/master/googletest/docs/advanced.md for
56
56
  more information.
57
57
  """
58
58
 
@@ -115,10 +115,9 @@ def HeaderPreamble(n):
115
115
  #ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
116
116
  #define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
117
117
 
118
- // Makes sure this header is not included before gtest.h.
119
- #ifndef GTEST_INCLUDE_GTEST_GTEST_H_
120
- # error Do not include gtest_pred_impl.h directly. Include gtest.h instead.
121
- #endif // GTEST_INCLUDE_GTEST_GTEST_H_
118
+ #include "gtest/gtest.h"
119
+
120
+ namespace testing {
122
121
 
123
122
  // This header implements a family of generic predicate assertion
124
123
  // macros:
@@ -295,16 +294,17 @@ def HeaderPostamble():
295
294
 
296
295
  return """
297
296
 
297
+ } // namespace testing
298
+
298
299
  #endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
299
300
  """
300
301
 
301
302
 
302
303
  def GenerateFile(path, content):
303
- """Given a file path and a content string, overwrites it with the
304
- given content."""
305
-
304
+ """Given a file path and a content string
305
+ overwrites it with the given content.
306
+ """
306
307
  print 'Updating file %s . . .' % path
307
-
308
308
  f = file(path, 'w+')
309
309
  print >>f, content,
310
310
  f.close()
@@ -314,8 +314,8 @@ def GenerateFile(path, content):
314
314
 
315
315
  def GenerateHeader(n):
316
316
  """Given the maximum arity n, updates the header file that implements
317
- the predicate assertions."""
318
-
317
+ the predicate assertions.
318
+ """
319
319
  GenerateFile(HEADER,
320
320
  HeaderPreamble(n)
321
321
  + ''.join([ImplementationForArity(i) for i in OneTo(n)])
@@ -732,7 +732,7 @@ class SubversionVCS(VersionControlSystem):
732
732
  else:
733
733
  self.rev_start = self.rev_end = None
734
734
  # Cache output from "svn list -r REVNO dirname".
735
- # Keys: dirname, Values: 2-tuple (ouput for start rev and end rev).
735
+ # Keys: dirname, Values: 2-tuple (output for start rev and end rev).
736
736
  self.svnls_cache = {}
737
737
  # SVN base URL is required to fetch files deleted in an older revision.
738
738
  # Result is cached to not guess it over and over again in GetBaseFile().
@@ -29,7 +29,7 @@
29
29
  //
30
30
  // Author: mheule@google.com (Markus Heule)
31
31
  //
32
- // Google C++ Testing Framework (Google Test)
32
+ // Google C++ Testing and Mocking Framework (Google Test)
33
33
  //
34
34
  // Sometimes it's desirable to build Google Test by compiling a single file.
35
35
  // This file serves this purpose.
@@ -62,26 +62,29 @@
62
62
  # include <spawn.h>
63
63
  # endif // GTEST_OS_QNX
64
64
 
65
+ # if GTEST_OS_FUCHSIA
66
+ # include <lib/fdio/io.h>
67
+ # include <lib/fdio/spawn.h>
68
+ # include <zircon/processargs.h>
69
+ # include <zircon/syscalls.h>
70
+ # endif // GTEST_OS_FUCHSIA
71
+
65
72
  #endif // GTEST_HAS_DEATH_TEST
66
73
 
67
74
  #include "gtest/gtest-message.h"
68
75
  #include "gtest/internal/gtest-string.h"
69
-
70
- // Indicates that this translation unit is part of Google Test's
71
- // implementation. It must come before gtest-internal-inl.h is
72
- // included, or there will be a compiler error. This trick exists to
73
- // prevent the accidental inclusion of gtest-internal-inl.h in the
74
- // user's code.
75
- #define GTEST_IMPLEMENTATION_ 1
76
76
  #include "src/gtest-internal-inl.h"
77
- #undef GTEST_IMPLEMENTATION_
78
77
 
79
78
  namespace testing {
80
79
 
81
80
  // Constants.
82
81
 
83
82
  // The default death test style.
84
- static const char kDefaultDeathTestStyle[] = "fast";
83
+ //
84
+ // This is defined in internal/gtest-port.h as "fast", but can be overridden by
85
+ // a definition in internal/custom/gtest-port.h. The recommended value, which is
86
+ // used internally at Google, is "threadsafe".
87
+ static const char kDefaultDeathTestStyle[] = GTEST_DEFAULT_DEATH_TEST_STYLE;
85
88
 
86
89
  GTEST_DEFINE_string_(
87
90
  death_test_style,
@@ -121,7 +124,7 @@ namespace internal {
121
124
 
122
125
  // Valid only for fast death tests. Indicates the code is running in the
123
126
  // child process of a fast style death test.
124
- # if !GTEST_OS_WINDOWS
127
+ # if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
125
128
  static bool g_in_fast_death_test_child = false;
126
129
  # endif
127
130
 
@@ -131,10 +134,10 @@ static bool g_in_fast_death_test_child = false;
131
134
  // tests. IMPORTANT: This is an internal utility. Using it may break the
132
135
  // implementation of death tests. User code MUST NOT use it.
133
136
  bool InDeathTestChild() {
134
- # if GTEST_OS_WINDOWS
137
+ # if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
135
138
 
136
- // On Windows, death tests are thread-safe regardless of the value of the
137
- // death_test_style flag.
139
+ // On Windows and Fuchsia, death tests are thread-safe regardless of the value
140
+ // of the death_test_style flag.
138
141
  return !GTEST_FLAG(internal_run_death_test).empty();
139
142
 
140
143
  # else
@@ -154,7 +157,7 @@ ExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) {
154
157
 
155
158
  // ExitedWithCode function-call operator.
156
159
  bool ExitedWithCode::operator()(int exit_status) const {
157
- # if GTEST_OS_WINDOWS
160
+ # if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
158
161
 
159
162
  return exit_status == exit_code_;
160
163
 
@@ -162,10 +165,10 @@ bool ExitedWithCode::operator()(int exit_status) const {
162
165
 
163
166
  return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_;
164
167
 
165
- # endif // GTEST_OS_WINDOWS
168
+ # endif // GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
166
169
  }
167
170
 
168
- # if !GTEST_OS_WINDOWS
171
+ # if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
169
172
  // KilledBySignal constructor.
170
173
  KilledBySignal::KilledBySignal(int signum) : signum_(signum) {
171
174
  }
@@ -182,7 +185,7 @@ bool KilledBySignal::operator()(int exit_status) const {
182
185
  # endif // defined(GTEST_KILLED_BY_SIGNAL_OVERRIDE_)
183
186
  return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_;
184
187
  }
185
- # endif // !GTEST_OS_WINDOWS
188
+ # endif // !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
186
189
 
187
190
  namespace internal {
188
191
 
@@ -193,7 +196,7 @@ namespace internal {
193
196
  static std::string ExitSummary(int exit_code) {
194
197
  Message m;
195
198
 
196
- # if GTEST_OS_WINDOWS
199
+ # if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
197
200
 
198
201
  m << "Exited with exit status " << exit_code;
199
202
 
@@ -209,7 +212,7 @@ static std::string ExitSummary(int exit_code) {
209
212
  m << " (core dumped)";
210
213
  }
211
214
  # endif
212
- # endif // GTEST_OS_WINDOWS
215
+ # endif // GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
213
216
 
214
217
  return m.GetString();
215
218
  }
@@ -220,7 +223,7 @@ bool ExitedUnsuccessfully(int exit_status) {
220
223
  return !ExitedWithCode(0)(exit_status);
221
224
  }
222
225
 
223
- # if !GTEST_OS_WINDOWS
226
+ # if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
224
227
  // Generates a textual failure message when a death test finds more than
225
228
  // one thread running, or cannot determine the number of threads, prior
226
229
  // to executing the given statement. It is the responsibility of the
@@ -235,7 +238,7 @@ static std::string DeathTestThreadWarning(size_t thread_count) {
235
238
  msg << "detected " << thread_count << " threads.";
236
239
  return msg.GetString();
237
240
  }
238
- # endif // !GTEST_OS_WINDOWS
241
+ # endif // !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
239
242
 
240
243
  // Flag characters for reporting a death test that did not die.
241
244
  static const char kDeathTestLived = 'L';
@@ -243,6 +246,13 @@ static const char kDeathTestReturned = 'R';
243
246
  static const char kDeathTestThrew = 'T';
244
247
  static const char kDeathTestInternalError = 'I';
245
248
 
249
+ #if GTEST_OS_FUCHSIA
250
+
251
+ // File descriptor used for the pipe in the child process.
252
+ static const int kFuchsiaReadPipeFd = 3;
253
+
254
+ #endif
255
+
246
256
  // An enumeration describing all of the possible ways that a death test can
247
257
  // conclude. DIED means that the process died while executing the test
248
258
  // code; LIVED means that process lived beyond the end of the test code;
@@ -259,7 +269,7 @@ enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW };
259
269
  // message is propagated back to the parent process. Otherwise, the
260
270
  // message is simply printed to stderr. In either case, the program
261
271
  // then exits with status 1.
262
- void DeathTestAbort(const std::string& message) {
272
+ static void DeathTestAbort(const std::string& message) {
263
273
  // On a POSIX system, this function may be called from a threadsafe-style
264
274
  // death test child process, which operates on a very small stack. Use
265
275
  // the heap for any additional non-minuscule memory requirements.
@@ -563,7 +573,13 @@ bool DeathTestImpl::Passed(bool status_ok) {
563
573
  break;
564
574
  case DIED:
565
575
  if (status_ok) {
576
+ # if GTEST_USES_PCRE
577
+ // PCRE regexes support embedded NULs.
578
+ // GTEST_USES_PCRE is defined only in google3 mode
579
+ const bool matched = RE::PartialMatch(error_message, *regex());
580
+ # else
566
581
  const bool matched = RE::PartialMatch(error_message.c_str(), *regex());
582
+ # endif // GTEST_USES_PCRE
567
583
  if (matched) {
568
584
  success = true;
569
585
  } else {
@@ -779,7 +795,166 @@ DeathTest::TestRole WindowsDeathTest::AssumeRole() {
779
795
  set_spawned(true);
780
796
  return OVERSEE_TEST;
781
797
  }
782
- # else // We are not on Windows.
798
+
799
+ # elif GTEST_OS_FUCHSIA
800
+
801
+ class FuchsiaDeathTest : public DeathTestImpl {
802
+ public:
803
+ FuchsiaDeathTest(const char* a_statement,
804
+ const RE* a_regex,
805
+ const char* file,
806
+ int line)
807
+ : DeathTestImpl(a_statement, a_regex), file_(file), line_(line) {}
808
+
809
+ // All of these virtual functions are inherited from DeathTest.
810
+ virtual int Wait();
811
+ virtual TestRole AssumeRole();
812
+
813
+ private:
814
+ // The name of the file in which the death test is located.
815
+ const char* const file_;
816
+ // The line number on which the death test is located.
817
+ const int line_;
818
+
819
+ zx_handle_t child_process_;
820
+ };
821
+
822
+ // Utility class for accumulating command-line arguments.
823
+ class Arguments {
824
+ public:
825
+ Arguments() {
826
+ args_.push_back(NULL);
827
+ }
828
+
829
+ ~Arguments() {
830
+ for (std::vector<char*>::iterator i = args_.begin(); i != args_.end();
831
+ ++i) {
832
+ free(*i);
833
+ }
834
+ }
835
+ void AddArgument(const char* argument) {
836
+ args_.insert(args_.end() - 1, posix::StrDup(argument));
837
+ }
838
+
839
+ template <typename Str>
840
+ void AddArguments(const ::std::vector<Str>& arguments) {
841
+ for (typename ::std::vector<Str>::const_iterator i = arguments.begin();
842
+ i != arguments.end();
843
+ ++i) {
844
+ args_.insert(args_.end() - 1, posix::StrDup(i->c_str()));
845
+ }
846
+ }
847
+ char* const* Argv() {
848
+ return &args_[0];
849
+ }
850
+
851
+ int size() {
852
+ return args_.size() - 1;
853
+ }
854
+
855
+ private:
856
+ std::vector<char*> args_;
857
+ };
858
+
859
+ // Waits for the child in a death test to exit, returning its exit
860
+ // status, or 0 if no child process exists. As a side effect, sets the
861
+ // outcome data member.
862
+ int FuchsiaDeathTest::Wait() {
863
+ if (!spawned())
864
+ return 0;
865
+
866
+ // Wait for child process to terminate.
867
+ zx_status_t status_zx;
868
+ zx_signals_t signals;
869
+ status_zx = zx_object_wait_one(
870
+ child_process_,
871
+ ZX_PROCESS_TERMINATED,
872
+ ZX_TIME_INFINITE,
873
+ &signals);
874
+ GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK);
875
+
876
+ ReadAndInterpretStatusByte();
877
+
878
+ zx_info_process_t buffer;
879
+ status_zx = zx_object_get_info(
880
+ child_process_,
881
+ ZX_INFO_PROCESS,
882
+ &buffer,
883
+ sizeof(buffer),
884
+ nullptr,
885
+ nullptr);
886
+ GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK);
887
+
888
+ GTEST_DEATH_TEST_CHECK_(buffer.exited);
889
+ set_status(buffer.return_code);
890
+ return status();
891
+ }
892
+
893
+ // The AssumeRole process for a Fuchsia death test. It creates a child
894
+ // process with the same executable as the current process to run the
895
+ // death test. The child process is given the --gtest_filter and
896
+ // --gtest_internal_run_death_test flags such that it knows to run the
897
+ // current death test only.
898
+ DeathTest::TestRole FuchsiaDeathTest::AssumeRole() {
899
+ const UnitTestImpl* const impl = GetUnitTestImpl();
900
+ const InternalRunDeathTestFlag* const flag =
901
+ impl->internal_run_death_test_flag();
902
+ const TestInfo* const info = impl->current_test_info();
903
+ const int death_test_index = info->result()->death_test_count();
904
+
905
+ if (flag != NULL) {
906
+ // ParseInternalRunDeathTestFlag() has performed all the necessary
907
+ // processing.
908
+ set_write_fd(kFuchsiaReadPipeFd);
909
+ return EXECUTE_TEST;
910
+ }
911
+
912
+ CaptureStderr();
913
+ // Flush the log buffers since the log streams are shared with the child.
914
+ FlushInfoLog();
915
+
916
+ // Build the child process command line.
917
+ const std::string filter_flag =
918
+ std::string("--") + GTEST_FLAG_PREFIX_ + kFilterFlag + "="
919
+ + info->test_case_name() + "." + info->name();
920
+ const std::string internal_flag =
921
+ std::string("--") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag + "="
922
+ + file_ + "|"
923
+ + StreamableToString(line_) + "|"
924
+ + StreamableToString(death_test_index);
925
+ Arguments args;
926
+ args.AddArguments(GetInjectableArgvs());
927
+ args.AddArgument(filter_flag.c_str());
928
+ args.AddArgument(internal_flag.c_str());
929
+
930
+ // Build the pipe for communication with the child.
931
+ zx_status_t status;
932
+ zx_handle_t child_pipe_handle;
933
+ uint32_t type;
934
+ status = fdio_pipe_half(&child_pipe_handle, &type);
935
+ GTEST_DEATH_TEST_CHECK_(status >= 0);
936
+ set_read_fd(status);
937
+
938
+ // Set the pipe handle for the child.
939
+ fdio_spawn_action_t add_handle_action = {
940
+ .action = FDIO_SPAWN_ACTION_ADD_HANDLE,
941
+ .h = {
942
+ .id = PA_HND(type, kFuchsiaReadPipeFd),
943
+ .handle = child_pipe_handle
944
+ }
945
+ };
946
+
947
+ // Spawn the child process.
948
+ status = fdio_spawn_etc(ZX_HANDLE_INVALID, FDIO_SPAWN_CLONE_ALL,
949
+ args.Argv()[0], args.Argv(), nullptr, 1,
950
+ &add_handle_action, &child_process_, nullptr);
951
+ GTEST_DEATH_TEST_CHECK_(status == ZX_OK);
952
+
953
+ set_spawned(true);
954
+ return OVERSEE_TEST;
955
+ }
956
+
957
+ #else // We are neither on Windows, nor on Fuchsia.
783
958
 
784
959
  // ForkingDeathTest provides implementations for most of the abstract
785
960
  // methods of the DeathTest interface. Only the AssumeRole method is
@@ -883,11 +1058,10 @@ class ExecDeathTest : public ForkingDeathTest {
883
1058
  ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { }
884
1059
  virtual TestRole AssumeRole();
885
1060
  private:
886
- static ::std::vector<testing::internal::string>
887
- GetArgvsForDeathTestChildProcess() {
888
- ::std::vector<testing::internal::string> args = GetInjectableArgvs();
1061
+ static ::std::vector<std::string> GetArgvsForDeathTestChildProcess() {
1062
+ ::std::vector<std::string> args = GetInjectableArgvs();
889
1063
  # if defined(GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_)
890
- ::std::vector<testing::internal::string> extra_args =
1064
+ ::std::vector<std::string> extra_args =
891
1065
  GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_();
892
1066
  args.insert(args.end(), extra_args.begin(), extra_args.end());
893
1067
  # endif // defined(GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_)
@@ -986,6 +1160,7 @@ static int ExecDeathTestChildMain(void* child_arg) {
986
1160
  }
987
1161
  # endif // !GTEST_OS_QNX
988
1162
 
1163
+ # if GTEST_HAS_CLONE
989
1164
  // Two utility routines that together determine the direction the stack
990
1165
  // grows.
991
1166
  // This could be accomplished more elegantly by a single recursive
@@ -995,20 +1170,22 @@ static int ExecDeathTestChildMain(void* child_arg) {
995
1170
  // GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining
996
1171
  // StackLowerThanAddress into StackGrowsDown, which then doesn't give
997
1172
  // correct answer.
998
- void StackLowerThanAddress(const void* ptr, bool* result) GTEST_NO_INLINE_;
999
- void StackLowerThanAddress(const void* ptr, bool* result) {
1173
+ static void StackLowerThanAddress(const void* ptr,
1174
+ bool* result) GTEST_NO_INLINE_;
1175
+ static void StackLowerThanAddress(const void* ptr, bool* result) {
1000
1176
  int dummy;
1001
1177
  *result = (&dummy < ptr);
1002
1178
  }
1003
1179
 
1004
1180
  // Make sure AddressSanitizer does not tamper with the stack here.
1005
1181
  GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
1006
- bool StackGrowsDown() {
1182
+ static bool StackGrowsDown() {
1007
1183
  int dummy;
1008
1184
  bool result;
1009
1185
  StackLowerThanAddress(&dummy, &result);
1010
1186
  return result;
1011
1187
  }
1188
+ # endif // GTEST_HAS_CLONE
1012
1189
 
1013
1190
  // Spawns a child process with the same executable as the current process in
1014
1191
  // a thread-safe manner and instructs it to run the death test. The
@@ -1200,6 +1377,13 @@ bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex,
1200
1377
  *test = new WindowsDeathTest(statement, regex, file, line);
1201
1378
  }
1202
1379
 
1380
+ # elif GTEST_OS_FUCHSIA
1381
+
1382
+ if (GTEST_FLAG(death_test_style) == "threadsafe" ||
1383
+ GTEST_FLAG(death_test_style) == "fast") {
1384
+ *test = new FuchsiaDeathTest(statement, regex, file, line);
1385
+ }
1386
+
1203
1387
  # else
1204
1388
 
1205
1389
  if (GTEST_FLAG(death_test_style) == "threadsafe") {
@@ -1224,7 +1408,7 @@ bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex,
1224
1408
  // Recreates the pipe and event handles from the provided parameters,
1225
1409
  // signals the event, and returns a file descriptor wrapped around the pipe
1226
1410
  // handle. This function is called in the child process only.
1227
- int GetStatusFileDescriptor(unsigned int parent_process_id,
1411
+ static int GetStatusFileDescriptor(unsigned int parent_process_id,
1228
1412
  size_t write_handle_as_size_t,
1229
1413
  size_t event_handle_as_size_t) {
1230
1414
  AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE,
@@ -1243,7 +1427,7 @@ int GetStatusFileDescriptor(unsigned int parent_process_id,
1243
1427
  reinterpret_cast<HANDLE>(write_handle_as_size_t);
1244
1428
  HANDLE dup_write_handle;
1245
1429
 
1246
- // The newly initialized handle is accessible only in in the parent
1430
+ // The newly initialized handle is accessible only in the parent
1247
1431
  // process. To obtain one accessible within the child, we need to use
1248
1432
  // DuplicateHandle.
1249
1433
  if (!::DuplicateHandle(parent_process_handle.Get(), write_handle,
@@ -1320,6 +1504,16 @@ InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {
1320
1504
  write_fd = GetStatusFileDescriptor(parent_process_id,
1321
1505
  write_handle_as_size_t,
1322
1506
  event_handle_as_size_t);
1507
+
1508
+ # elif GTEST_OS_FUCHSIA
1509
+
1510
+ if (fields.size() != 3
1511
+ || !ParseNaturalNumber(fields[1], &line)
1512
+ || !ParseNaturalNumber(fields[2], &index)) {
1513
+ DeathTestAbort("Bad --gtest_internal_run_death_test flag: "
1514
+ + GTEST_FLAG(internal_run_death_test));
1515
+ }
1516
+
1323
1517
  # else
1324
1518
 
1325
1519
  if (fields.size() != 4