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
@@ -27,28 +27,18 @@
27
27
  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
28
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
  //
30
- // Authors: keith.ray@gmail.com (Keith Ray)
31
30
  //
32
31
  // Google Test filepath utilities
33
32
  //
34
33
  // This file tests classes and functions used internally by
35
34
  // Google Test. They are subject to change without notice.
36
35
  //
37
- // This file is #included from gtest_unittest.cc, to avoid changing
38
- // build or make-files for some existing Google Test clients. Do not
39
- // #include this file anywhere else!
36
+ // This file is #included from gtest-internal.h.
37
+ // Do not #include this file anywhere else!
40
38
 
41
39
  #include "gtest/internal/gtest-filepath.h"
42
40
  #include "gtest/gtest.h"
43
-
44
- // Indicates that this translation unit is part of Google Test's
45
- // implementation. It must come before gtest-internal-inl.h is
46
- // included, or there will be a compiler error. This trick is to
47
- // prevent a user from accidentally including gtest-internal-inl.h in
48
- // his code.
49
- #define GTEST_IMPLEMENTATION_ 1
50
41
  #include "src/gtest-internal-inl.h"
51
- #undef GTEST_IMPLEMENTATION_
52
42
 
53
43
  #if GTEST_OS_WINDOWS_MOBILE
54
44
  # include <windows.h> // NOLINT
@@ -28,7 +28,7 @@
28
28
  //
29
29
  // Author: vladl@google.com (Vlad Losev)
30
30
  //
31
- // The Google C++ Testing Framework (Google Test)
31
+ // The Google C++ Testing and Mocking Framework (Google Test)
32
32
  //
33
33
  // This file verifies Google Test event listeners receive events at the
34
34
  // right times.
@@ -27,7 +27,6 @@
27
27
  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
28
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
  //
30
- // Authors: keith.ray@gmail.com (Keith Ray)
31
30
  //
32
31
  // Google Test UnitTestOptions tests
33
32
  //
@@ -46,14 +45,7 @@
46
45
  # include <direct.h>
47
46
  #endif // GTEST_OS_WINDOWS_MOBILE
48
47
 
49
- // Indicates that this translation unit is part of Google Test's
50
- // implementation. It must come before gtest-internal-inl.h is
51
- // included, or there will be a compiler error. This trick is to
52
- // prevent a user from accidentally including gtest-internal-inl.h in
53
- // his code.
54
- #define GTEST_IMPLEMENTATION_ 1
55
48
  #include "src/gtest-internal-inl.h"
56
- #undef GTEST_IMPLEMENTATION_
57
49
 
58
50
  namespace testing {
59
51
  namespace internal {
@@ -111,6 +103,8 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
111
103
  _strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
112
104
  _strcmpi("gtest_all_test", exe_str.c_str()) == 0 ||
113
105
  _strcmpi("gtest_dll_test", exe_str.c_str()) == 0;
106
+ #elif GTEST_OS_FUCHSIA
107
+ const bool success = exe_str == "app";
114
108
  #else
115
109
  // TODO(wan@google.com): remove the hard-coded "lt-" prefix when
116
110
  // Chandler Carruth's libtool replacement is ready.
@@ -124,6 +118,8 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
124
118
  FAIL() << "GetCurrentExecutableName() returns " << exe_str;
125
119
  }
126
120
 
121
+ #if !GTEST_OS_FUCHSIA
122
+
127
123
  class XmlOutputChangeDirTest : public Test {
128
124
  protected:
129
125
  virtual void SetUp() {
@@ -210,6 +206,8 @@ TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithAbsolutePath) {
210
206
  #endif
211
207
  }
212
208
 
209
+ #endif // !GTEST_OS_FUCHSIA
210
+
213
211
  } // namespace
214
212
  } // namespace internal
215
213
  } // namespace testing
@@ -33,10 +33,7 @@
33
33
  // Google Test work.
34
34
 
35
35
  #include "gtest/gtest.h"
36
-
37
- #include "test/gtest-param-test_test.h"
38
-
39
- #if GTEST_HAS_PARAM_TEST
36
+ #include "gtest-param-test_test.h"
40
37
 
41
38
  using ::testing::Values;
42
39
  using ::testing::internal::ParamGenerator;
@@ -62,4 +59,3 @@ INSTANTIATE_TEST_CASE_P(Sequence2,
62
59
  InstantiationInMultipleTranslaionUnitsTest,
63
60
  Values(42*3, 42*4, 42*5));
64
61
 
65
- #endif // GTEST_HAS_PARAM_TEST
@@ -35,8 +35,6 @@
35
35
 
36
36
  #include "gtest/gtest.h"
37
37
 
38
- #if GTEST_HAS_PARAM_TEST
39
-
40
38
  # include <algorithm>
41
39
  # include <iostream>
42
40
  # include <list>
@@ -44,11 +42,7 @@
44
42
  # include <string>
45
43
  # include <vector>
46
44
 
47
- // To include gtest-internal-inl.h.
48
- # define GTEST_IMPLEMENTATION_ 1
49
45
  # include "src/gtest-internal-inl.h" // for UnitTestOptions
50
- # undef GTEST_IMPLEMENTATION_
51
-
52
46
  # include "test/gtest-param-test_test.h"
53
47
 
54
48
  using ::std::vector;
@@ -141,7 +135,7 @@ void VerifyGenerator(const ParamGenerator<T>& generator,
141
135
  << ", expected_values[i] is " << PrintValue(expected_values[i])
142
136
  << ", *it is " << PrintValue(*it)
143
137
  << ", and 'it' is an iterator created with the copy constructor.\n";
144
- it++;
138
+ ++it;
145
139
  }
