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
@@ -45,14 +45,9 @@ $var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
45
45
  #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
46
46
  #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
47
47
 
48
- // scripts/fuse_gtest.py depends on gtest's own header being #included
49
- // *unconditionally*. Therefore these #includes cannot be moved
50
- // inside #if GTEST_HAS_PARAM_TEST.
51
48
  #include "gtest/internal/gtest-param-util.h"
52
49
  #include "gtest/internal/gtest-port.h"
53
50
 
54
- #if GTEST_HAS_PARAM_TEST
55
-
56
51
  namespace testing {
57
52
 
58
53
  // Forward declarations of ValuesIn(), which is implemented in
@@ -165,7 +160,7 @@ $for k [[
165
160
  virtual ParamIteratorInterface<ParamType>* Clone() const {
166
161
  return new Iterator(*this);
167
162
  }
168
- virtual const ParamType* Current() const { return &current_value_; }
163
+ virtual const ParamType* Current() const { return current_value_.get(); }
169
164
  virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
170
165
  // Having the same base generator guarantees that the other
171
166
  // iterator is of the same type and we can downcast.
@@ -197,7 +192,7 @@ $for k [[
197
192
 
198
193
  void ComputeCurrentValue() {
199
194
  if (!AtEnd())
200
- current_value_ = ParamType($for j, [[*current$(j)_]]);
195
+ current_value_.reset(new ParamType($for j, [[*current$(j)_]]));
201
196
  }
202
197
  bool AtEnd() const {
203
198
  // We must report iterator past the end of the range when either of the
@@ -222,7 +217,7 @@ $for j [[
222
217
  typename ParamGenerator<T$j>::iterator current$(j)_;
223
218
  ]]
224
219
 
225
- ParamType current_value_;
220
+ linked_ptr<ParamType> current_value_;
226
221
  }; // class CartesianProductGenerator$i::Iterator
227
222
 
228
223
  // No implementation - assignment is unsupported.
@@ -281,6 +276,4 @@ $for j [[
281
276
  } // namespace internal
282
277
  } // namespace testing
283
278
 
284
- #endif // GTEST_HAS_PARAM_TEST
285
-
286
279
  #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
@@ -41,16 +41,11 @@
41
41
  #include <utility>
42
42
  #include <vector>
43
43
 
44
- // scripts/fuse_gtest.py depends on gtest's own header being #included
45
- // *unconditionally*. Therefore these #includes cannot be moved
46
- // inside #if GTEST_HAS_PARAM_TEST.
47
44
  #include "gtest/internal/gtest-internal.h"
48
45
  #include "gtest/internal/gtest-linked_ptr.h"
49
46
  #include "gtest/internal/gtest-port.h"
50
47
  #include "gtest/gtest-printers.h"
51
48
 
52
- #if GTEST_HAS_PARAM_TEST
53
-
54
49
  namespace testing {
55
50
 
56
51
  // Input to a parameterized test name generator, describing a test parameter.
@@ -472,7 +467,7 @@ class ParameterizedTestCaseInfoBase {
472
467
  virtual ~ParameterizedTestCaseInfoBase() {}
473
468
 
474
469
  // Base part of test case name for display purposes.
475
- virtual const string& GetTestCaseName() const = 0;
470
+ virtual const std::string& GetTestCaseName() const = 0;
476
471
  // Test case id to verify identity.
477
472
  virtual TypeId GetTestCaseTypeId() const = 0;
478
473
  // UnitTest class invokes this method to register tests in this
@@ -511,7 +506,7 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
511
506
  : test_case_name_(name), code_location_(code_location) {}
512
507
 
513
508
  // Test case base name for display purposes.
514
- virtual const string& GetTestCaseName() const { return test_case_name_; }
509
+ virtual const std::string& GetTestCaseName() const { return test_case_name_; }
515
510
  // Test case id to verify identity.
516
511
  virtual TypeId GetTestCaseTypeId() const { return GetTypeId<TestCase>(); }
517
512
  // TEST_P macro uses AddTestPattern() to record information
@@ -529,11 +524,10 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
529
524
  }
530
525
  // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information
531
526
  // about a generator.
532
- int AddTestCaseInstantiation(const string& instantiation_name,
527
+ int AddTestCaseInstantiation(const std::string& instantiation_name,
533
528
  GeneratorCreationFunc* func,
534
529
  ParamNameGeneratorFunc* name_func,
535
- const char* file,
536
- int line) {
530
+ const char* file, int line) {
537
531
  instantiations_.push_back(
538
532
  InstantiationInfo(instantiation_name, func, name_func, file, line));
539
533
  return 0; // Return value used only to run this method in namespace scope.
@@ -550,13 +544,13 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
550
544
  for (typename InstantiationContainer::iterator gen_it =
551
545
  instantiations_.begin(); gen_it != instantiations_.end();
552
546
  ++gen_it) {
553
- const string& instantiation_name = gen_it->name;
547
+ const std::string& instantiation_name = gen_it->name;
554
548
  ParamGenerator<ParamType> generator((*gen_it->generator)());
555
549
  ParamNameGeneratorFunc* name_func = gen_it->name_func;
556
550
  const char* file = gen_it->file;
557
551
  int line = gen_it->line;
558
552
 
559
- string test_case_name;
553
+ std::string test_case_name;
560
554
  if ( !instantiation_name.empty() )
561
555
  test_case_name = instantiation_name + "/";
562
556
  test_case_name += test_info->test_case_base_name;
@@ -609,8 +603,8 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
609
603
  test_base_name(a_test_base_name),
610
604
  test_meta_factory(a_test_meta_factory) {}
611
605
 
612
- const string test_case_base_name;
613
- const string test_base_name;
606
+ const std::string test_case_base_name;
607
+ const std::string test_base_name;
614
608
  const scoped_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;
615
609
  };
616
610
  typedef ::std::vector<linked_ptr<TestInfo> > TestInfoContainer;
@@ -651,7 +645,7 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
651
645
  return true;
652
646
  }
653
647
 
654
- const string test_case_name_;
648
+ const std::string test_case_name_;
655
649
  CodeLocation code_location_;
656
650
  TestInfoContainer tests_;
657
651
  InstantiationContainer instantiations_;
@@ -726,6 +720,4 @@ class ParameterizedTestCaseRegistry {
726
720
  } // namespace internal
727
721
  } // namespace testing
728
722
 
729
- #endif // GTEST_HAS_PARAM_TEST
730
-
731
723
  #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
@@ -27,7 +27,7 @@
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
- // The Google C++ Testing Framework (Google Test)
30
+ // The Google C++ Testing and Mocking Framework (Google Test)
31
31
  //
32
32
  // This header file defines the GTEST_OS_* macro.
33
33
  // It is separate from gtest-port.h so that custom/gtest-port.h can include it.
@@ -54,6 +54,9 @@
54
54
  # define GTEST_OS_WINDOWS_PHONE 1
55
55
  # elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
56
56
  # define GTEST_OS_WINDOWS_RT 1
57
+ # elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE)
58
+ # define GTEST_OS_WINDOWS_PHONE 1
59
+ # define GTEST_OS_WINDOWS_TV_TITLE 1
57
60
  # else
58
61
  // WINAPI_FAMILY defined but no known partition matched.
59
62
  // Default to desktop.
@@ -69,6 +72,8 @@
69
72
  # endif
70
73
  #elif defined __FreeBSD__
71
74
  # define GTEST_OS_FREEBSD 1
75
+ #elif defined __Fuchsia__
76
+ # define GTEST_OS_FUCHSIA 1
72
77
  #elif defined __linux__
73
78
  # define GTEST_OS_LINUX 1
74
79
  # if defined __ANDROID__
@@ -84,6 +89,8 @@
84
89
  # define GTEST_OS_HPUX 1
85
90
  #elif defined __native_client__
86
91
  # define GTEST_OS_NACL 1
92
+ #elif defined __NetBSD__
93
+ # define GTEST_OS_NETBSD 1
87
94
  #elif defined __OpenBSD__
88
95
  # define GTEST_OS_OPENBSD 1
89
96
  #elif defined __QNX__
@@ -73,11 +73,9 @@
73
73
  // GTEST_HAS_EXCEPTIONS - Define it to 1/0 to indicate that exceptions
74
74
  // are enabled.
75
75
  // GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string
76
- // is/isn't available (some systems define
77
- // ::string, which is different to std::string).
78
- // GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string
79
- // is/isn't available (some systems define
80
- // ::wstring, which is different to std::wstring).
76
+ // is/isn't available
77
+ // GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::wstring
78
+ // is/isn't available
81
79
  // GTEST_HAS_POSIX_RE - Define it to 1/0 to indicate that POSIX regular
82
80
  // expressions are/aren't available.
83
81
  // GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that <pthread.h>
@@ -109,6 +107,12 @@
109
107
  // GTEST_CREATE_SHARED_LIBRARY
110
108
  // - Define to 1 when compiling Google Test itself
111
109
  // as a shared library.
110
+ // GTEST_DEFAULT_DEATH_TEST_STYLE
111
+ // - The default value of --gtest_death_test_style.
112
+ // The legacy default has been "fast" in the open
113
+ // source version since 2008. The recommended value
114
+ // is "threadsafe", and can be set in
115
+ // custom/gtest-port.h.
112
116
 
113
117
  // Platform-indicating macros
114
118
  // --------------------------
@@ -122,12 +126,14 @@
122
126
  // GTEST_OS_AIX - IBM AIX
123
127
  // GTEST_OS_CYGWIN - Cygwin
124
128
  // GTEST_OS_FREEBSD - FreeBSD
129
+ // GTEST_OS_FUCHSIA - Fuchsia
125
130
  // GTEST_OS_HPUX - HP-UX
126
131
  // GTEST_OS_LINUX - Linux
127
132
  // GTEST_OS_LINUX_ANDROID - Google Android
128
133
  // GTEST_OS_MAC - Mac OS X
129
134
  // GTEST_OS_IOS - iOS
130
135
  // GTEST_OS_NACL - Google Native Client (NaCl)
136
+ // GTEST_OS_NETBSD - NetBSD
131
137
  // GTEST_OS_OPENBSD - OpenBSD
132
138
  // GTEST_OS_QNX - QNX
133
139
  // GTEST_OS_SOLARIS - Sun Solaris
@@ -169,7 +175,6 @@
169
175
  // GTEST_HAS_COMBINE - the Combine() function (for value-parameterized
170
176
  // tests)
171
177
  // GTEST_HAS_DEATH_TEST - death tests
172
- // GTEST_HAS_PARAM_TEST - value-parameterized tests
173
178
  // GTEST_HAS_TYPED_TEST - typed tests
174
179
  // GTEST_HAS_TYPED_TEST_P - type-parameterized tests
175
180
  // GTEST_IS_THREADSAFE - Google Test is thread-safe.
@@ -177,7 +182,7 @@
177
182
  // GTEST_HAS_POSIX_RE (see above) which users can
178
183
  // define themselves.
179
184
  // GTEST_USES_SIMPLE_RE - our own simple regex is used;
180
- // the above two are mutually exclusive.
185
+ // the above RE\b(s) are mutually exclusive.
181
186
  // GTEST_CAN_COMPARE_NULL - accepts untyped NULL in EXPECT_EQ().
182
187
 
183
188
  // Misc public macros
@@ -206,6 +211,7 @@
206
211
  //
207
212
  // C++11 feature wrappers:
208
213
  //
214
+ // testing::internal::forward - portability wrapper for std::forward.
209
215
  // testing::internal::move - portability wrapper for std::move.
210
216
  //
211
217
  // Synchronization:
@@ -222,10 +228,9 @@
222
228
  //
223
229
  // Regular expressions:
224
230
  // RE - a simple regular expression class using the POSIX
225
- // Extended Regular Expression syntax on UNIX-like
226
- // platforms, or a reduced regular exception syntax on
227
- // other platforms, including Windows.
228
- //
231
+ // Extended Regular Expression syntax on UNIX-like platforms
232
+ // or a reduced regular exception syntax on other
233
+ // platforms, including Windows.
229
234
  // Logging:
230
235
  // GTEST_LOG_() - logs messages at the specified severity level.
231
236
  // LogToStderr() - directs all log messages to stderr.
@@ -271,10 +276,12 @@
271
276
  # include <TargetConditionals.h>
272
277
  #endif
273
278
 
279
+ // Brings in the definition of HAS_GLOBAL_STRING. This must be done
280
+ // BEFORE we test HAS_GLOBAL_STRING.
281
+ #include <string> // NOLINT
274
282
  #include <algorithm> // NOLINT
275
283
  #include <iostream> // NOLINT
276
284
  #include <sstream> // NOLINT
277
- #include <string> // NOLINT
278
285
  #include <utility>
279
286
  #include <vector> // NOLINT
280
287
 
@@ -323,7 +330,7 @@
323
330
  // -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a
324
331
  // value for __cplusplus, and recent versions of clang, gcc, and
325
332
  // probably other compilers set that too in C++11 mode.
326
- # if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L
333
+ # if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L || _MSC_VER >= 1900
327
334
  // Compiling in at least C++11 mode.
328
335
  # define GTEST_LANG_CXX11 1
329
336
  # else
@@ -355,12 +362,16 @@
355
362
  #if GTEST_STDLIB_CXX11
356
363
  # define GTEST_HAS_STD_BEGIN_AND_END_ 1
357
364
  # define GTEST_HAS_STD_FORWARD_LIST_ 1
358
- # define GTEST_HAS_STD_FUNCTION_ 1
365
+ # if !defined(_MSC_VER) || (_MSC_FULL_VER >= 190023824)
366
+ // works only with VS2015U2 and better
367
+ # define GTEST_HAS_STD_FUNCTION_ 1
368
+ # endif
359
369
  # define GTEST_HAS_STD_INITIALIZER_LIST_ 1
360
370
  # define GTEST_HAS_STD_MOVE_ 1
361
- # define GTEST_HAS_STD_SHARED_PTR_ 1
362
- # define GTEST_HAS_STD_TYPE_TRAITS_ 1
363
371
  # define GTEST_HAS_STD_UNIQUE_PTR_ 1
372
+ # define GTEST_HAS_STD_SHARED_PTR_ 1
373
+ # define GTEST_HAS_UNORDERED_MAP_ 1
374
+ # define GTEST_HAS_UNORDERED_SET_ 1
364
375
  #endif
365
376
 
366
377
  // C++11 specifies that <tuple> provides std::tuple.
@@ -396,10 +407,16 @@
396
407
  # include <io.h>
397
408
  # endif
398
409
  // In order to avoid having to include <windows.h>, use forward declaration
399
- // assuming CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION.
410
+ #if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR)
411
+ // MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two
412
+ // separate (equivalent) structs, instead of using typedef
413
+ typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;
414
+ #else
415
+ // Assume CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION.
400
416
  // This assumption is verified by
401
417
  // WindowsTypesTest.CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION.
402
- struct _RTL_CRITICAL_SECTION;
418
+ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
419
+ #endif
403
420
  #else
404
421
  // This assumes that non-Windows OSes provide unistd.h. For OSes where this
405
422
  // is not the case, we need to include headers that provide the functions
@@ -453,8 +470,11 @@ struct _RTL_CRITICAL_SECTION;
453
470
  #ifndef GTEST_HAS_EXCEPTIONS
454
471
  // The user didn't tell us whether exceptions are enabled, so we need
455
472
  // to figure it out.
456
- # if defined(_MSC_VER) || defined(__BORLANDC__)
457
- // MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS
473
+ # if defined(_MSC_VER) && defined(_CPPUNWIND)
474
+ // MSVC defines _CPPUNWIND to 1 iff exceptions are enabled.
475
+ # define GTEST_HAS_EXCEPTIONS 1
476
+ # elif defined(__BORLANDC__)
477
+ // C++Builder's implementation of the STL uses the _HAS_EXCEPTIONS
458
478
  // macro to enable exceptions, so we'll do the same.
459
479
  // Assumes that exceptions are enabled by default.
460
480
  # ifndef _HAS_EXCEPTIONS
@@ -498,7 +518,7 @@ struct _RTL_CRITICAL_SECTION;
498
518
  # define GTEST_HAS_STD_STRING 1
499
519
  #elif !GTEST_HAS_STD_STRING
500
520
  // The user told us that ::std::string isn't available.
501
- # error "Google Test cannot be used where ::std::string isn't available."
521
+ # error "::std::string isn't available."
502
522
  #endif // !defined(GTEST_HAS_STD_STRING)
503
523
 
504
524
  #ifndef GTEST_HAS_GLOBAL_STRING
@@ -600,8 +620,9 @@ struct _RTL_CRITICAL_SECTION;
600
620
  //
601
621
  // To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
602
622
  // to your compiler flags.
603
- # define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \
604
- || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NACL)
623
+ #define GTEST_HAS_PTHREAD \
624
+ (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX || GTEST_OS_QNX || \
625
+ GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA)
605
626
  #endif // GTEST_HAS_PTHREAD
606
627
 
607
628
  #if GTEST_HAS_PTHREAD
@@ -616,7 +637,7 @@ struct _RTL_CRITICAL_SECTION;
616
637
  // Determines if hash_map/hash_set are available.
617
638
  // Only used for testing against those containers.
618
639
  #if !defined(GTEST_HAS_HASH_MAP_)
619
- # if _MSC_VER
640
+ # if defined(_MSC_VER) && (_MSC_VER < 1900)
620
641
  # define GTEST_HAS_HASH_MAP_ 1 // Indicates that hash_map is available.
621
642
  # define GTEST_HAS_HASH_SET_ 1 // Indicates that hash_set is available.
622
643
  # endif // _MSC_VER
@@ -629,6 +650,14 @@ struct _RTL_CRITICAL_SECTION;
629
650
  # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR)
630
651
  // STLport, provided with the Android NDK, has neither <tr1/tuple> or <tuple>.
631
652
  # define GTEST_HAS_TR1_TUPLE 0
653
+ # elif defined(_MSC_VER) && (_MSC_VER >= 1910)
654
+ // Prevent `warning C4996: 'std::tr1': warning STL4002:
655
+ // The non-Standard std::tr1 namespace and TR1-only machinery
656
+ // are deprecated and will be REMOVED.`
657
+ # define GTEST_HAS_TR1_TUPLE 0
658
+ # elif GTEST_LANG_CXX11 && defined(_LIBCPP_VERSION)
659
+ // libc++ doesn't support TR1.
660
+ # define GTEST_HAS_TR1_TUPLE 0
632
661
  # else
633
662
  // The user didn't tell us not to do it, so we assume it's OK.
634
663
  # define GTEST_HAS_TR1_TUPLE 1
@@ -638,6 +667,10 @@ struct _RTL_CRITICAL_SECTION;
638
667
  // Determines whether Google Test's own tr1 tuple implementation
639
668
  // should be used.
640
669
  #ifndef GTEST_USE_OWN_TR1_TUPLE
670
+ // We use our own tuple implementation on Symbian.
671
+ # if GTEST_OS_SYMBIAN
672
+ # define GTEST_USE_OWN_TR1_TUPLE 1
673
+ # else
641
674
  // The user didn't tell us, so we need to figure it out.
642
675
 
643
676
  // We use our own TR1 tuple if we aren't sure the user has an
@@ -651,7 +684,8 @@ struct _RTL_CRITICAL_SECTION;
651
684
  // support TR1 tuple. libc++ only provides std::tuple, in C++11 mode,
652
685
  // and it can be used with some compilers that define __GNUC__.
653
686
  # if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \
654
- && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600
687
+ && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) \
688
+ || (_MSC_VER >= 1600 && _MSC_VER < 1900)
655
689
  # define GTEST_ENV_HAS_TR1_TUPLE_ 1
656
690
  # endif
657
691
 
@@ -667,12 +701,11 @@ struct _RTL_CRITICAL_SECTION;
667
701
  # else
668
702
  # define GTEST_USE_OWN_TR1_TUPLE 1
669
703
  # endif
670
-
704
+ # endif // GTEST_OS_SYMBIAN
671
705
  #endif // GTEST_USE_OWN_TR1_TUPLE
672
706
 
673
- // To avoid conditional compilation everywhere, we make it
674
- // gtest-port.h's responsibility to #include the header implementing
675
- // tuple.
707
+ // To avoid conditional compilation we make it gtest-port.h's responsibility
708
+ // to #include the header implementing tuple.
676
709
  #if GTEST_HAS_STD_TUPLE_
677
710
  # include <tuple> // IWYU pragma: export
678
711
  # define GTEST_TUPLE_NAMESPACE_ ::std
@@ -687,22 +720,6 @@ struct _RTL_CRITICAL_SECTION;
687
720
 
688
721
  # if GTEST_USE_OWN_TR1_TUPLE
689
722
  # include "gtest/internal/gtest-tuple.h" // IWYU pragma: export // NOLINT
690
- # elif GTEST_ENV_HAS_STD_TUPLE_
691
- # include <tuple>
692
- // C++11 puts its tuple into the ::std namespace rather than
693
- // ::std::tr1. gtest expects tuple to live in ::std::tr1, so put it there.
694
- // This causes undefined behavior, but supported compilers react in
695
- // the way we intend.
696
- namespace std {
697
- namespace tr1 {
698
- using ::std::get;
699
- using ::std::make_tuple;
700
- using ::std::tuple;
701
- using ::std::tuple_element;
702
- using ::std::tuple_size;
703
- }
704
- }
705
-
706
723
  # elif GTEST_OS_SYMBIAN
707
724
 
708
725
  // On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to
@@ -732,15 +749,17 @@ using ::std::tuple_size;
732
749
  # define _TR1_FUNCTIONAL 1
733
750
  # include <tr1/tuple>
734
751
  # undef _TR1_FUNCTIONAL // Allows the user to #include
735
- // <tr1/functional> if he chooses to.
752
+ // <tr1/functional> if they choose to.
736
753
  # else
737
754
  # include <tr1/tuple> // NOLINT
738
755
  # endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
739
756
 
740
- # else
741
- // If the compiler is not GCC 4.0+, we assume the user is using a
742
- // spec-conforming TR1 implementation.
757
+ // VS 2010 now has tr1 support.
758
+ # elif _MSC_VER >= 1600
743
759
  # include <tuple> // IWYU pragma: export // NOLINT
760
+
761
+ # else // GTEST_USE_OWN_TR1_TUPLE
762
+ # include <tr1/tuple> // IWYU pragma: export // NOLINT
744
763
  # endif // GTEST_USE_OWN_TR1_TUPLE
745
764
 
746
765
  #endif // GTEST_HAS_TR1_TUPLE
@@ -754,8 +773,12 @@ using ::std::tuple_size;
754
773
 
755
774
  # if GTEST_OS_LINUX && !defined(__ia64__)
756
775
  # if GTEST_OS_LINUX_ANDROID
757
- // On Android, clone() is only available on ARM starting with Gingerbread.
758
- # if defined(__arm__) && __ANDROID_API__ >= 9
776
+ // On Android, clone() became available at different API levels for each 32-bit
777
+ // architecture.
778
+ # if defined(__LP64__) || \
779
+ (defined(__arm__) && __ANDROID_API__ >= 9) || \
780
+ (defined(__mips__) && __ANDROID_API__ >= 12) || \
781
+ (defined(__i386__) && __ANDROID_API__ >= 17)
759
782
  # define GTEST_HAS_CLONE 1
760
783
  # else
761
784
  # define GTEST_HAS_CLONE 0
@@ -786,19 +809,15 @@ using ::std::tuple_size;
786
809
  // Google Test does not support death tests for VC 7.1 and earlier as
787
810
  // abort() in a VC 7.1 application compiled as GUI in debug config
788
811
  // pops up a dialog window that cannot be suppressed programmatically.
789
- #if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
790
- (GTEST_OS_MAC && !GTEST_OS_IOS) || \
791
- (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
812
+ #if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
813
+ (GTEST_OS_MAC && !GTEST_OS_IOS) || \
814
+ (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
792
815
  GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
793
- GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD)
816
+ GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || \
817
+ GTEST_OS_NETBSD || GTEST_OS_FUCHSIA)
794
818
  # define GTEST_HAS_DEATH_TEST 1
795
819
  #endif
796
820
 
797
- // We don't support MSVC 7.1 with exceptions disabled now. Therefore
798
- // all the compilers we care about are adequate for supporting
799
- // value-parameterized tests.
800
- #define GTEST_HAS_PARAM_TEST 1
801
-
802
821
  // Determines whether to support type-driven tests.
803
822
 
804
823
  // Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
@@ -813,7 +832,7 @@ using ::std::tuple_size;
813
832
  // value-parameterized tests are enabled. The implementation doesn't
814
833
  // work on Sun Studio since it doesn't understand templated conversion
815
834
  // operators.
816
- #if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)
835
+ #if (GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_) && !defined(__SUNPRO_CC)
817
836
  # define GTEST_HAS_COMBINE 1
818
837
  #endif
819
838
 
@@ -864,15 +883,39 @@ using ::std::tuple_size;
864
883
  # define GTEST_ATTRIBUTE_UNUSED_
865
884
  #endif
866
885
 
886
+ #if GTEST_LANG_CXX11
887
+ # define GTEST_CXX11_EQUALS_DELETE_ = delete
888
+ #else // GTEST_LANG_CXX11
889
+ # define GTEST_CXX11_EQUALS_DELETE_
890
+ #endif // GTEST_LANG_CXX11
891
+
892
+ // Use this annotation before a function that takes a printf format string.
893
+ #if (defined(__GNUC__) || defined(__clang__)) && !defined(COMPILER_ICC)
894
+ # if defined(__MINGW_PRINTF_FORMAT)
895
+ // MinGW has two different printf implementations. Ensure the format macro
896
+ // matches the selected implementation. See
897
+ // https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/.
898
+ # define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \
899
+ __attribute__((__format__(__MINGW_PRINTF_FORMAT, string_index, \
900
+ first_to_check)))
901
+ # else
902
+ # define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \
903
+ __attribute__((__format__(__printf__, string_index, first_to_check)))
904
+ # endif
905
+ #else
906
+ # define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check)
907
+ #endif
908
+
909
+
867
910
  // A macro to disallow operator=
868
911
  // This should be used in the private: declarations for a class.
869
- #define GTEST_DISALLOW_ASSIGN_(type)\
870
- void operator=(type const &)
912
+ #define GTEST_DISALLOW_ASSIGN_(type) \
913
+ void operator=(type const &) GTEST_CXX11_EQUALS_DELETE_
871
914
 
872
915
  // A macro to disallow copy constructor and operator=
873
916
  // This should be used in the private: declarations for a class.
874
- #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
875
- type(type const &);\
917
+ #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
918
+ type(type const &) GTEST_CXX11_EQUALS_DELETE_; \
876
919
  GTEST_DISALLOW_ASSIGN_(type)
877
920
 
878
921
  // Tell the compiler to warn about unused return values for functions declared
@@ -920,6 +963,11 @@ using ::std::tuple_size;
920
963
 
921
964
  #endif // GTEST_HAS_SEH
922
965
 
966
+ // GTEST_API_ qualifies all symbols that must be exported. The definitions below
967
+ // are guarded by #ifndef to give embedders a chance to define GTEST_API_ in
968
+ // gtest/internal/custom/gtest-port.h
969
+ #ifndef GTEST_API_
970
+
923
971
  #ifdef _MSC_VER
924
972
  # if GTEST_LINKED_AS_SHARED_LIBRARY
925
973
  # define GTEST_API_ __declspec(dllimport)
@@ -928,11 +976,17 @@ using ::std::tuple_size;
928
976
  # endif
929
977
  #elif __GNUC__ >= 4 || defined(__clang__)
930
978
  # define GTEST_API_ __attribute__((visibility ("default")))
931
- #endif // _MSC_VER
979
+ #endif // _MSC_VER
980
+
981
+ #endif // GTEST_API_
932
982
 
933
983
  #ifndef GTEST_API_
934
984
  # define GTEST_API_
935
- #endif
985
+ #endif // GTEST_API_
986
+
987
+ #ifndef GTEST_DEFAULT_DEATH_TEST_STYLE
988
+ # define GTEST_DEFAULT_DEATH_TEST_STYLE "fast"
989
+ #endif // GTEST_DEFAULT_DEATH_TEST_STYLE
936
990
 
937
991
  #ifdef __GNUC__
938
992
  // Ask the compiler to never inline a given function.
@@ -942,10 +996,12 @@ using ::std::tuple_size;
942
996
  #endif
943
997
 
944
998
  // _LIBCPP_VERSION is defined by the libc++ library from the LLVM project.
945
- #if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
946
- # define GTEST_HAS_CXXABI_H_ 1
947
- #else
948
- # define GTEST_HAS_CXXABI_H_ 0
999
+ #if !defined(GTEST_HAS_CXXABI_H_)
1000
+ # if defined(__GLIBCXX__) || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER))
1001
+ # define GTEST_HAS_CXXABI_H_ 1
1002
+ # else
1003
+ # define GTEST_HAS_CXXABI_H_ 0
1004
+ # endif
949
1005
  #endif
950
1006
 
951
1007
  // A function level attribute to disable checking for use of uninitialized
@@ -1088,6 +1144,16 @@ struct StaticAssertTypeEqHelper<T, T> {
1088
1144
  enum { value = true };
1089
1145
  };
1090
1146
 
1147
+ // Same as std::is_same<>.
1148
+ template <typename T, typename U>
1149
+ struct IsSame {
1150
+ enum { value = false };
1151
+ };
1152
+ template <typename T>
1153
+ struct IsSame<T, T> {
1154
+ enum { value = true };
1155
+ };
1156
+
1091
1157
  // Evaluates to the number of elements in 'array'.
1092
1158
  #define GTEST_ARRAY_SIZE_(array) (sizeof(array) / sizeof(array[0]))
1093
1159
 
@@ -1151,6 +1217,10 @@ class scoped_ptr {
1151
1217
 
1152
1218
  // Defines RE.
1153
1219
 
1220
+ #if GTEST_USES_PCRE
1221
+ using ::RE;
1222
+ #elif GTEST_USES_POSIX_RE || GTEST_USES_SIMPLE_RE
1223
+
1154
1224
  // A simple C++ wrapper for <regex.h>. It uses the POSIX Extended
1155
1225
  // Regular Expression syntax.
1156
1226
  class GTEST_API_ RE {
@@ -1162,11 +1232,11 @@ class GTEST_API_ RE {
1162
1232
  // Constructs an RE from a string.
1163
1233
  RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT
1164
1234
 
1165
- #if GTEST_HAS_GLOBAL_STRING
1235
+ # if GTEST_HAS_GLOBAL_STRING
1166
1236
 
1167
1237
  RE(const ::string& regex) { Init(regex.c_str()); } // NOLINT
1168
1238
 
1169
- #endif // GTEST_HAS_GLOBAL_STRING
1239
+ # endif // GTEST_HAS_GLOBAL_STRING
1170
1240
 
1171
1241
  RE(const char* regex) { Init(regex); } // NOLINT
1172
1242
  ~RE();
@@ -1188,7 +1258,7 @@ class GTEST_API_ RE {
1188
1258
  return PartialMatch(str.c_str(), re);
1189
1259
  }
1190
1260
 
1191
- #if GTEST_HAS_GLOBAL_STRING
1261
+ # if GTEST_HAS_GLOBAL_STRING
1192
1262
 
1193
1263
  static bool FullMatch(const ::string& str, const RE& re) {
1194
1264
  return FullMatch(str.c_str(), re);
@@ -1197,7 +1267,7 @@ class GTEST_API_ RE {
1197
1267
  return PartialMatch(str.c_str(), re);
1198
1268
  }
1199
1269
 
1200
- #endif // GTEST_HAS_GLOBAL_STRING
1270
+ # endif // GTEST_HAS_GLOBAL_STRING
1201
1271
 
1202
1272
  static bool FullMatch(const char* str, const RE& re);
1203
1273
  static bool PartialMatch(const char* str, const RE& re);
@@ -1211,20 +1281,22 @@ class GTEST_API_ RE {
1211
1281
  const char* pattern_;
1212
1282
  bool is_valid_;
1213
1283
 
1214
- #if GTEST_USES_POSIX_RE
1284
+ # if GTEST_USES_POSIX_RE
1215
1285
 
1216
1286
  regex_t full_regex_; // For FullMatch().
1217
1287
  regex_t partial_regex_; // For PartialMatch().
1218
1288
 
1219
- #else // GTEST_USES_SIMPLE_RE
1289
+ # else // GTEST_USES_SIMPLE_RE
1220
1290
 
1221
1291
  const char* full_pattern_; // For FullMatch();
1222
1292
 
1223
- #endif
1293
+ # endif
1224
1294
 
1225
1295
  GTEST_DISALLOW_ASSIGN_(RE);
1226
1296
  };
1227
1297
 
1298
+ #endif // GTEST_USES_PCRE
1299
+
1228
1300
  // Formats a source file path and a line number as they would appear
1229
1301
  // in an error message from the compiler used to compile this code.
1230
1302
  GTEST_API_ ::std::string FormatFileLocation(const char* file, int line);
@@ -1310,13 +1382,59 @@ inline void FlushInfoLog() { fflush(NULL); }
1310
1382
  GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
1311
1383
  << gtest_error
1312
1384
 
1385
+ // Adds reference to a type if it is not a reference type,
1386
+ // otherwise leaves it unchanged. This is the same as
1387
+ // tr1::add_reference, which is not widely available yet.
1388
+ template <typename T>
1389
+ struct AddReference { typedef T& type; }; // NOLINT
1390
+ template <typename T>
1391
+ struct AddReference<T&> { typedef T& type; }; // NOLINT
1392
+
1393
+ // A handy wrapper around AddReference that works when the argument T
1394
+ // depends on template parameters.
1395
+ #define GTEST_ADD_REFERENCE_(T) \
1396
+ typename ::testing::internal::AddReference<T>::type
1397
+
1398
+ // Transforms "T" into "const T&" according to standard reference collapsing
1399
+ // rules (this is only needed as a backport for C++98 compilers that do not
1400
+ // support reference collapsing). Specifically, it transforms:
1401
+ //
1402
+ // char ==> const char&
1403
+ // const char ==> const char&
1404
+ // char& ==> char&
1405
+ // const char& ==> const char&
1406
+ //
1407
+ // Note that the non-const reference will not have "const" added. This is
1408
+ // standard, and necessary so that "T" can always bind to "const T&".
1409
+ template <typename T>
1410
+ struct ConstRef { typedef const T& type; };
1411
+ template <typename T>
1412
+ struct ConstRef<T&> { typedef T& type; };
1413
+
1414
+ // The argument T must depend on some template parameters.
1415
+ #define GTEST_REFERENCE_TO_CONST_(T) \
1416
+ typename ::testing::internal::ConstRef<T>::type
1417
+
1313
1418
  #if GTEST_HAS_STD_MOVE_
1419
+ using std::forward;
1314
1420
  using std::move;
1421
+
1422
+ template <typename T>
1423
+ struct RvalueRef {
1424
+ typedef T&& type;
1425
+ };
1315
1426
  #else // GTEST_HAS_STD_MOVE_
1316
1427
  template <typename T>
1317
1428
  const T& move(const T& t) {
1318
1429
  return t;
1319
1430
  }
1431
+ template <typename T>
1432
+ GTEST_ADD_REFERENCE_(T) forward(GTEST_ADD_REFERENCE_(T) t) { return t; }
1433
+
1434
+ template <typename T>
1435
+ struct RvalueRef {
1436
+ typedef const T& type;
1437
+ };
1320
1438
  #endif // GTEST_HAS_STD_MOVE_
1321
1439
 
1322
1440
  // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
@@ -1417,10 +1535,6 @@ GTEST_API_ void CaptureStderr();
1417
1535
  GTEST_API_ std::string GetCapturedStderr();
1418
1536
 
1419
1537
  #endif // GTEST_HAS_STREAM_REDIRECTION
1420
-
1421
- // Returns a path to temporary directory.
1422
- GTEST_API_ std::string TempDir();
1423
-
1424
1538
  // Returns the size (in bytes) of a file.
1425
1539
  GTEST_API_ size_t GetFileSize(FILE* file);
1426
1540
 
@@ -1428,14 +1542,18 @@ GTEST_API_ size_t GetFileSize(FILE* file);
1428
1542
  GTEST_API_ std::string ReadEntireFile(FILE* file);
1429
1543
 
1430
1544
  // All command line arguments.
1431
- GTEST_API_ const ::std::vector<testing::internal::string>& GetArgvs();
1545
+ GTEST_API_ std::vector<std::string> GetArgvs();
1432
1546
 
1433
1547
  #if GTEST_HAS_DEATH_TEST
1434
1548
 
1435
- const ::std::vector<testing::internal::string>& GetInjectableArgvs();
1436
- void SetInjectableArgvs(const ::std::vector<testing::internal::string>*
1437
- new_argvs);
1438
-
1549
+ std::vector<std::string> GetInjectableArgvs();
1550
+ // Deprecated: pass the args vector by value instead.
1551
+ void SetInjectableArgvs(const std::vector<std::string>* new_argvs);
1552
+ void SetInjectableArgvs(const std::vector<std::string>& new_argvs);
1553
+ #if GTEST_HAS_GLOBAL_STRING
1554
+ void SetInjectableArgvs(const std::vector< ::string>& new_argvs);
1555
+ #endif // GTEST_HAS_GLOBAL_STRING
1556
+ void ClearInjectableArgvs();
1439
1557
 
1440
1558
  #endif // GTEST_HAS_DEATH_TEST
1441
1559
 
@@ -1693,7 +1811,7 @@ class GTEST_API_ Mutex {
1693
1811
  // by the linker.
1694
1812
  MutexType type_;
1695
1813
  long critical_section_init_phase_; // NOLINT
1696
- _RTL_CRITICAL_SECTION* critical_section_;
1814
+ GTEST_CRITICAL_SECTION* critical_section_;
1697
1815
 
1698
1816
  GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);
1699
1817
  };
@@ -1969,8 +2087,13 @@ class MutexBase {
1969
2087
  extern ::testing::internal::MutexBase mutex
1970
2088
 
1971
2089
  // Defines and statically (i.e. at link time) initializes a static mutex.
2090
+ // The initialization list here does not explicitly initialize each field,
2091
+ // instead relying on default initialization for the unspecified fields. In
2092
+ // particular, the owner_ field (a pthread_t) is not explicitly initialized.
2093
+ // This allows initialization to work whether pthread_t is a scalar or struct.
2094
+ // The flag -Wmissing-field-initializers must not be specified for this to work.
1972
2095
  # define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
1973
- ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false, pthread_t() }
2096
+ ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }
1974
2097
 
1975
2098
  // The Mutex class can only be used for mutexes created at runtime. It
1976
2099
  // shares its API with MutexBase otherwise.
@@ -2027,7 +2150,7 @@ extern "C" inline void DeleteThreadLocalValue(void* value_holder) {
2027
2150
 
2028
2151
  // Implements thread-local storage on pthreads-based systems.
2029
2152
  template <typename T>
2030
- class ThreadLocal {
2153
+ class GTEST_API_ ThreadLocal {
2031
2154
  public:
2032
2155
  ThreadLocal()
2033
2156
  : key_(CreateKey()), default_factory_(new DefaultValueHolderFactory()) {}
@@ -2159,7 +2282,7 @@ class GTestMutexLock {
2159
2282
  typedef GTestMutexLock MutexLock;
2160
2283
 
2161
2284
  template <typename T>
2162
- class ThreadLocal {
2285
+ class GTEST_API_ ThreadLocal {
2163
2286
  public:
2164
2287
  ThreadLocal() : value_() {}
2165
2288
  explicit ThreadLocal(const T& value) : value_(value) {}
@@ -2178,12 +2301,13 @@ class ThreadLocal {
2178
2301
  GTEST_API_ size_t GetThreadCount();
2179
2302
 
2180
2303
  // Passing non-POD classes through ellipsis (...) crashes the ARM
2181
- // compiler and generates a warning in Sun Studio. The Nokia Symbian
2304
+ // compiler and generates a warning in Sun Studio before 12u4. The Nokia Symbian
2182
2305
  // and the IBM XL C/C++ compiler try to instantiate a copy constructor
2183
2306
  // for objects passed through ellipsis (...), failing for uncopyable
2184
2307
  // objects. We define this to ensure that only POD is passed through
2185
2308
  // ellipsis on these systems.
2186
- #if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
2309
+ #if defined(__SYMBIAN32__) || defined(__IBMCPP__) || \
2310
+ (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5130)
2187
2311
  // We lose support for NULL detection where the compiler doesn't like
2188
2312
  // passing non-POD classes through ellipsis (...).
2189
2313
  # define GTEST_ELLIPSIS_NEEDS_POD_ 1
@@ -2209,6 +2333,13 @@ template <bool bool_value> const bool bool_constant<bool_value>::value;
2209
2333
  typedef bool_constant<false> false_type;
2210
2334
  typedef bool_constant<true> true_type;
2211
2335
 
2336
+ template <typename T, typename U>
2337
+ struct is_same : public false_type {};
2338
+
2339
+ template <typename T>
2340
+ struct is_same<T, T> : public true_type {};
2341
+
2342
+
2212
2343
  template <typename T>
2213
2344
  struct is_pointer : public false_type {};
2214
2345
 
@@ -2220,6 +2351,7 @@ struct IteratorTraits {
2220
2351
  typedef typename Iterator::value_type value_type;
2221
2352
  };
2222
2353
 
2354
+
2223
2355
  template <typename T>
2224
2356
  struct IteratorTraits<T*> {
2225
2357
  typedef T value_type;
@@ -2385,7 +2517,7 @@ inline int Close(int fd) { return close(fd); }
2385
2517
  inline const char* StrError(int errnum) { return strerror(errnum); }
2386
2518
  #endif
2387
2519
  inline const char* GetEnv(const char* name) {
2388
- #if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE | GTEST_OS_WINDOWS_RT
2520
+ #if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT
2389
2521
  // We are on Windows CE, which has no environment variables.
2390
2522
  static_cast<void>(name); // To prevent 'unused argument' warning.
2391
2523
  return NULL;
@@ -2515,15 +2647,15 @@ typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
2515
2647
  # define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)
2516
2648
  # define GTEST_DECLARE_int32_(name) \
2517
2649
  GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)
2518
- #define GTEST_DECLARE_string_(name) \
2650
+ # define GTEST_DECLARE_string_(name) \
2519
2651
  GTEST_API_ extern ::std::string GTEST_FLAG(name)
2520
2652
 
2521
2653
  // Macros for defining flags.
2522
- #define GTEST_DEFINE_bool_(name, default_val, doc) \
2654
+ # define GTEST_DEFINE_bool_(name, default_val, doc) \
2523
2655
  GTEST_API_ bool GTEST_FLAG(name) = (default_val)
2524
- #define GTEST_DEFINE_int32_(name, default_val, doc) \
2656
+ # define GTEST_DEFINE_int32_(name, default_val, doc) \
2525
2657
  GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)
2526
- #define GTEST_DEFINE_string_(name, default_val, doc) \
2658
+ # define GTEST_DEFINE_string_(name, default_val, doc) \
2527
2659
  GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)
2528
2660
 
2529
2661
  #endif // !defined(GTEST_DECLARE_bool_)
@@ -2546,7 +2678,8 @@ bool ParseInt32(const Message& src_text, const char* str, Int32* value);
2546
2678
  // corresponding to the given Google Test flag.
2547
2679
  bool BoolFromGTestEnv(const char* flag, bool default_val);
2548
2680
  GTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val);
2549
- std::string StringFromGTestEnv(const char* flag, const char* default_val);
2681
+ std::string OutputFlagAlsoCheckEnvVar();
2682
+ const char* StringFromGTestEnv(const char* flag, const char* default_val);
2550
2683
 
2551
2684
  } // namespace internal
2552
2685
  } // namespace testing