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
@@ -391,7 +391,7 @@ TEST(ExactlyTest, HasCorrectBounds) {
391
391
  EXPECT_EQ(3, c.ConservativeUpperBound());
392
392
  }
393
393
 
394
- // Tests that a user can make his own cardinality by implementing
394
+ // Tests that a user can make their own cardinality by implementing
395
395
  // CardinalityInterface and calling MakeCardinality().
396
396
 
397
397
  class EvenCardinality : public CardinalityInterface {
@@ -81,12 +81,12 @@ bool Unary(int x) { return x < 0; }
81
81
 
82
82
  const char* Plus1(const char* s) { return s + 1; }
83
83
 
84
- bool ByConstRef(const string& s) { return s == "Hi"; }
84
+ bool ByConstRef(const std::string& s) { return s == "Hi"; }
85
85
 
86
86
  const double g_double = 0;
87
87
  bool ReferencesGlobalDouble(const double& x) { return &x == &g_double; }
88
88
 
89
- string ByNonConstRef(string& s) { return s += "+"; } // NOLINT
89
+ std::string ByNonConstRef(std::string& s) { return s += "+"; } // NOLINT
90
90
 
91
91
  struct UnaryFunctor {
92
92
  int operator()(bool x) { return x ? 1 : -1; }
@@ -102,9 +102,9 @@ void VoidTernary(int, char, bool) { g_done = true; }
102
102
 
103
103
  int SumOf4(int a, int b, int c, int d) { return a + b + c + d; }
104
104
 
105
- string Concat4(const char* s1, const char* s2, const char* s3,
106
- const char* s4) {
107
- return string(s1) + s2 + s3 + s4;
105
+ std::string Concat4(const char* s1, const char* s2, const char* s3,
106
+ const char* s4) {
107
+ return std::string(s1) + s2 + s3 + s4;
108
108
  }
109
109
 
110
110
  int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; }
@@ -115,9 +115,9 @@ struct SumOf5Functor {
115
115
  }
116
116
  };
117
117
 
118
- string Concat5(const char* s1, const char* s2, const char* s3,
119
- const char* s4, const char* s5) {
120
- return string(s1) + s2 + s3 + s4 + s5;
118
+ std::string Concat5(const char* s1, const char* s2, const char* s3,
119
+ const char* s4, const char* s5) {
120
+ return std::string(s1) + s2 + s3 + s4 + s5;
121
121
  }
122
122
 
123
123
  int SumOf6(int a, int b, int c, int d, int e, int f) {
@@ -130,34 +130,34 @@ struct SumOf6Functor {
130
130
  }
131
131
  };
132
132
 
133
- string Concat6(const char* s1, const char* s2, const char* s3,
134
- const char* s4, const char* s5, const char* s6) {
135
- return string(s1) + s2 + s3 + s4 + s5 + s6;
133
+ std::string Concat6(const char* s1, const char* s2, const char* s3,
134
+ const char* s4, const char* s5, const char* s6) {
135
+ return std::string(s1) + s2 + s3 + s4 + s5 + s6;
136
136
  }
137
137
 
138
- string Concat7(const char* s1, const char* s2, const char* s3,
139
- const char* s4, const char* s5, const char* s6,
140
- const char* s7) {
141
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
138
+ std::string Concat7(const char* s1, const char* s2, const char* s3,
139
+ const char* s4, const char* s5, const char* s6,
140
+ const char* s7) {
141
+ return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
142
142
  }
143
143
 
144
- string Concat8(const char* s1, const char* s2, const char* s3,
145
- const char* s4, const char* s5, const char* s6,
146
- const char* s7, const char* s8) {
147
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
144
+ std::string Concat8(const char* s1, const char* s2, const char* s3,
145
+ const char* s4, const char* s5, const char* s6,
146
+ const char* s7, const char* s8) {
147
+ return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
148
148
  }
149
149
 
150
- string Concat9(const char* s1, const char* s2, const char* s3,
151
- const char* s4, const char* s5, const char* s6,
152
- const char* s7, const char* s8, const char* s9) {
153
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
150
+ std::string Concat9(const char* s1, const char* s2, const char* s3,
151
+ const char* s4, const char* s5, const char* s6,
152
+ const char* s7, const char* s8, const char* s9) {
153
+ return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
154
154
  }
155
155
 
156
- string Concat10(const char* s1, const char* s2, const char* s3,
157
- const char* s4, const char* s5, const char* s6,
158
- const char* s7, const char* s8, const char* s9,
159
- const char* s10) {
160
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
156
+ std::string Concat10(const char* s1, const char* s2, const char* s3,
157
+ const char* s4, const char* s5, const char* s6,
158
+ const char* s7, const char* s8, const char* s9,
159
+ const char* s10) {
160
+ return std::string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
161
161
  }
162
162
 
163
163
  // A helper that turns the type of a C-string literal from const
@@ -208,38 +208,37 @@ TEST(InvokeArgumentTest, Functor6) {
208
208
 
209
209
  // Tests using InvokeArgument with a 7-ary function.
210
210
  TEST(InvokeArgumentTest, Function7) {
211
- Action<string(string(*)(const char*, const char*, const char*,
212
- const char*, const char*, const char*,
213
- const char*))> a =
214
- InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7");
211
+ Action<std::string(std::string(*)(const char*, const char*, const char*,
212
+ const char*, const char*, const char*,
213
+ const char*))>
214
+ a = InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7");
215
215
  EXPECT_EQ("1234567", a.Perform(make_tuple(&Concat7)));
216
216
  }
217
217
 
218
218
  // Tests using InvokeArgument with a 8-ary function.
219
219
  TEST(InvokeArgumentTest, Function8) {
220
- Action<string(string(*)(const char*, const char*, const char*,
221
- const char*, const char*, const char*,
222
- const char*, const char*))> a =
223
- InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8");
220
+ Action<std::string(std::string(*)(const char*, const char*, const char*,
221
+ const char*, const char*, const char*,
222
+ const char*, const char*))>
223
+ a = InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8");
224
224
  EXPECT_EQ("12345678", a.Perform(make_tuple(&Concat8)));
225
225
  }
226
226
 
227
227
  // Tests using InvokeArgument with a 9-ary function.
228
228
  TEST(InvokeArgumentTest, Function9) {
229
- Action<string(string(*)(const char*, const char*, const char*,
230
- const char*, const char*, const char*,
231
- const char*, const char*, const char*))> a =
232
- InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9");
229
+ Action<std::string(std::string(*)(const char*, const char*, const char*,
230
+ const char*, const char*, const char*,
231
+ const char*, const char*, const char*))>
232
+ a = InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9");
233
233
  EXPECT_EQ("123456789", a.Perform(make_tuple(&Concat9)));
234
234
  }
235
235
 
236
236
  // Tests using InvokeArgument with a 10-ary function.
237
237
  TEST(InvokeArgumentTest, Function10) {
238
- Action<string(string(*)(const char*, const char*, const char*,
239
- const char*, const char*, const char*,
240
- const char*, const char*, const char*,
241
- const char*))> a =
242
- InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
238
+ Action<std::string(std::string(*)(
239
+ const char*, const char*, const char*, const char*, const char*,
240
+ const char*, const char*, const char*, const char*, const char*))>
241
+ a = InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
243
242
  EXPECT_EQ("1234567890", a.Perform(make_tuple(&Concat10)));
244
243
  }
245
244
 
@@ -260,8 +259,8 @@ TEST(InvokeArgumentTest, FunctionWithCStringLiteral) {
260
259
 
261
260
  // Tests using InvokeArgument with a function that takes a const reference.
262
261
  TEST(InvokeArgumentTest, ByConstReferenceFunction) {
263
- Action<bool(bool(*function)(const string& s))> a = // NOLINT
264
- InvokeArgument<0>(string("Hi"));
262
+ Action<bool(bool (*function)(const std::string& s))> a = // NOLINT
263
+ InvokeArgument<0>(std::string("Hi"));
265
264
  // When action 'a' is constructed, it makes a copy of the temporary
266
265
  // string object passed to it, so it's OK to use 'a' later, when the
267
266
  // temporary object has already died.
@@ -305,17 +304,18 @@ TEST(WithArgsTest, ThreeArgs) {
305
304
 
306
305
  // Tests using WithArgs with an action that takes 4 arguments.
307
306
  TEST(WithArgsTest, FourArgs) {
308
- Action<string(const char*, const char*, double, const char*, const char*)> a =
309
- WithArgs<4, 3, 1, 0>(Invoke(Concat4));
307
+ Action<std::string(const char*, const char*, double, const char*,
308
+ const char*)>
309
+ a = WithArgs<4, 3, 1, 0>(Invoke(Concat4));
310
310
  EXPECT_EQ("4310", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), 2.5,
311
311
  CharPtr("3"), CharPtr("4"))));
312
312
  }
313
313
 
314
314
  // Tests using WithArgs with an action that takes 5 arguments.
315
315
  TEST(WithArgsTest, FiveArgs) {
316
- Action<string(const char*, const char*, const char*,
317
- const char*, const char*)> a =
318
- WithArgs<4, 3, 2, 1, 0>(Invoke(Concat5));
316
+ Action<std::string(const char*, const char*, const char*, const char*,
317
+ const char*)>
318
+ a = WithArgs<4, 3, 2, 1, 0>(Invoke(Concat5));
319
319
  EXPECT_EQ("43210",
320
320
  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
321
321
  CharPtr("3"), CharPtr("4"))));
@@ -323,7 +323,7 @@ TEST(WithArgsTest, FiveArgs) {
323
323
 
324
324
  // Tests using WithArgs with an action that takes 6 arguments.
325
325
  TEST(WithArgsTest, SixArgs) {
326
- Action<string(const char*, const char*, const char*)> a =
326
+ Action<std::string(const char*, const char*, const char*)> a =
327
327
  WithArgs<0, 1, 2, 2, 1, 0>(Invoke(Concat6));
328
328
  EXPECT_EQ("012210",
329
329
  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"))));
@@ -331,7 +331,7 @@ TEST(WithArgsTest, SixArgs) {
331
331
 
332
332
  // Tests using WithArgs with an action that takes 7 arguments.
333
333
  TEST(WithArgsTest, SevenArgs) {
334
- Action<string(const char*, const char*, const char*, const char*)> a =
334
+ Action<std::string(const char*, const char*, const char*, const char*)> a =
335
335
  WithArgs<0, 1, 2, 3, 2, 1, 0>(Invoke(Concat7));
336
336
  EXPECT_EQ("0123210",
337
337
  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
@@ -340,7 +340,7 @@ TEST(WithArgsTest, SevenArgs) {
340
340
 
341
341
  // Tests using WithArgs with an action that takes 8 arguments.
342
342
  TEST(WithArgsTest, EightArgs) {
343
- Action<string(const char*, const char*, const char*, const char*)> a =
343
+ Action<std::string(const char*, const char*, const char*, const char*)> a =
344
344
  WithArgs<0, 1, 2, 3, 0, 1, 2, 3>(Invoke(Concat8));
345
345
  EXPECT_EQ("01230123",
346
346
  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
@@ -349,7 +349,7 @@ TEST(WithArgsTest, EightArgs) {
349
349
 
350
350
  // Tests using WithArgs with an action that takes 9 arguments.
351
351
  TEST(WithArgsTest, NineArgs) {
352
- Action<string(const char*, const char*, const char*, const char*)> a =
352
+ Action<std::string(const char*, const char*, const char*, const char*)> a =
353
353
  WithArgs<0, 1, 2, 3, 1, 2, 3, 2, 3>(Invoke(Concat9));
354
354
  EXPECT_EQ("012312323",
355
355
  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
@@ -358,7 +358,7 @@ TEST(WithArgsTest, NineArgs) {
358
358
 
359
359
  // Tests using WithArgs with an action that takes 10 arguments.
360
360
  TEST(WithArgsTest, TenArgs) {
361
- Action<string(const char*, const char*, const char*, const char*)> a =
361
+ Action<std::string(const char*, const char*, const char*, const char*)> a =
362
362
  WithArgs<0, 1, 2, 3, 2, 1, 0, 1, 2, 3>(Invoke(Concat10));
363
363
  EXPECT_EQ("0123210123",
364
364
  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
@@ -374,10 +374,10 @@ class SubstractAction : public ActionInterface<int(int, int)> { // NOLINT
374
374
  };
375
375
 
376
376
  TEST(WithArgsTest, NonInvokeAction) {
377
- Action<int(const string&, int, int)> a = // NOLINT
377
+ Action<int(const std::string&, int, int)> a = // NOLINT
378
378
  WithArgs<2, 1>(MakeAction(new SubstractAction));
379
- string s("hello");
380
- EXPECT_EQ(8, a.Perform(tuple<const string&, int, int>(s, 2, 10)));
379
+ tuple<std::string, int, int> dummy = make_tuple(std::string("hi"), 2, 10);
380
+ EXPECT_EQ(8, a.Perform(dummy));
381
381
  }
382
382
 
383
383
  // Tests using WithArgs to pass all original arguments in the original order.
@@ -754,7 +754,8 @@ TEST(ActionPMacroTest, CanReferenceArgumentAndParameterTypes) {
754
754
  TEST(ActionPMacroTest, WorksInCompatibleMockFunction) {
755
755
  Action<std::string(const std::string& s)> a1 = Plus("tail");
756
756
  const std::string re = "re";
757
- EXPECT_EQ("retail", a1.Perform(tuple<const std::string&>(re)));
757
+ tuple<const std::string> dummy = make_tuple(re);
758
+ EXPECT_EQ("retail", a1.Perform(dummy));
758
759
  }
759
760
 
760
761
  // Tests that we can use ACTION*() to define actions overloaded on the
@@ -796,7 +797,8 @@ TEST(ActionPnMacroTest, WorksFor3Parameters) {
796
797
 
797
798
  Action<std::string(const std::string& s)> a2 = Plus("tail", "-", ">");
798
799
  const std::string re = "re";
799
- EXPECT_EQ("retail->", a2.Perform(tuple<const std::string&>(re)));
800
+ tuple<const std::string> dummy = make_tuple(re);
801
+ EXPECT_EQ("retail->", a2.Perform(dummy));
800
802
  }
801
803
 
802
804
  ACTION_P4(Plus, p0, p1, p2, p3) { return arg0 + p0 + p1 + p2 + p3; }
@@ -57,7 +57,6 @@
57
57
  namespace testing {
58
58
  namespace gmock_generated_function_mockers_test {
59
59
 
60
- using testing::internal::string;
61
60
  using testing::_;
62
61
  using testing::A;
63
62
  using testing::An;
@@ -82,11 +81,11 @@ class FooInterface {
82
81
  virtual bool Unary(int x) = 0;
83
82
  virtual long Binary(short x, int y) = 0; // NOLINT
84
83
  virtual int Decimal(bool b, char c, short d, int e, long f, // NOLINT
85
- float g, double h, unsigned i, char* j, const string& k)
86
- = 0;
84
+ float g, double h, unsigned i, char* j,
85
+ const std::string& k) = 0;
87
86
 
88
87
  virtual bool TakesNonConstReference(int& n) = 0; // NOLINT
89
- virtual string TakesConstReference(const int& n) = 0;
88
+ virtual std::string TakesConstReference(const int& n) = 0;
90
89
  #ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
91
90
  virtual bool TakesConst(const int x) = 0;
92
91
  #endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
@@ -101,13 +100,14 @@ class FooInterface {
101
100
  virtual char OverloadedOnConstness() const = 0;
102
101
 
103
102
  virtual int TypeWithHole(int (*func)()) = 0;
104
- virtual int TypeWithComma(const std::map<int, string>& a_map) = 0;
103
+ virtual int TypeWithComma(const std::map<int, std::string>& a_map) = 0;
105
104
 
106
105
  #if GTEST_OS_WINDOWS
107
106
  STDMETHOD_(int, CTNullary)() = 0;
108
107
  STDMETHOD_(bool, CTUnary)(int x) = 0;
109
- STDMETHOD_(int, CTDecimal)(bool b, char c, short d, int e, long f, // NOLINT
110
- float g, double h, unsigned i, char* j, const string& k) = 0;
108
+ STDMETHOD_(int, CTDecimal)
109
+ (bool b, char c, short d, int e, long f, // NOLINT
110
+ float g, double h, unsigned i, char* j, const std::string& k) = 0;
111
111
  STDMETHOD_(char, CTConst)(int x) const = 0;
112
112
  #endif // GTEST_OS_WINDOWS
113
113
  };
@@ -133,19 +133,19 @@ class MockFoo : public FooInterface {
133
133
  MOCK_METHOD1(Unary, bool(int)); // NOLINT
134
134
  MOCK_METHOD2(Binary, long(short, int)); // NOLINT
135
135
  MOCK_METHOD10(Decimal, int(bool, char, short, int, long, float, // NOLINT
136
- double, unsigned, char*, const string& str));
136
+ double, unsigned, char*, const std::string& str));
137
137
 
138
138
  MOCK_METHOD1(TakesNonConstReference, bool(int&)); // NOLINT
139
- MOCK_METHOD1(TakesConstReference, string(const int&));
139
+ MOCK_METHOD1(TakesConstReference, std::string(const int&));
140
140
 
141
141
  #ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
142
142
  MOCK_METHOD1(TakesConst, bool(const int)); // NOLINT
143
143
  #endif
144
144
 
145
145
  // Tests that the function return type can contain unprotected comma.
146
- MOCK_METHOD0(ReturnTypeWithComma, std::map<int, string>());
146
+ MOCK_METHOD0(ReturnTypeWithComma, std::map<int, std::string>());
147
147
  MOCK_CONST_METHOD1(ReturnTypeWithComma,
148
- std::map<int, string>(int)); // NOLINT
148
+ std::map<int, std::string>(int)); // NOLINT
149
149
 
150
150
  MOCK_METHOD0(OverloadedOnArgumentNumber, int()); // NOLINT
151
151
  MOCK_METHOD1(OverloadedOnArgumentNumber, int(int)); // NOLINT
@@ -157,19 +157,21 @@ class MockFoo : public FooInterface {
157
157
  MOCK_CONST_METHOD0(OverloadedOnConstness, char()); // NOLINT
158
158
 
159
159
  MOCK_METHOD1(TypeWithHole, int(int (*)())); // NOLINT
160
- MOCK_METHOD1(TypeWithComma, int(const std::map<int, string>&)); // NOLINT
160
+ MOCK_METHOD1(TypeWithComma,
161
+ int(const std::map<int, std::string>&)); // NOLINT
161
162
 
162
163
  #if GTEST_OS_WINDOWS
163
164
  MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, CTNullary, int());
164
165
  MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, CTUnary, bool(int));
165
- MOCK_METHOD10_WITH_CALLTYPE(STDMETHODCALLTYPE, CTDecimal, int(bool b, char c,
166
- short d, int e, long f, float g, double h, unsigned i, char* j,
167
- const string& k));
166
+ MOCK_METHOD10_WITH_CALLTYPE(STDMETHODCALLTYPE, CTDecimal,
167
+ int(bool b, char c, short d, int e, long f,
168
+ float g, double h, unsigned i, char* j,
169
+ const std::string& k));
168
170
  MOCK_CONST_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, CTConst, char(int));
169
171
 
170
172
  // Tests that the function return type can contain unprotected comma.
171
173
  MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, CTReturnTypeWithComma,
172
- std::map<int, string>());
174
+ std::map<int, std::string>());
173
175
  #endif // GTEST_OS_WINDOWS
174
176
 
175
177
  private:
@@ -291,7 +293,7 @@ TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnConstnessOfThis) {
291
293
  }
292
294
 
293
295
  TEST_F(FunctionMockerTest, MocksReturnTypeWithComma) {
294
- const std::map<int, string> a_map;
296
+ const std::map<int, std::string> a_map;
295
297
  EXPECT_CALL(mock_foo_, ReturnTypeWithComma())
296
298
  .WillOnce(Return(a_map));
297
299
  EXPECT_CALL(mock_foo_, ReturnTypeWithComma(42))
@@ -341,7 +343,7 @@ TEST_F(FunctionMockerTest, MocksFunctionsConstFunctionWithCallType) {
341
343
  }
342
344
 
343
345
  TEST_F(FunctionMockerTest, MocksReturnTypeWithCommaAndCallType) {
344
- const std::map<int, string> a_map;
346
+ const std::map<int, std::string> a_map;
345
347
  EXPECT_CALL(mock_foo_, CTReturnTypeWithComma())
346
348
  .WillOnce(Return(a_map));
347
349
 
@@ -618,5 +620,28 @@ TEST(MockFunctionTest, AsStdFunctionReturnsReference) {
618
620
  }
619
621
  #endif // GTEST_HAS_STD_FUNCTION_
620
622
 
623
+ struct MockMethodSizes0 {
624
+ MOCK_METHOD0(func, void());
625
+ };
626
+ struct MockMethodSizes1 {
627
+ MOCK_METHOD1(func, void(int));
628
+ };
629
+ struct MockMethodSizes2 {
630
+ MOCK_METHOD2(func, void(int, int));
631
+ };
632
+ struct MockMethodSizes3 {
633
+ MOCK_METHOD3(func, void(int, int, int));
634
+ };
635
+ struct MockMethodSizes4 {
636
+ MOCK_METHOD4(func, void(int, int, int, int));
637
+ };
638
+
639
+ TEST(MockFunctionTest, MockMethodSizeOverhead) {
640
+ EXPECT_EQ(sizeof(MockMethodSizes0), sizeof(MockMethodSizes1));
641
+ EXPECT_EQ(sizeof(MockMethodSizes0), sizeof(MockMethodSizes2));
642
+ EXPECT_EQ(sizeof(MockMethodSizes0), sizeof(MockMethodSizes3));
643
+ EXPECT_EQ(sizeof(MockMethodSizes0), sizeof(MockMethodSizes4));
644
+ }
645
+
621
646
  } // namespace gmock_generated_function_mockers_test
622
647
  } // namespace testing
@@ -63,10 +63,10 @@ TEST(MatcherTupleTest, ForSize2) {
63
63
  }
64
64
 
65
65
  TEST(MatcherTupleTest, ForSize5) {
66
- CompileAssertTypesEqual<tuple<Matcher<int>, Matcher<char>, Matcher<bool>,
67
- Matcher<double>, Matcher<char*> >,
68
- MatcherTuple<tuple<int, char, bool, double, char*>
69
- >::type>();
66
+ CompileAssertTypesEqual<
67
+ tuple<Matcher<int>, Matcher<char>, Matcher<bool>, Matcher<double>,
68
+ Matcher<char*> >,
69
+ MatcherTuple<tuple<int, char, bool, double, char*> >::type>();
70
70
  }
71
71
 
72
72
  // Tests the Function template struct.
@@ -97,8 +97,9 @@ TEST(FunctionTest, Binary) {
97
97
  CompileAssertTypesEqual<bool, F::Argument1>();
98
98
  CompileAssertTypesEqual<const long&, F::Argument2>(); // NOLINT
99
99
  CompileAssertTypesEqual<tuple<bool, const long&>, F::ArgumentTuple>(); // NOLINT
100
- CompileAssertTypesEqual<tuple<Matcher<bool>, Matcher<const long&> >, // NOLINT
101
- F::ArgumentMatcherTuple>();
100
+ CompileAssertTypesEqual<
101
+ tuple<Matcher<bool>, Matcher<const long&> >, // NOLINT
102
+ F::ArgumentMatcherTuple>();
102
103
  CompileAssertTypesEqual<void(bool, const long&), F::MakeResultVoid>(); // NOLINT
103
104
  CompileAssertTypesEqual<IgnoredValue(bool, const long&), // NOLINT
104
105
  F::MakeResultIgnoredValue>();
@@ -114,9 +115,10 @@ TEST(FunctionTest, LongArgumentList) {
114
115
  CompileAssertTypesEqual<const long&, F::Argument5>(); // NOLINT
115
116
  CompileAssertTypesEqual<tuple<bool, int, char*, int&, const long&>, // NOLINT
116
117
  F::ArgumentTuple>();
117
- CompileAssertTypesEqual<tuple<Matcher<bool>, Matcher<int>, Matcher<char*>,
118
- Matcher<int&>, Matcher<const long&> >, // NOLINT
119
- F::ArgumentMatcherTuple>();
118
+ CompileAssertTypesEqual<
119
+ tuple<Matcher<bool>, Matcher<int>, Matcher<char*>, Matcher<int&>,
120
+ Matcher<const long&> >, // NOLINT
121
+ F::ArgumentMatcherTuple>();
120
122
  CompileAssertTypesEqual<void(bool, int, char*, int&, const long&), // NOLINT
121
123
  F::MakeResultVoid>();
122
124
  CompileAssertTypesEqual<
@@ -31,10 +31,19 @@
31
31
  //
32
32
  // This file tests the built-in matchers generated by a script.
33
33
 
34
+ // Silence warning C4244: 'initializing': conversion from 'int' to 'short',
35
+ // possible loss of data and C4100, unreferenced local parameter
36
+ #ifdef _MSC_VER
37
+ # pragma warning(push)
38
+ # pragma warning(disable:4244)
39
+ # pragma warning(disable:4100)
40
+ #endif
41
+
34
42
  #include "gmock/gmock-generated-matchers.h"
35
43
 
36
44
  #include <list>
37
45
  #include <map>
46
+ #include <memory>
38
47
  #include <set>
39
48
  #include <sstream>
40
49
  #include <string>
@@ -57,6 +66,8 @@ using testing::get;
57
66
  using testing::make_tuple;
58
67
  using testing::tuple;
59
68
  using testing::_;
69
+ using testing::AllOf;
70
+ using testing::AnyOf;
60
71
  using testing::Args;
61
72
  using testing::Contains;
62
73
  using testing::ElementsAre;
@@ -79,11 +90,10 @@ using testing::StaticAssertTypeEq;
79
90
  using testing::StrEq;
80
91
  using testing::Value;
81
92
  using testing::internal::ElementsAreArrayMatcher;
82
- using testing::internal::string;
83
93
 
84
94
  // Returns the description of the given matcher.
85
95
  template <typename T>
86
- string Describe(const Matcher<T>& m) {
96
+ std::string Describe(const Matcher<T>& m) {
87
97
  stringstream ss;
88
98
  m.DescribeTo(&ss);
89
99
  return ss.str();
@@ -91,7 +101,7 @@ string Describe(const Matcher<T>& m) {
91
101
 
92
102
  // Returns the description of the negation of the given matcher.
93
103
  template <typename T>
94
- string DescribeNegation(const Matcher<T>& m) {
104
+ std::string DescribeNegation(const Matcher<T>& m) {
95
105
  stringstream ss;
96
106
  m.DescribeNegationTo(&ss);
97
107
  return ss.str();
@@ -99,7 +109,7 @@ string DescribeNegation(const Matcher<T>& m) {
99
109
 
100
110
  // Returns the reason why x matches, or doesn't match, m.
101
111
  template <typename MatcherType, typename Value>
102
- string Explain(const MatcherType& m, const Value& x) {
112
+ std::string Explain(const MatcherType& m, const Value& x) {
103
113
  stringstream ss;
104
114
  m.ExplainMatchResultTo(x, &ss);
105
115
  return ss.str();
@@ -296,7 +306,7 @@ TEST(ElementsAreTest, CanDescribeExpectingOneElement) {
296
306
  }
297
307
 
298
308
  TEST(ElementsAreTest, CanDescribeExpectingManyElements) {
299
- Matcher<list<string> > m = ElementsAre(StrEq("one"), "two");
309
+ Matcher<list<std::string> > m = ElementsAre(StrEq("one"), "two");
300
310
  EXPECT_EQ("has 2 elements where\n"
301
311
  "element #0 is equal to \"one\",\n"
302
312
  "element #1 is equal to \"two\"", Describe(m));
@@ -314,7 +324,7 @@ TEST(ElementsAreTest, CanDescribeNegationOfExpectingOneElment) {
314
324
  }
315
325
 
316
326
  TEST(ElementsAreTest, CanDescribeNegationOfExpectingManyElements) {
317
- Matcher<const list<string>& > m = ElementsAre("one", "two");
327
+ Matcher<const list<std::string>&> m = ElementsAre("one", "two");
318
328
  EXPECT_EQ("doesn't have 2 elements, or\n"
319
329
  "element #0 isn't equal to \"one\", or\n"
320
330
  "element #1 isn't equal to \"two\"", DescribeNegation(m));
@@ -365,21 +375,21 @@ TEST(ElementsAreTest, CanExplainMismatchRightSize) {
365
375
  }
366
376
 
367
377
  TEST(ElementsAreTest, MatchesOneElementVector) {
368
- vector<string> test_vector;
378
+ vector<std::string> test_vector;
369
379
  test_vector.push_back("test string");
370
380
 
371
381
  EXPECT_THAT(test_vector, ElementsAre(StrEq("test string")));
372
382
  }
373
383
 
374
384
  TEST(ElementsAreTest, MatchesOneElementList) {
375
- list<string> test_list;
385
+ list<std::string> test_list;
376
386
  test_list.push_back("test string");
377
387
 
378
388
  EXPECT_THAT(test_list, ElementsAre("test string"));
379
389
  }
380
390
 
381
391
  TEST(ElementsAreTest, MatchesThreeElementVector) {
382
- vector<string> test_vector;
392
+ vector<std::string> test_vector;
383
393
  test_vector.push_back("one");
384
394
  test_vector.push_back("two");
385
395
  test_vector.push_back("three");
@@ -428,30 +438,30 @@ TEST(ElementsAreTest, MatchesTenElementVector) {
428
438
  }
429
439
 
430
440
  TEST(ElementsAreTest, DoesNotMatchWrongSize) {
431
- vector<string> test_vector;
441
+ vector<std::string> test_vector;
432
442
  test_vector.push_back("test string");
433
443
  test_vector.push_back("test string");
434
444
 
435
- Matcher<vector<string> > m = ElementsAre(StrEq("test string"));
445
+ Matcher<vector<std::string> > m = ElementsAre(StrEq("test string"));
436
446
  EXPECT_FALSE(m.Matches(test_vector));
437
447
  }
438
448
 
439
449
  TEST(ElementsAreTest, DoesNotMatchWrongValue) {
440
- vector<string> test_vector;
450
+ vector<std::string> test_vector;
441
451
  test_vector.push_back("other string");
442
452
 
443
- Matcher<vector<string> > m = ElementsAre(StrEq("test string"));
453
+ Matcher<vector<std::string> > m = ElementsAre(StrEq("test string"));
444
454
  EXPECT_FALSE(m.Matches(test_vector));
445
455
  }
446
456
 
447
457
  TEST(ElementsAreTest, DoesNotMatchWrongOrder) {
448
- vector<string> test_vector;
458
+ vector<std::string> test_vector;
449
459
  test_vector.push_back("one");
450
460
  test_vector.push_back("three");
451
461
  test_vector.push_back("two");
452
462
 
453
- Matcher<vector<string> > m = ElementsAre(
454
- StrEq("one"), StrEq("two"), StrEq("three"));
463
+ Matcher<vector<std::string> > m =
464
+ ElementsAre(StrEq("one"), StrEq("two"), StrEq("three"));
455
465
  EXPECT_FALSE(m.Matches(test_vector));
456
466
  }
457
467
 
@@ -527,7 +537,7 @@ TEST(ElementsAreTest, WorksWithTwoDimensionalNativeArray) {
527
537
  }
528
538
 
529
539
  TEST(ElementsAreTest, AcceptsStringLiteral) {
530
- string array[] = { "hi", "one", "two" };
540
+ std::string array[] = {"hi", "one", "two"};
531
541
  EXPECT_THAT(array, ElementsAre("hi", "one", "two"));
532
542
  EXPECT_THAT(array, Not(ElementsAre("hi", "one", "too")));
533
543
  }
@@ -546,10 +556,10 @@ TEST(ElementsAreTest, AcceptsArrayWithUnknownSize) {
546
556
  // The size of kHi is not known in this test, but ElementsAre() should
547
557
  // still accept it.
548
558
 
549
- string array1[] = { "hi" };
559
+ std::string array1[] = {"hi"};
550
560
  EXPECT_THAT(array1, ElementsAre(kHi));
551
561
 
552
- string array2[] = { "ho" };
562
+ std::string array2[] = {"ho"};
553
563
  EXPECT_THAT(array2, Not(ElementsAre(kHi)));
554
564
  }
555
565
 
@@ -589,7 +599,7 @@ TEST(ElementsAreArrayTest, CanBeCreatedWithValueArray) {
589
599
  TEST(ElementsAreArrayTest, CanBeCreatedWithArraySize) {
590
600
  const char* a[] = { "one", "two", "three" };
591
601
 
592
- vector<string> test_vector(a, a + GTEST_ARRAY_SIZE_(a));
602
+ vector<std::string> test_vector(a, a + GTEST_ARRAY_SIZE_(a));
593
603
  EXPECT_THAT(test_vector, ElementsAreArray(a, GTEST_ARRAY_SIZE_(a)));
594
604
 
595
605
  const char** p = a;
@@ -600,7 +610,7 @@ TEST(ElementsAreArrayTest, CanBeCreatedWithArraySize) {
600
610
  TEST(ElementsAreArrayTest, CanBeCreatedWithoutArraySize) {
601
611
  const char* a[] = { "one", "two", "three" };
602
612
 
603
- vector<string> test_vector(a, a + GTEST_ARRAY_SIZE_(a));
613
+ vector<std::string> test_vector(a, a + GTEST_ARRAY_SIZE_(a));
604
614
  EXPECT_THAT(test_vector, ElementsAreArray(a));
605
615
 
606
616
  test_vector[0] = "1";
@@ -608,10 +618,10 @@ TEST(ElementsAreArrayTest, CanBeCreatedWithoutArraySize) {
608
618
  }
609
619
 
610
620
  TEST(ElementsAreArrayTest, CanBeCreatedWithMatcherArray) {
611
- const Matcher<string> kMatcherArray[] =
612
- { StrEq("one"), StrEq("two"), StrEq("three") };
621
+ const Matcher<std::string> kMatcherArray[] = {StrEq("one"), StrEq("two"),
622
+ StrEq("three")};
613
623
 
614
- vector<string> test_vector;
624
+ vector<std::string> test_vector;
615
625
  test_vector.push_back("one");
616
626
  test_vector.push_back("two");
617
627
  test_vector.push_back("three");
@@ -640,7 +650,7 @@ TEST(ElementsAreArrayTest, TakesInitializerList) {
640
650
  }
641
651
 
642
652
  TEST(ElementsAreArrayTest, TakesInitializerListOfCStrings) {
643
- const string a[5] = { "a", "b", "c", "d", "e" };
653
+ const std::string a[5] = {"a", "b", "c", "d", "e"};
644
654
  EXPECT_THAT(a, ElementsAreArray({ "a", "b", "c", "d", "e" }));
645
655
  EXPECT_THAT(a, Not(ElementsAreArray({ "a", "b", "c", "e", "d" })));
646
656
  EXPECT_THAT(a, Not(ElementsAreArray({ "a", "b", "c", "d", "ef" })));
@@ -751,9 +761,9 @@ MATCHER(IsEven2, negation ? "is odd" : "is even") {
751
761
 
752
762
  // This also tests that the description string can reference matcher
753
763
  // parameters.
754
- MATCHER_P2(EqSumOf, x, y,
755
- string(negation ? "doesn't equal" : "equals") + " the sum of " +
756
- PrintToString(x) + " and " + PrintToString(y)) {
764
+ MATCHER_P2(EqSumOf, x, y, std::string(negation ? "doesn't equal" : "equals") +
765
+ " the sum of " + PrintToString(x) + " and " +
766
+ PrintToString(y)) {
757
767
  if (arg == (x + y)) {
758
768
  *result_listener << "OK";
759
769
  return true;
@@ -1117,12 +1127,12 @@ TEST(ContainsTest, ListMatchesWhenElementIsInContainer) {
1117
1127
  EXPECT_THAT(some_list, Contains(Gt(2.5)));
1118
1128
  EXPECT_THAT(some_list, Contains(Eq(2.0f)));
1119
1129
 
1120
- list<string> another_list;
1130
+ list<std::string> another_list;
1121
1131
  another_list.push_back("fee");
1122
1132
  another_list.push_back("fie");
1123
1133
  another_list.push_back("foe");
1124
1134
  another_list.push_back("fum");
1125
- EXPECT_THAT(another_list, Contains(string("fee")));
1135
+ EXPECT_THAT(another_list, Contains(std::string("fee")));
1126
1136
  }
1127
1137
 
1128
1138
  TEST(ContainsTest, ListDoesNotMatchWhenElementIsNotInContainer) {
@@ -1146,7 +1156,7 @@ TEST(ContainsTest, SetMatchesWhenElementIsInContainer) {
1146
1156
  another_set.insert("fie");
1147
1157
  another_set.insert("foe");
1148
1158
  another_set.insert("fum");
1149
- EXPECT_THAT(another_set, Contains(Eq(string("fum"))));
1159
+ EXPECT_THAT(another_set, Contains(Eq(std::string("fum"))));
1150
1160
  }
1151
1161
 
1152
1162
  TEST(ContainsTest, SetDoesNotMatchWhenElementIsNotInContainer) {
@@ -1157,7 +1167,7 @@ TEST(ContainsTest, SetDoesNotMatchWhenElementIsNotInContainer) {
1157
1167
 
1158
1168
  set<const char*> c_string_set;
1159
1169
  c_string_set.insert("hello");
1160
- EXPECT_THAT(c_string_set, Not(Contains(string("hello").c_str())));
1170
+ EXPECT_THAT(c_string_set, Not(Contains(std::string("hello").c_str())));
1161
1171
  }
1162
1172
 
1163
1173
  TEST(ContainsTest, ExplainsMatchResultCorrectly) {
@@ -1189,13 +1199,14 @@ TEST(ContainsTest, MapMatchesWhenElementIsInContainer) {
1189
1199
  my_map[bar] = 2;
1190
1200
  EXPECT_THAT(my_map, Contains(pair<const char* const, int>(bar, 2)));
1191
1201
 
1192
- map<string, int> another_map;
1202
+ map<std::string, int> another_map;
1193
1203
  another_map["fee"] = 1;
1194
1204
  another_map["fie"] = 2;
1195
1205
  another_map["foe"] = 3;
1196
1206
  another_map["fum"] = 4;
1197
- EXPECT_THAT(another_map, Contains(pair<const string, int>(string("fee"), 1)));
1198
- EXPECT_THAT(another_map, Contains(pair<const string, int>("fie", 2)));
1207
+ EXPECT_THAT(another_map,
1208
+ Contains(pair<const std::string, int>(std::string("fee"), 1)));
1209
+ EXPECT_THAT(another_map, Contains(pair<const std::string, int>("fie", 2)));
1199
1210
  }
1200
1211
 
1201
1212
  TEST(ContainsTest, MapDoesNotMatchWhenElementIsNotInContainer) {
@@ -1207,7 +1218,7 @@ TEST(ContainsTest, MapDoesNotMatchWhenElementIsNotInContainer) {
1207
1218
 
1208
1219
  TEST(ContainsTest, ArrayMatchesWhenElementIsInContainer) {
1209
1220
  const char* string_array[] = { "fee", "fie", "foe", "fum" };
1210
- EXPECT_THAT(string_array, Contains(Eq(string("fum"))));
1221
+ EXPECT_THAT(string_array, Contains(Eq(std::string("fum"))));
1211
1222
  }
1212
1223
 
1213
1224
  TEST(ContainsTest, ArrayDoesNotMatchWhenElementIsNotInContainer) {
@@ -1283,4 +1294,48 @@ TEST(AnyOfTest, DoesNotCallAnyOfUnqualified) {
1283
1294
  # pragma warning(pop)
1284
1295
  #endif
1285
1296
 
1297
+ #if GTEST_LANG_CXX11
1298
+
1299
+ TEST(AllOfTest, WorksOnMoveOnlyType) {
1300
+ std::unique_ptr<int> p(new int(3));
1301
+ EXPECT_THAT(p, AllOf(Pointee(Eq(3)), Pointee(Gt(0)), Pointee(Lt(5))));
1302
+ EXPECT_THAT(p, Not(AllOf(Pointee(Eq(3)), Pointee(Gt(0)), Pointee(Lt(3)))));
1303
+ }
1304
+
1305
+ TEST(AnyOfTest, WorksOnMoveOnlyType) {
1306
+ std::unique_ptr<int> p(new int(3));
1307
+ EXPECT_THAT(p, AnyOf(Pointee(Eq(5)), Pointee(Lt(0)), Pointee(Lt(5))));
1308
+ EXPECT_THAT(p, Not(AnyOf(Pointee(Eq(5)), Pointee(Lt(0)), Pointee(Gt(5)))));
1309
+ }
1310
+
1311
+ MATCHER(IsNotNull, "") {
1312
+ return arg != nullptr;
1313
+ }
1314
+
1315
+ // Verifies that a matcher defined using MATCHER() can work on
1316
+ // move-only types.
1317
+ TEST(MatcherMacroTest, WorksOnMoveOnlyType) {
1318
+ std::unique_ptr<int> p(new int(3));
1319
+ EXPECT_THAT(p, IsNotNull());
1320
+ EXPECT_THAT(std::unique_ptr<int>(), Not(IsNotNull()));
1321
+ }
1322
+
1323
+ MATCHER_P(UniquePointee, pointee, "") {
1324
+ return *arg == pointee;
1325
+ }
1326
+
1327
+ // Verifies that a matcher defined using MATCHER_P*() can work on
1328
+ // move-only types.
1329
+ TEST(MatcherPMacroTest, WorksOnMoveOnlyType) {
1330
+ std::unique_ptr<int> p(new int(3));
1331
+ EXPECT_THAT(p, UniquePointee(3));
1332
+ EXPECT_THAT(p, Not(UniquePointee(2)));
1333
+ }
1334
+
1335
+ #endif // GTEST_LASNG_CXX11
1336
+
1286
1337
  } // namespace
1338
+
1339
+ #ifdef _MSC_VER
1340
+ # pragma warning(pop)
1341
+ #endif