146
140
  EXPECT_TRUE(it == generator.end())
147
141
  << "At the presumed end of sequence when accessing via an iterator "
@@ -161,7 +155,7 @@ void VerifyGenerator(const ParamGenerator<T>& generator,
161
155
  << ", expected_values[i] is " << PrintValue(expected_values[i])
162
156
  << ", *it is " << PrintValue(*it)
163
157
  << ", and 'it' is an iterator created with the copy constructor.\n";
164
- it++;
158
+ ++it;
165
159
  }
166
160
  EXPECT_TRUE(it == generator.end())
167
161
  << "At the presumed end of sequence when accessing via an iterator "
@@ -196,7 +190,7 @@ TEST(IteratorTest, ParamIteratorConformsToForwardIteratorConcept) {
196
190
  << "element same as its source points to";
197
191
 
198
192
  // Verifies that iterator assignment works as expected.
199
- it++;
193
+ ++it;
200
194
  EXPECT_FALSE(*it == *it2);
201
195
  it2 = it;
202
196
  EXPECT_TRUE(*it == *it2) << "Assigned iterators must point to the "
@@ -215,7 +209,7 @@ TEST(IteratorTest, ParamIteratorConformsToForwardIteratorConcept) {
215
209
  // Verifies that prefix and postfix operator++() advance an iterator
216
210
  // all the same.
217
211
  it2 = it;
218
- it++;
212
+ ++it;
219
213
  ++it2;
220
214
  EXPECT_TRUE(*it == *it2);
221
215
  }
@@ -542,6 +536,51 @@ TEST(CombineTest, CombineWithMaxNumberOfParameters) {
542
536
  VerifyGenerator(gen, expected_values);
543
537
  }
544
538
 
539
+ #if GTEST_LANG_CXX11
540
+
541
+ class NonDefaultConstructAssignString {
542
+ public:
543
+ NonDefaultConstructAssignString(const std::string& s) : str_(s) {}
544
+
545
+ const std::string& str() const { return str_; }
546
+
547
+ private:
548
+ std::string str_;
549
+
550
+ // Not default constructible
551
+ NonDefaultConstructAssignString();
552
+ // Not assignable
553
+ void operator=(const NonDefaultConstructAssignString&);
554
+ };
555
+
556
+ TEST(CombineTest, NonDefaultConstructAssign) {
557
+ const ParamGenerator<tuple<int, NonDefaultConstructAssignString> > gen =
558
+ Combine(Values(0, 1), Values(NonDefaultConstructAssignString("A"),
559
+ NonDefaultConstructAssignString("B")));
560
+
561
+ ParamGenerator<tuple<int, NonDefaultConstructAssignString> >::iterator it =
562
+ gen.begin();
563
+
564
+ EXPECT_EQ(0, std::get<0>(*it));
565
+ EXPECT_EQ("A", std::get<1>(*it).str());
566
+ ++it;
567
+
568
+ EXPECT_EQ(0, std::get<0>(*it));
569
+ EXPECT_EQ("B", std::get<1>(*it).str());
570
+ ++it;
571
+
572
+ EXPECT_EQ(1, std::get<0>(*it));
573
+ EXPECT_EQ("A", std::get<1>(*it).str());
574
+ ++it;
575
+
576
+ EXPECT_EQ(1, std::get<0>(*it));
577
+ EXPECT_EQ("B", std::get<1>(*it).str());
578
+ ++it;
579
+
580
+ EXPECT_TRUE(it == gen.end());
581
+ }
582
+
583
+ #endif // GTEST_LANG_CXX11
545
584
  # endif // GTEST_HAS_COMBINE
546
585
 
547
586
  // Tests that an generator produces correct sequence after being
@@ -809,6 +848,34 @@ TEST_P(NamingTest, TestsReportCorrectNamesAndParameters) {
809
848
 
810
849
  INSTANTIATE_TEST_CASE_P(ZeroToFiveSequence, NamingTest, Range(0, 5));
811
850
 
851
+ // Tests that macros in test names are expanded correctly.
852
+ class MacroNamingTest : public TestWithParam<int> {};
853
+
854
+ #define PREFIX_WITH_FOO(test_name) Foo##test_name
855
+ #define PREFIX_WITH_MACRO(test_name) Macro##test_name
856
+
857
+ TEST_P(PREFIX_WITH_MACRO(NamingTest), PREFIX_WITH_FOO(SomeTestName)) {
858
+ const ::testing::TestInfo* const test_info =
859
+ ::testing::UnitTest::GetInstance()->current_test_info();
860
+
861
+ EXPECT_STREQ("FortyTwo/MacroNamingTest", test_info->test_case_name());
862
+ EXPECT_STREQ("FooSomeTestName", test_info->name());
863
+ }
864
+
865
+ INSTANTIATE_TEST_CASE_P(FortyTwo, MacroNamingTest, Values(42));
866
+
867
+ // Tests the same thing for non-parametrized tests.
868
+ class MacroNamingTestNonParametrized : public ::testing::Test {};
869
+
870
+ TEST_F(PREFIX_WITH_MACRO(NamingTestNonParametrized),
871
+ PREFIX_WITH_FOO(SomeTestName)) {
872
+ const ::testing::TestInfo* const test_info =
873
+ ::testing::UnitTest::GetInstance()->current_test_info();
874
+
875
+ EXPECT_STREQ("MacroNamingTestNonParametrized", test_info->test_case_name());
876
+ EXPECT_STREQ("FooSomeTestName", test_info->name());
877
+ }
878
+
812
879
  // Tests that user supplied custom parameter names are working correctly.
813
880
  // Runs the test with a builtin helper method which uses PrintToString,
814
881
  // as well as a custom function and custom functor to ensure all possible
@@ -817,8 +884,8 @@ class CustomFunctorNamingTest : public TestWithParam<std::string> {};
817
884
  TEST_P(CustomFunctorNamingTest, CustomTestNames) {}
818
885
 
819
886
  struct CustomParamNameFunctor {
820
- std::string operator()(const ::testing::TestParamInfo<std::string>& info) {
821
- return info.param;
887
+ std::string operator()(const ::testing::TestParamInfo<std::string>& inf) {
888
+ return inf.param;
822
889
  }
823
890
  };
824
891
 
@@ -835,8 +902,8 @@ INSTANTIATE_TEST_CASE_P(AllAllowedCharacters,
835
902
  CustomParamNameFunctor());
836
903
 
837
904
  inline std::string CustomParamNameFunction(
838
- const ::testing::TestParamInfo<std::string>& info) {
839
- return info.param;
905
+ const ::testing::TestParamInfo<std::string>& inf) {
906
+ return inf.param;
840
907
  }
841
908
 
842
909
  class CustomFunctionNamingTest : public TestWithParam<std::string> {};
@@ -854,11 +921,10 @@ INSTANTIATE_TEST_CASE_P(CustomParamNameFunction,
854
921
  class CustomLambdaNamingTest : public TestWithParam<std::string> {};
855
922
  TEST_P(CustomLambdaNamingTest, CustomTestNames) {}
856
923
 
857
- INSTANTIATE_TEST_CASE_P(CustomParamNameLambda,
858
- CustomLambdaNamingTest,
924
+ INSTANTIATE_TEST_CASE_P(CustomParamNameLambda, CustomLambdaNamingTest,
859
925
  Values(std::string("LambdaName")),
860
- [](const ::testing::TestParamInfo<std::string>& info) {
861
- return info.param;
926
+ [](const ::testing::TestParamInfo<std::string>& inf) {
927
+ return inf.param;
862
928
  });
863
929
 
864
930
  #endif // GTEST_LANG_CXX11
@@ -1025,31 +1091,20 @@ TEST_F(ParameterizedDeathTest, GetParamDiesFromTestF) {
1025
1091
 
1026
1092
  INSTANTIATE_TEST_CASE_P(RangeZeroToFive, ParameterizedDerivedTest, Range(0, 5));
1027
1093
 
1028
- #endif // GTEST_HAS_PARAM_TEST
1029
-
1030
- TEST(CompileTest, CombineIsDefinedOnlyWhenGtestHasParamTestIsDefined) {
1031
- #if GTEST_HAS_COMBINE && !GTEST_HAS_PARAM_TEST
1032
- FAIL() << "GTEST_HAS_COMBINE is defined while GTEST_HAS_PARAM_TEST is not\n"
1033
- #endif
1034
- }
1035
1094
 
1036
1095
  int main(int argc, char **argv) {
1037
- #if GTEST_HAS_PARAM_TEST
1038
1096
  // Used in TestGenerationTest test case.
1039
1097
  AddGlobalTestEnvironment(TestGenerationTest::Environment::Instance());
1040
1098
  // Used in GeneratorEvaluationTest test case. Tests that the updated value
1041
1099
  // will be picked up for instantiating tests in GeneratorEvaluationTest.
1042
1100
  GeneratorEvaluationTest::set_param_value(1);
1043
- #endif // GTEST_HAS_PARAM_TEST
1044
1101
 
1045
1102
  ::testing::InitGoogleTest(&argc, argv);
1046
1103
 
1047
- #if GTEST_HAS_PARAM_TEST
1048
1104
  // Used in GeneratorEvaluationTest test case. Tests that value updated
1049
1105
  // here will NOT be used for instantiating tests in
1050
1106
  // GeneratorEvaluationTest.
1051
1107
  GeneratorEvaluationTest::set_param_value(2);
1052
- #endif // GTEST_HAS_PARAM_TEST
1053
1108
 
1054
1109
  return RUN_ALL_TESTS();
1055
1110
  }
@@ -29,7 +29,7 @@
29
29
  //
30
30
  // Authors: vladl@google.com (Vlad Losev)
31
31
  //
32
- // The Google C++ Testing Framework (Google Test)
32
+ // The Google C++ Testing and Mocking Framework (Google Test)
33
33
  //
34
34
  // This header file provides classes and functions used internally
35
35
  // for testing Google Test itself.
@@ -39,8 +39,6 @@
39
39
 
40
40
  #include "gtest/gtest.h"
41
41
 
42
- #if GTEST_HAS_PARAM_TEST
43
-
44
42
  // Test fixture for testing definition and instantiation of a test
45
43
  // in separate translation units.
46
44
  class ExternalInstantiationTest : public ::testing::TestWithParam<int> {
@@ -52,6 +50,4 @@ class InstantiationInMultipleTranslaionUnitsTest
52
50
  : public ::testing::TestWithParam<int> {
53
51
  };
54
52
 
55
- #endif // GTEST_HAS_PARAM_TEST
56
-
57
53
  #endif // GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
@@ -45,15 +45,7 @@
45
45
 
46
46
  #include "gtest/gtest.h"
47
47
  #include "gtest/gtest-spi.h"
48
-
49
- // Indicates that this translation unit is part of Google Test's
50
- // implementation. It must come before gtest-internal-inl.h is
51
- // included, or there will be a compiler error. This trick is to
52
- // prevent a user from accidentally including gtest-internal-inl.h in
53
- // his code.
54
- #define GTEST_IMPLEMENTATION_ 1
55
48
  #include "src/gtest-internal-inl.h"
56
- #undef GTEST_IMPLEMENTATION_
57
49
 
58
50
  using std::make_pair;
59
51
  using std::pair;
@@ -75,7 +67,7 @@ TEST(IsXDigitTest, WorksForNarrowAscii) {
75
67
  }
76
68
 
77
69
  TEST(IsXDigitTest, ReturnsFalseForNarrowNonAscii) {
78
- EXPECT_FALSE(IsXDigit('\x80'));
70
+ EXPECT_FALSE(IsXDigit(static_cast<char>('\x80')));
79
71
  EXPECT_FALSE(IsXDigit(static_cast<char>('0' | '\x80')));
80
72
  }
81
73
 
@@ -304,7 +296,7 @@ TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFileAndLine) {
304
296
  EXPECT_EQ("unknown file", FormatCompilerIndependentFileLocation(NULL, -1));
305
297
  }
306
298
 
307
- #if GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_QNX
299
+ #if GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_QNX || GTEST_OS_FUCHSIA
308
300
  void* ThreadFunc(void* data) {
309
301
  internal::Mutex* mutex = static_cast<internal::Mutex*>(data);
310
302
  mutex->Lock();
@@ -348,7 +340,7 @@ TEST(GetThreadCountTest, ReturnsCorrectValue) {
348
340
  TEST(GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads) {
349
341
  EXPECT_EQ(0U, GetThreadCount());
350
342
  }
351
- #endif // GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_QNX
343
+ #endif // GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_QNX || GTEST_OS_FUCHSIA
352
344
 
353
345
  TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure) {
354
346
  const bool a_false_condition = false;
@@ -1209,7 +1201,7 @@ class DestructorTracker {
1209
1201
  : index_(GetNewIndex()) {}
1210
1202
  ~DestructorTracker() {
1211
1203
  // We never access DestructorCall::List() concurrently, so we don't need
1212
- // to protect this acccess with a mutex.
1204
+ // to protect this access with a mutex.
1213
1205
  DestructorCall::List()[index_]->ReportDestroyed();
1214
1206
  }
1215
1207
 
@@ -1295,9 +1287,16 @@ TEST(WindowsTypesTest, HANDLEIsVoidStar) {
1295
1287
  StaticAssertTypeEq<HANDLE, void*>();
1296
1288
  }
1297
1289
 
1290
+ #if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR)
1291
+ TEST(WindowsTypesTest, _CRITICAL_SECTIONIs_CRITICAL_SECTION) {
1292
+ StaticAssertTypeEq<CRITICAL_SECTION, _CRITICAL_SECTION>();
1293
+ }
1294
+ #else
1298
1295
  TEST(WindowsTypesTest, CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION) {
1299
1296
  StaticAssertTypeEq<CRITICAL_SECTION, _RTL_CRITICAL_SECTION>();
1300
1297
  }
1298
+ #endif
1299
+
1301
1300
  #endif // GTEST_OS_WINDOWS
1302
1301
 
1303
1302
  } // namespace internal
@@ -29,7 +29,7 @@
29
29
  //
30
30
  // Author: wan@google.com (Zhanyong Wan)
31
31
 
32
- // Google Test - The Google C++ Testing Framework
32
+ // Google Test - The Google C++ Testing and Mocking Framework
33
33
  //
34
34
  // This file tests the universal value printer.
35
35
 
@@ -50,13 +50,13 @@
50
50
 
51
51
  #include "gtest/gtest.h"
52
52
 
53
- // hash_map and hash_set are available under Visual C++, or on Linux.
54
- #if GTEST_HAS_HASH_MAP_
55
- # include <hash_map> // NOLINT
56
- #endif // GTEST_HAS_HASH_MAP_
57
- #if GTEST_HAS_HASH_SET_
58
- # include <hash_set> // NOLINT
59
- #endif // GTEST_HAS_HASH_SET_
53
+ #if GTEST_HAS_UNORDERED_MAP_
54
+ # include <unordered_map> // NOLINT
55
+ #endif // GTEST_HAS_UNORDERED_MAP_
56
+
57
+ #if GTEST_HAS_UNORDERED_SET_
58
+ # include <unordered_set> // NOLINT
59
+ #endif // GTEST_HAS_UNORDERED_SET_
60
60
 
61
61
  #if GTEST_HAS_STD_FORWARD_LIST_
62
62
  # include <forward_list> // NOLINT
@@ -187,6 +187,25 @@ inline ::std::ostream& operator<<(::std::ostream& os,
187
187
  return os << "StreamableTemplateInFoo: " << x.value();
188
188
  }
189
189
 
190
+ // A user-defined streamable but recursivly-defined container type in
191
+ // a user namespace, it mimics therefore std::filesystem::path or
192
+ // boost::filesystem::path.
193
+ class PathLike {
194
+ public:
195
+ struct iterator {
196
+ typedef PathLike value_type;
197
+ };
198
+
199
+ PathLike() {}
200
+
201
+ iterator begin() const { return iterator(); }
202
+ iterator end() const { return iterator(); }
203
+
204
+ friend ::std::ostream& operator<<(::std::ostream& os, const PathLike&) {
205
+ return os << "Streamable-PathLike";
206
+ }
207
+ };
208
+
190
209
  } // namespace foo
191
210
 
192
211
  namespace testing {
@@ -211,28 +230,14 @@ using ::testing::internal::Strings;
211
230
  using ::testing::internal::UniversalPrint;
212
231
  using ::testing::internal::UniversalPrinter;
213
232
  using ::testing::internal::UniversalTersePrint;
233
+ #if GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_
214
234
  using ::testing::internal::UniversalTersePrintTupleFieldsToStrings;
215
- using ::testing::internal::string;
216
-
217
- // The hash_* classes are not part of the C++ standard. STLport
218
- // defines them in namespace std. MSVC defines them in ::stdext. GCC
219
- // defines them in ::.
220
- #ifdef _STLP_HASH_MAP // We got <hash_map> from STLport.
221
- using ::std::hash_map;
222
- using ::std::hash_set;
223
- using ::std::hash_multimap;
224
- using ::std::hash_multiset;
225
- #elif _MSC_VER
226
- using ::stdext::hash_map;
227
- using ::stdext::hash_set;
228
- using ::stdext::hash_multimap;
229
- using ::stdext::hash_multiset;
230
235
  #endif
231
236
 
232
237
  // Prints a value to a string using the universal value printer. This
233
238
  // is a helper for testing UniversalPrinter<T>::Print() for various types.
234
239
  template <typename T>
235
- string Print(const T& value) {
240
+ std::string Print(const T& value) {
236
241
  ::std::stringstream ss;
237
242
  UniversalPrinter<T>::Print(value, &ss);
238
243
  return ss.str();
@@ -242,7 +247,7 @@ string Print(const T& value) {
242
247
  // value printer. This is a helper for testing
243
248
  // UniversalPrinter<T&>::Print() for various types.
244
249
  template <typename T>
245
- string PrintByRef(const T& value) {
250
+ std::string PrintByRef(const T& value) {
246
251
  ::std::stringstream ss;
247
252
  UniversalPrinter<T&>::Print(value, &ss);
248
253
  return ss.str();
@@ -379,7 +384,7 @@ TEST(PrintBuiltInTypeTest, FloatingPoints) {
379
384
  // Since ::std::stringstream::operator<<(const void *) formats the pointer
380
385
  // output differently with different compilers, we have to create the expected
381
386
  // output first and use it as our expectation.
382
- static string PrintPointer(const void *p) {
387
+ static std::string PrintPointer(const void* p) {
383
388
  ::std::stringstream expected_result_stream;
384
389
  expected_result_stream << p;
385
390
  return expected_result_stream.str();
@@ -592,7 +597,7 @@ TEST(PrintPointerTest, MemberFunctionPointer) {
592
597
  // The difference between this and Print() is that it ensures that the
593
598
  // argument is a reference to an array.
594
599
  template <typename T, size_t N>
595
- string PrintArrayHelper(T (&a)[N]) {
600
+ std::string PrintArrayHelper(T (&a)[N]) {
596
601
  return Print(a);
597
602
  }
598
603
 
@@ -645,7 +650,7 @@ TEST(PrintArrayTest, WConstCharArrayWithTerminatingNul) {
645
650
 
646
651
  // Array of objects.
647
652
  TEST(PrintArrayTest, ObjectArray) {
648
- string a[3] = { "Hi", "Hello", "Ni hao" };
653
+ std::string a[3] = {"Hi", "Hello", "Ni hao"};
649
654
  EXPECT_EQ("{ \"Hi\", \"Hello\", \"Ni hao\" }", PrintArrayHelper(a));
650
655
  }
651
656
 
@@ -782,22 +787,22 @@ TEST(PrintTypeWithGenericStreamingTest, TypeImplicitlyConvertible) {
782
787
  EXPECT_EQ("AllowsGenericStreamingAndImplicitConversionTemplate", Print(a));
783
788
  }
784
789
 
785
- #if GTEST_HAS_STRING_PIECE_
790
+ #if GTEST_HAS_ABSL
786
791
 
787
- // Tests printing StringPiece.
792
+ // Tests printing ::absl::string_view.
788
793
 
789
- TEST(PrintStringPieceTest, SimpleStringPiece) {
790
- const StringPiece sp = "Hello";
794
+ TEST(PrintStringViewTest, SimpleStringView) {
795
+ const ::absl::string_view sp = "Hello";
791
796
  EXPECT_EQ("\"Hello\"", Print(sp));
792
797
  }
793
798
 
794
- TEST(PrintStringPieceTest, UnprintableCharacters) {
799
+ TEST(PrintStringViewTest, UnprintableCharacters) {
795
800
  const char str[] = "NUL (\0) and \r\t";
796
- const StringPiece sp(str, sizeof(str) - 1);
801
+ const ::absl::string_view sp(str, sizeof(str) - 1);
797
802
  EXPECT_EQ("\"NUL (\\0) and \\r\\t\"", Print(sp));
798
803
  }
799
804
 
800
- #endif // GTEST_HAS_STRING_PIECE_
805
+ #endif // GTEST_HAS_ABSL
801
806
 
802
807
  // Tests printing STL containers.
803
808
 
@@ -813,44 +818,44 @@ TEST(PrintStlContainerTest, NonEmptyDeque) {
813
818
  EXPECT_EQ("{ 1, 3 }", Print(non_empty));
814
819
  }
815
820
 
816
- #if GTEST_HAS_HASH_MAP_
821
+ #if GTEST_HAS_UNORDERED_MAP_
817
822
 
818
823
  TEST(PrintStlContainerTest, OneElementHashMap) {
819
- hash_map<int, char> map1;
824
+ ::std::unordered_map<int, char> map1;
820
825
  map1[1] = 'a';
821
826
  EXPECT_EQ("{ (1, 'a' (97, 0x61)) }", Print(map1));
822
827
  }
823
828
 
824
829
  TEST(PrintStlContainerTest, HashMultiMap) {
825
- hash_multimap<int, bool> map1;
830
+ ::std::unordered_multimap<int, bool> map1;
826
831
  map1.insert(make_pair(5, true));
827
832
  map1.insert(make_pair(5, false));
828
833
 
829
834
  // Elements of hash_multimap can be printed in any order.
830
- const string result = Print(map1);
835
+ const std::string result = Print(map1);
831
836
  EXPECT_TRUE(result == "{ (5, true), (5, false) }" ||
832
837
  result == "{ (5, false), (5, true) }")
833
838
  << " where Print(map1) returns \"" << result << "\".";
834
839
  }
835
840
 
836
- #endif // GTEST_HAS_HASH_MAP_
841
+ #endif // GTEST_HAS_UNORDERED_MAP_
837
842
 
838
- #if GTEST_HAS_HASH_SET_
843
+ #if GTEST_HAS_UNORDERED_SET_
839
844
 
840
845
  TEST(PrintStlContainerTest, HashSet) {
841
- hash_set<string> set1;
842
- set1.insert("hello");
843
- EXPECT_EQ("{ \"hello\" }", Print(set1));
846
+ ::std::unordered_set<int> set1;
847
+ set1.insert(1);
848
+ EXPECT_EQ("{ 1 }", Print(set1));
844
849
  }
845
850
 
846
851
  TEST(PrintStlContainerTest, HashMultiSet) {
847
852
  const int kSize = 5;
848
853
  int a[kSize] = { 1, 1, 2, 5, 1 };
849
- hash_multiset<int> set1(a, a + kSize);
854
+ ::std::unordered_multiset<int> set1(a, a + kSize);
850
855
 
851
856
  // Elements of hash_multiset can be printed in any order.
852
- const string result = Print(set1);
853
- const string expected_pattern = "{ d, d, d, d, d }"; // d means a digit.
857
+ const std::string result = Print(set1);
858
+ const std::string expected_pattern = "{ d, d, d, d, d }"; // d means a digit.
854
859
 
855
860
  // Verifies the result matches the expected pattern; also extracts
856
861
  // the numbers in the result.
@@ -872,14 +877,11 @@ TEST(PrintStlContainerTest, HashMultiSet) {
872
877
  EXPECT_TRUE(std::equal(a, a + kSize, numbers.begin()));
873
878
  }
874
879
 
875
- #endif // GTEST_HAS_HASH_SET_
880
+ #endif // GTEST_HAS_UNORDERED_SET_
876
881
 
877
882
  TEST(PrintStlContainerTest, List) {
878
- const string a[] = {
879
- "hello",
880
- "world"
881
- };
882
- const list<string> strings(a, a + 2);
883
+ const std::string a[] = {"hello", "world"};
884
+ const list<std::string> strings(a, a + 2);
883
885
  EXPECT_EQ("{ \"hello\", \"world\" }", Print(strings));
884
886
  }
885
887
 
@@ -1035,8 +1037,9 @@ TEST(PrintTr1TupleTest, VariousSizes) {
1035
1037
  // VC++ 2010's implementation of tuple of C++0x is deficient, requiring
1036
1038
  // an explicit type cast of NULL to be used.
1037
1039
  ::std::tr1::tuple<bool, char, short, testing::internal::Int32, // NOLINT
1038
- testing::internal::Int64, float, double, const char*, void*, string>
1039
- t10(false, 'a', 3, 4, 5, 1.5F, -2.5, str,
1040
+ testing::internal::Int64, float, double, const char*, void*,
1041
+ std::string>
1042
+ t10(false, 'a', static_cast<short>(3), 4, 5, 1.5F, -2.5, str, // NOLINT
1040
1043
  ImplicitCast_<void*>(NULL), "10");
1041
1044
  EXPECT_EQ("(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, " + PrintPointer(str) +
1042
1045
  " pointing to \"8\", NULL, \"10\")",
@@ -1094,8 +1097,9 @@ TEST(PrintStdTupleTest, VariousSizes) {
1094
1097
  // VC++ 2010's implementation of tuple of C++0x is deficient, requiring
1095
1098
  // an explicit type cast of NULL to be used.
1096
1099
  ::std::tuple<bool, char, short, testing::internal::Int32, // NOLINT
1097
- testing::internal::Int64, float, double, const char*, void*, string>
1098
- t10(false, 'a', 3, 4, 5, 1.5F, -2.5, str,
1100
+ testing::internal::Int64, float, double, const char*, void*,
1101
+ std::string>
1102
+ t10(false, 'a', static_cast<short>(3), 4, 5, 1.5F, -2.5, str, // NOLINT
1099
1103
  ImplicitCast_<void*>(NULL), "10");
1100
1104
  EXPECT_EQ("(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, " + PrintPointer(str) +
1101
1105
  " pointing to \"8\", NULL, \"10\")",
@@ -1111,6 +1115,12 @@ TEST(PrintStdTupleTest, NestedTuple) {
1111
1115
 
1112
1116
  #endif // GTEST_LANG_CXX11
1113
1117
 
1118
+ #if GTEST_LANG_CXX11
1119
+ TEST(PrintNullptrT, Basic) {
1120
+ EXPECT_EQ("(nullptr)", Print(nullptr));
1121
+ }
1122
+ #endif // GTEST_LANG_CXX11
1123
+
1114
1124
  // Tests printing user-defined unprintable types.
1115
1125
 
1116
1126
  // Unprintable types in the global namespace.
@@ -1158,6 +1168,15 @@ TEST(PrintStreamableTypeTest, TemplateTypeInUserNamespace) {
1158
1168
  Print(::foo::StreamableTemplateInFoo<int>()));
1159
1169
  }
1160
1170
 
1171
+ // Tests printing a user-defined recursive container type that has a <<
1172
+ // operator.
1173
+ TEST(PrintStreamableTypeTest, PathLikeInUserNamespace) {
1174
+ ::foo::PathLike x;
1175
+ EXPECT_EQ("Streamable-PathLike", Print(x));
1176
+ const ::foo::PathLike cx;
1177
+ EXPECT_EQ("Streamable-PathLike", Print(cx));
1178
+ }
1179
+
1161
1180
  // Tests printing user-defined types that have a PrintTo() function.
1162
1181
  TEST(PrintPrintableTypeTest, InUserNamespace) {
1163
1182
  EXPECT_EQ("PrintableViaPrintTo: 0",
@@ -1200,13 +1219,13 @@ TEST(PrintReferenceTest, PrintsAddressAndValue) {
1200
1219
  // reference.
1201
1220
  TEST(PrintReferenceTest, HandlesFunctionPointer) {
1202
1221
  void (*fp)(int n) = &MyFunction;
1203
- const string fp_pointer_string =
1222
+ const std::string fp_pointer_string =
1204
1223
  PrintPointer(reinterpret_cast<const void*>(&fp));
1205
1224
  // We cannot directly cast &MyFunction to const void* because the
1206
1225
  // standard disallows casting between pointers to functions and
1207
1226
  // pointers to objects, and some compilers (e.g. GCC 3.4) enforce
1208
1227
  // this limitation.
1209
- const string fp_string = PrintPointer(reinterpret_cast<const void*>(
1228
+ const std::string fp_string = PrintPointer(reinterpret_cast<const void*>(
1210
1229
  reinterpret_cast<internal::BiggestInt>(fp)));
1211
1230
  EXPECT_EQ("@" + fp_pointer_string + " " + fp_string,
1212
1231
  PrintByRef(fp));
@@ -1264,7 +1283,7 @@ TEST(FormatForComparisonFailureMessageTest, FormatsNonCharArrayAsPointer) {
1264
1283
  }
1265
1284
 
1266
1285
  // Tests formatting a char pointer when it's compared with another pointer.
1267
- // In this case we want to print it as a raw pointer, as the comparision is by
1286
+ // In this case we want to print it as a raw pointer, as the comparison is by
1268
1287
  // pointer.
1269
1288
 
1270
1289
  // char pointer vs pointer
@@ -1489,6 +1508,78 @@ TEST(PrintToStringTest, WorksForCharArrayWithEmbeddedNul) {
1489
1508
  EXPECT_PRINT_TO_STRING_(mutable_str_with_nul, "\"hello\\0 world\"");
1490
1509
  }
1491
1510
 
1511
+ TEST(PrintToStringTest, ContainsNonLatin) {
1512
+ // Sanity test with valid UTF-8. Prints both in hex and as text.
1513
+ std::string non_ascii_str = ::std::string("오전 4:30");
1514
+ EXPECT_PRINT_TO_STRING_(non_ascii_str,
1515
+ "\"\\xEC\\x98\\xA4\\xEC\\xA0\\x84 4:30\"\n"
1516
+ " As Text: \"오전 4:30\"");
1517
+ non_ascii_str = ::std::string("From ä — ẑ");
1518
+ EXPECT_PRINT_TO_STRING_(non_ascii_str,
1519
+ "\"From \\xC3\\xA4 \\xE2\\x80\\x94 \\xE1\\xBA\\x91\""
1520
+ "\n As Text: \"From ä — ẑ\"");
1521
+ }
1522
+
1523
+ TEST(IsValidUTF8Test, IllFormedUTF8) {
1524
+ // The following test strings are ill-formed UTF-8 and are printed
1525
+ // as hex only (or ASCII, in case of ASCII bytes) because IsValidUTF8() is
1526
+ // expected to fail, thus output does not contain "As Text:".
1527
+
1528
+ static const char *const kTestdata[][2] = {
1529
+ // 2-byte lead byte followed by a single-byte character.
1530
+ {"\xC3\x74", "\"\\xC3t\""},
1531
+ // Valid 2-byte character followed by an orphan trail byte.
1532
+ {"\xC3\x84\xA4", "\"\\xC3\\x84\\xA4\""},
1533
+ // Lead byte without trail byte.
1534
+ {"abc\xC3", "\"abc\\xC3\""},
1535
+ // 3-byte lead byte, single-byte character, orphan trail byte.
1536
+ {"x\xE2\x70\x94", "\"x\\xE2p\\x94\""},
1537
+ // Truncated 3-byte character.
1538
+ {"\xE2\x80", "\"\\xE2\\x80\""},
1539
+ // Truncated 3-byte character followed by valid 2-byte char.
1540
+ {"\xE2\x80\xC3\x84", "\"\\xE2\\x80\\xC3\\x84\""},
1541
+ // Truncated 3-byte character followed by a single-byte character.
1542
+ {"\xE2\x80\x7A", "\"\\xE2\\x80z\""},
1543
+ // 3-byte lead byte followed by valid 3-byte character.
1544
+ {"\xE2\xE2\x80\x94", "\"\\xE2\\xE2\\x80\\x94\""},
1545
+ // 4-byte lead byte followed by valid 3-byte character.
1546
+ {"\xF0\xE2\x80\x94", "\"\\xF0\\xE2\\x80\\x94\""},
1547
+ // Truncated 4-byte character.
1548
+ {"\xF0\xE2\x80", "\"\\xF0\\xE2\\x80\""},
1549
+ // Invalid UTF-8 byte sequences embedded in other chars.
1550
+ {"abc\xE2\x80\x94\xC3\x74xyc", "\"abc\\xE2\\x80\\x94\\xC3txyc\""},
1551
+ {"abc\xC3\x84\xE2\x80\xC3\x84xyz",
1552
+ "\"abc\\xC3\\x84\\xE2\\x80\\xC3\\x84xyz\""},
1553
+ // Non-shortest UTF-8 byte sequences are also ill-formed.
1554
+ // The classics: xC0, xC1 lead byte.
1555
+ {"\xC0\x80", "\"\\xC0\\x80\""},
1556
+ {"\xC1\x81", "\"\\xC1\\x81\""},
1557
+ // Non-shortest sequences.
1558
+ {"\xE0\x80\x80", "\"\\xE0\\x80\\x80\""},
1559
+ {"\xf0\x80\x80\x80", "\"\\xF0\\x80\\x80\\x80\""},
1560
+ // Last valid code point before surrogate range, should be printed as text,
1561
+ // too.
1562
+ {"\xED\x9F\xBF", "\"\\xED\\x9F\\xBF\"\n As Text: \"퟿\""},
1563
+ // Start of surrogate lead. Surrogates are not printed as text.
1564
+ {"\xED\xA0\x80", "\"\\xED\\xA0\\x80\""},
1565
+ // Last non-private surrogate lead.
1566
+ {"\xED\xAD\xBF", "\"\\xED\\xAD\\xBF\""},
1567
+ // First private-use surrogate lead.
1568
+ {"\xED\xAE\x80", "\"\\xED\\xAE\\x80\""},
1569
+ // Last private-use surrogate lead.
1570
+ {"\xED\xAF\xBF", "\"\\xED\\xAF\\xBF\""},
1571
+ // Mid-point of surrogate trail.
1572
+ {"\xED\xB3\xBF", "\"\\xED\\xB3\\xBF\""},
1573
+ // First valid code point after surrogate range, should be printed as text,
1574
+ // too.
1575
+ {"\xEE\x80\x80", "\"\\xEE\\x80\\x80\"\n As Text: \"\""}
1576
+ };
1577
+
1578
+ for (int i = 0; i < int(sizeof(kTestdata)/sizeof(kTestdata[0])); ++i) {
1579
+ EXPECT_PRINT_TO_STRING_(kTestdata[i][0], kTestdata[i][1]);
1580
+ }
1581
+ }
1582
+
1492
1583
  #undef EXPECT_PRINT_TO_STRING_
1493
1584
 
1494
1585
  TEST(UniversalTersePrintTest, WorksForNonReference) {
@@ -1538,12 +1629,12 @@ TEST(UniversalPrintTest, WorksForCString) {
1538
1629
  const char* s1 = "abc";
1539
1630
  ::std::stringstream ss1;
1540
1631
  UniversalPrint(s1, &ss1);
1541
- EXPECT_EQ(PrintPointer(s1) + " pointing to \"abc\"", string(ss1.str()));
1632
+ EXPECT_EQ(PrintPointer(s1) + " pointing to \"abc\"", std::string(ss1.str()));
1542
1633
 
1543
1634
  char* s2 = const_cast<char*>(s1);
1544
1635
  ::std::stringstream ss2;
1545
1636
  UniversalPrint(s2, &ss2);
1546
- EXPECT_EQ(PrintPointer(s2) + " pointing to \"abc\"", string(ss2.str()));
1637
+ EXPECT_EQ(PrintPointer(s2) + " pointing to \"abc\"", std::string(ss2.str()));
1547
1638
 
1548
1639
  const char* s3 = NULL;
1549
1640
  ::std::stringstream ss3;
@@ -1630,6 +1721,17 @@ TEST(UniversalTersePrintTupleFieldsToStringsTestWithStd, PrintsTersely) {
1630
1721
 
1631
1722
  #endif // GTEST_HAS_STD_TUPLE_
1632
1723
 
1724
+ #if GTEST_HAS_ABSL
1725
+
1726
+ TEST(PrintOptionalTest, Basic) {
1727
+ absl::optional<int> value;
1728
+ EXPECT_EQ("(nullopt)", PrintToString(value));
1729
+ value = {7};
1730
+ EXPECT_EQ("(7)", PrintToString(value));
1731
+ EXPECT_EQ("(1.1)", PrintToString(absl::optional<double>{1.1}));
1732
+ EXPECT_EQ("(\"A\")", PrintToString(absl::optional<std::string>{"A"}));
1733
+ }
1734
+ #endif // GTEST_HAS_ABSL
1735
+
1633
1736
  } // namespace gtest_printers_test
1634
1737
  } // namespace testing
1635
-