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
@@ -0,0 +1,9 @@
1
+ libdir=@CMAKE_INSTALL_FULL_LIBDIR@
2
+ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
3
+
4
+ Name: gtest
5
+ Description: GoogleTest (without main() function)
6
+ Version: @PROJECT_VERSION@
7
+ URL: https://github.com/google/googletest
8
+ Libs: -L${libdir} -lgtest @CMAKE_THREAD_LIBS_INIT@
9
+ Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@
@@ -0,0 +1,10 @@
1
+ libdir=@CMAKE_INSTALL_FULL_LIBDIR@
2
+ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
3
+
4
+ Name: gtest_main
5
+ Description: GoogleTest (with main() function)
6
+ Version: @PROJECT_VERSION@
7
+ URL: https://github.com/google/googletest
8
+ Requires: gtest
9
+ Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@
10
+ Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@
@@ -46,9 +46,16 @@ endmacro()
46
46
  # Google Mock. You can tweak these definitions to suit your need. A
47
47
  # variable's value is empty before it's explicitly assigned to.
48
48
  macro(config_compiler_and_linker)
49
- if (NOT gtest_disable_pthreads)
49
+ # Note: pthreads on MinGW is not supported, even if available
50
+ # instead, we use windows threading primitives
51
+ unset(GTEST_HAS_PTHREAD)
52
+ if (NOT gtest_disable_pthreads AND NOT MINGW)
50
53
  # Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
54
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
51
55
  find_package(Threads)
56
+ if (CMAKE_USE_PTHREADS_INIT)
57
+ set(GTEST_HAS_PTHREAD ON)
58
+ endif()
52
59
  endif()
53
60
 
54
61
  fix_default_compiler_settings_()
@@ -84,10 +91,13 @@ macro(config_compiler_and_linker)
84
91
  set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
85
92
  set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
86
93
  set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")
87
- set(cxx_no_exception_flags "-D_HAS_EXCEPTIONS=0")
94
+ set(cxx_no_exception_flags "-EHs-c- -D_HAS_EXCEPTIONS=0")
88
95
  set(cxx_no_rtti_flags "-GR-")
89
96
  elseif (CMAKE_COMPILER_IS_GNUCXX)
90
- set(cxx_base_flags "-Wall -Wshadow")
97
+ set(cxx_base_flags "-Wall -Wshadow -Werror")
98
+ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
99
+ set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else")
100
+ endif()
91
101
  set(cxx_exception_flags "-fexceptions")
92
102
  set(cxx_no_exception_flags "-fno-exceptions")
93
103
  # Until version 4.3.2, GCC doesn't define a macro to indicate
@@ -119,11 +129,13 @@ macro(config_compiler_and_linker)
119
129
  set(cxx_no_rtti_flags "")
120
130
  endif()
121
131
 
122
- if (CMAKE_USE_PTHREADS_INIT) # The pthreads library is available and allowed.
123
- set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=1")
132
+ # The pthreads library is available and allowed?
133
+ if (DEFINED GTEST_HAS_PTHREAD)
134
+ set(GTEST_HAS_PTHREAD_MACRO "-DGTEST_HAS_PTHREAD=1")
124
135
  else()
125
- set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=0")
136
+ set(GTEST_HAS_PTHREAD_MACRO "-DGTEST_HAS_PTHREAD=0")
126
137
  endif()
138
+ set(cxx_base_flags "${cxx_base_flags} ${GTEST_HAS_PTHREAD_MACRO}")
127
139
 
128
140
  # For building gtest's own tests and samples.
129
141
  set(cxx_exception "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_exception_flags}")
@@ -146,12 +158,16 @@ function(cxx_library_with_type name type cxx_flags)
146
158
  set_target_properties(${name}
147
159
  PROPERTIES
148
160
  COMPILE_FLAGS "${cxx_flags}")
161
+ # Generate debug library name with a postfix.
162
+ set_target_properties(${name}
163
+ PROPERTIES
164
+ DEBUG_POSTFIX "d")
149
165
  if (BUILD_SHARED_LIBS OR type STREQUAL "SHARED")
150
166
  set_target_properties(${name}
151
167
  PROPERTIES
152
168
  COMPILE_DEFINITIONS "GTEST_CREATE_SHARED_LIBRARY=1")
153
169
  endif()
154
- if (CMAKE_USE_PTHREADS_INIT)
170
+ if (DEFINED GTEST_HAS_PTHREAD)
155
171
  target_link_libraries(${name} ${CMAKE_THREAD_LIBS_INIT})
156
172
  endif()
157
173
  endfunction()
@@ -174,6 +190,10 @@ endfunction()
174
190
  # is built from the given source files with the given compiler flags.
175
191
  function(cxx_executable_with_flags name cxx_flags libs)
176
192
  add_executable(${name} ${ARGN})
193
+ if (MSVC AND (NOT (MSVC_VERSION LESS 1700))) # 1700 is Visual Studio 2012.
194
+ # BigObj required for tests.
195
+ set(cxx_flags "${cxx_flags} -bigobj")
196
+ endif()
177
197
  if (cxx_flags)
178
198
  set_target_properties(${name}
179
199
  PROPERTIES
@@ -228,15 +248,33 @@ endfunction()
228
248
  # creates a Python test with the given name whose main module is in
229
249
  # test/name.py. It does nothing if Python is not installed.
230
250
  function(py_test name)
231
- # We are not supporting Python tests on Linux yet as they consider
232
- # all Linux environments to be google3 and try to use google3 features.
233
251
  if (PYTHONINTERP_FOUND)
234
- # ${CMAKE_BINARY_DIR} is known at configuration time, so we can
235
- # directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
236
- # only at ctest runtime (by calling ctest -c <Configuration>), so
237
- # we have to escape $ to delay variable substitution here.
238
- add_test(${name}
239
- ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
252
+ if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1)
253
+ if (CMAKE_CONFIGURATION_TYPES)
254
+ # Multi-configuration build generators as for Visual Studio save
255
+ # output in a subdirectory of CMAKE_CURRENT_BINARY_DIR (Debug,
256
+ # Release etc.), so we have to provide it here.
257
+ add_test(
258
+ NAME ${name}
259
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
260
+ --build_dir=${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>)
261
+ else (CMAKE_CONFIGURATION_TYPES)
262
+ # Single-configuration build generators like Makefile generators
263
+ # don't have subdirs below CMAKE_CURRENT_BINARY_DIR.
264
+ add_test(
265
+ NAME ${name}
266
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
267
+ --build_dir=${CMAKE_CURRENT_BINARY_DIR})
268
+ endif (CMAKE_CONFIGURATION_TYPES)
269
+ else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1)
270
+ # ${CMAKE_CURRENT_BINARY_DIR} is known at configuration time, so we can
271
+ # directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
272
+ # only at ctest runtime (by calling ctest -c <Configuration>), so
273
+ # we have to escape $ to delay variable substitution here.
274
+ add_test(
275
+ ${name}
276
+ ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
240
277
  --build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
241
- endif()
278
+ endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1)
279
+ endif(PYTHONINTERP_FOUND)
242
280
  endfunction()
@@ -5,7 +5,7 @@ m4_include(m4/acx_pthread.m4)
5
5
  # "[1.0.1]"). It also asumes that there won't be any closing parenthesis
6
6
  # between "AC_INIT(" and the closing ")" including comments and strings.
7
7
  AC_INIT([Google C++ Testing Framework],
8
- [1.7.0],
8
+ [1.8.0],
9
9
  [googletestframework@googlegroups.com],
10
10
  [gtest])
11
11
 
@@ -0,0 +1,146 @@
1
+ ## Using GoogleTest from various build systems ##
2
+
3
+ GoogleTest comes with pkg-config files that can be used to determine all
4
+ necessary flags for compiling and linking to GoogleTest (and GoogleMock).
5
+ Pkg-config is a standardised plain-text format containing
6
+
7
+ * the includedir (-I) path
8
+ * necessary macro (-D) definitions
9
+ * further required flags (-pthread)
10
+ * the library (-L) path
11
+ * the library (-l) to link to
12
+
13
+ All current build systems support pkg-config in one way or another. For
14
+ all examples here we assume you want to compile the sample
15
+ `samples/sample3_unittest.cc`.
16
+
17
+
18
+ ### CMake ###
19
+
20
+ Using `pkg-config` in CMake is fairly easy:
21
+
22
+ ```
23
+ cmake_minimum_required(VERSION 3.0)
24
+
25
+ cmake_policy(SET CMP0048 NEW)
26
+ project(my_gtest_pkgconfig VERSION 0.0.1 LANGUAGES CXX)
27
+
28
+ find_package(PkgConfig)
29
+ pkg_search_module(GTEST REQUIRED gtest_main)
30
+
31
+ add_executable(testapp samples/sample3_unittest.cc)
32
+ target_link_libraries(testapp ${GTEST_LDFLAGS})
33
+ target_compile_options(testapp PUBLIC ${GTEST_CFLAGS})
34
+
35
+ include(CTest)
36
+ add_test(first_and_only_test testapp)
37
+ ```
38
+
39
+ It is generally recommended that you use `target_compile_options` + `_CFLAGS`
40
+ over `target_include_directories` + `_INCLUDE_DIRS` as the former includes not
41
+ just -I flags (GoogleTest might require a macro indicating to internal headers
42
+ that all libraries have been compiled with threading enabled. In addition,
43
+ GoogleTest might also require `-pthread` in the compiling step, and as such
44
+ splitting the pkg-config `Cflags` variable into include dirs and macros for
45
+ `target_compile_definitions()` might still miss this). The same recommendation
46
+ goes for using `_LDFLAGS` over the more commonplace `_LIBRARIES`, which
47
+ happens to discard `-L` flags and `-pthread`.
48
+
49
+
50
+ ### Autotools ###
51
+
52
+ Finding GoogleTest in Autoconf and using it from Automake is also fairly easy:
53
+
54
+ In your `configure.ac`:
55
+
56
+ ```
57
+ AC_PREREQ([2.69])
58
+ AC_INIT([my_gtest_pkgconfig], [0.0.1])
59
+ AC_CONFIG_SRCDIR([samples/sample3_unittest.cc])
60
+ AC_PROG_CXX
61
+
62
+ PKG_CHECK_MODULES([GTEST], [gtest_main])
63
+
64
+ AM_INIT_AUTOMAKE([foreign subdir-objects])
65
+ AC_CONFIG_FILES([Makefile])
66
+ AC_OUTPUT
67
+ ```
68
+
69
+ and in your `Makefile.am`:
70
+
71
+ ```
72
+ check_PROGRAMS = testapp
73
+ TESTS = $(check_PROGRAMS)
74
+
75
+ testapp_SOURCES = samples/sample3_unittest.cc
76
+ testapp_CXXFLAGS = $(GTEST_CFLAGS)
77
+ testapp_LDADD = $(GTEST_LIBS)
78
+ ```
79
+
80
+
81
+ ### Meson ###
82
+
83
+ Meson natively uses pkgconfig to query dependencies:
84
+
85
+ ```
86
+ project('my_gtest_pkgconfig', 'cpp', version : '0.0.1')
87
+
88
+ gtest_dep = dependency('gtest_main')
89
+
90
+ testapp = executable(
91
+ 'testapp',
92
+ files(['samples/sample3_unittest.cc']),
93
+ dependencies : gtest_dep,
94
+ install : false)
95
+
96
+ test('first_and_only_test', testapp)
97
+ ```
98
+
99
+
100
+ ### Plain Makefiles ###
101
+
102
+ Since `pkg-config` is a small Unix command-line utility, it can be used
103
+ in handwritten `Makefile`s too:
104
+
105
+ ```
106
+ GTEST_CFLAGS = `pkg-config --cflags gtest_main`
107
+ GTEST_LIBS = `pkg-config --libs gtest_main`
108
+
109
+ .PHONY: tests all
110
+
111
+ tests: all
112
+ ./testapp
113
+
114
+ all: testapp
115
+
116
+ testapp: testapp.o
117
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(GTEST_LIBS)
118
+
119
+ testapp.o: samples/sample3_unittest.cc
120
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $< -c -o $@ $(GTEST_CFLAGS)
121
+ ```
122
+
123
+
124
+ ### Help! pkg-config can't find GoogleTest! ###
125
+
126
+ Let's say you have a `CMakeLists.txt` along the lines of the one in this
127
+ tutorial and you try to run `cmake`. It is very possible that you get a
128
+ failure along the lines of:
129
+
130
+ ```
131
+ -- Checking for one of the modules 'gtest_main'
132
+ CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:640 (message):
133
+ None of the required 'gtest_main' found
134
+ ```
135
+
136
+ These failures are common if you installed GoogleTest yourself and have not
137
+ sourced it from a distro or other package manager. If so, you need to tell
138
+ pkg-config where it can find the `.pc` files containing the information.
139
+ Say you installed GoogleTest to `/usr/local`, then it might be that the
140
+ `.pc` files are installed under `/usr/local/lib64/pkgconfig`. If you set
141
+
142
+ ```
143
+ export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
144
+ ```
145
+
146
+ pkg-config will also try to look in `PKG_CONFIG_PATH` to find `gtest_main.pc`.
@@ -40,7 +40,7 @@ maintain.
40
40
  ## Highlights ##
41
41
 
42
42
  * The implementation is in a single Python script and thus ultra portable: no build or installation is needed and it works cross platforms.
43
- * Pump tries to be smart with respect to [Google's style guide](http://code.google.com/p/google-styleguide/): it breaks long lines (easy to have when they are generated) at acceptable places to fit within 80 columns and indent the continuation lines correctly.
43
+ * Pump tries to be smart with respect to [Google's style guide](https://github.com/google/styleguide): it breaks long lines (easy to have when they are generated) at acceptable places to fit within 80 columns and indent the continuation lines correctly.
44
44
  * The format is human-readable and more concise than XML.
45
45
  * The format works relatively well with Emacs' C++ mode.
46
46
 
@@ -169,7 +169,7 @@ improving Pump.
169
169
 
170
170
  ## Real Examples ##
171
171
 
172
- You can find real-world applications of Pump in [Google Test](http://www.google.com/codesearch?q=file%3A\.pump%24+package%3Ahttp%3A%2F%2Fgoogletest\.googlecode\.com) and [Google Mock](http://www.google.com/codesearch?q=file%3A\.pump%24+package%3Ahttp%3A%2F%2Fgooglemock\.googlecode\.com). The source file `foo.h.pump` generates `foo.h`.
172
+ You can find real-world applications of Pump in [Google Test](https://github.com/google/googletest/tree/master/googletest) and [Google Mock](https://github.com/google/googletest/tree/master/googlemock). The source file `foo.h.pump` generates `foo.h`.
173
173
 
174
174
  ## Tips ##
175
175
 
@@ -6,13 +6,13 @@ This guide will explain how to use the Google Testing Framework in your Xcode pr
6
6
 
7
7
  Here is the quick guide for using Google Test in your Xcode project.
8
8
 
9
- 1. Download the source from the [website](http://code.google.com/p/googletest) using this command: `svn checkout http://googletest.googlecode.com/svn/trunk/ googletest-read-only`
9
+ 1. Download the source from the [website](http://code.google.com/p/googletest) using this command: `svn checkout http://googletest.googlecode.com/svn/trunk/ googletest-read-only`.
10
10
  1. Open up the `gtest.xcodeproj` in the `googletest-read-only/xcode/` directory and build the gtest.framework.
11
- 1. Create a new "Shell Tool" target in your Xcode project called something like "UnitTests"
12
- 1. Add the gtest.framework to your project and add it to the "Link Binary with Libraries" build phase of "UnitTests"
13
- 1. Add your unit test source code to the "Compile Sources" build phase of "UnitTests"
11
+ 1. Create a new "Shell Tool" target in your Xcode project called something like "UnitTests".
12
+ 1. Add the gtest.framework to your project and add it to the "Link Binary with Libraries" build phase of "UnitTests".
13
+ 1. Add your unit test source code to the "Compile Sources" build phase of "UnitTests".
14
14
  1. Edit the "UnitTests" executable and add an environment variable named "DYLD\_FRAMEWORK\_PATH" with a value equal to the path to the framework containing the gtest.framework relative to the compiled executable.
15
- 1. Build and Go
15
+ 1. Build and Go.
16
16
 
17
17
  The following sections further explain each of the steps listed above in depth, describing in more detail how to complete it including some variations.
18
18
 
@@ -66,7 +66,7 @@ If you haven't set up the DYLD\_FRAMEWORK\_PATH, correctly, you might get a mess
66
66
  Reason: image not found
67
67
  ```
68
68
 
69
- To correct this problem, got to the directory containing the executable named in "Referenced from:" value in the error message above. Then, with the terminal in this location, find the relative path to the directory containing the gtest.framework. That is the value you'll need to set as the DYLD\_FRAMEWORK\_PATH.
69
+ To correct this problem, go to to the directory containing the executable named in "Referenced from:" value in the error message above. Then, with the terminal in this location, find the relative path to the directory containing the gtest.framework. That is the value you'll need to set as the DYLD\_FRAMEWORK\_PATH.
70
70
 
71
71
  # Build and Go #
72
72
 
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- Now that you have read [Primer](Primer.md) and learned how to write tests
3
+ Now that you have read [Primer](primer.md) and learned how to write tests
4
4
  using Google Test, it's time to learn some new tricks. This document
5
5
  will show you more assertions as well as how to construct complex
6
6
  failure messages, propagate fatal failures, reuse and speed up your
@@ -15,7 +15,7 @@ assertions.
15
15
 
16
16
  These three assertions do not actually test a value or expression. Instead,
17
17
  they generate a success or failure directly. Like the macros that actually
18
- perform a test, you may stream a custom failure message into the them.
18
+ perform a test, you may stream a custom failure message into them.
19
19
 
20
20
  | `SUCCEED();` |
21
21
  |:-------------|
@@ -32,7 +32,7 @@ output in the future.
32
32
 
33
33
  `FAIL()` generates a fatal failure, while `ADD_FAILURE()` and `ADD_FAILURE_AT()` generate a nonfatal
34
34
  failure. These are useful when control flow, rather than a Boolean expression,
35
- deteremines the test's success or failure. For example, you might want to write
35
+ determines the test's success or failure. For example, you might want to write
36
36
  something like:
37
37
 
38
38
  ```
@@ -125,10 +125,10 @@ c is 10<br>
125
125
 
126
126
  **Notes:**
127
127
 
128
- 1. If you see a compiler error "no matching function to call" when using `ASSERT_PRED*` or `EXPECT_PRED*`, please see [this FAQ](FAQ.md#the-compiler-complains-no-matching-function-to-call-when-i-use-assert_predn-how-do-i-fix-it) for how to resolve it.
128
+ 1. If you see a compiler error "no matching function to call" when using `ASSERT_PRED*` or `EXPECT_PRED*`, please see [this FAQ](faq.md#the-compiler-complains-no-matching-function-to-call-when-i-use-assert_predn-how-do-i-fix-it) for how to resolve it.
129
129
  1. Currently we only provide predicate assertions of arity <= 5. If you need a higher-arity assertion, let us know.
130
130
 
131
- _Availability_: Linux, Windows, Mac
131
+ _Availability_: Linux, Windows, Mac.
132
132
 
133
133
  ### Using a Function That Returns an AssertionResult ###
134
134
 
@@ -306,7 +306,7 @@ carefully choose the error bound. If they don't want or care to, comparing in
306
306
  terms of Units in the Last Place (ULPs) is a good default, and Google Test
307
307
  provides assertions to do this. Full details about ULPs are quite long; if you
308
308
  want to learn more, see
309
- [this article on float comparison](http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm).
309
+ [this article on float comparison](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).
310
310
 
311
311
  ### Floating-Point Macros ###
312
312
 
@@ -675,7 +675,7 @@ syntax only.
675
675
  ## How It Works ##
676
676
 
677
677
  Under the hood, `ASSERT_EXIT()` spawns a new process and executes the
678
- death test statement in that process. The details of of how precisely
678
+ death test statement in that process. The details of how precisely
679
679
  that happens depend on the platform and the variable
680
680
  `::testing::GTEST_FLAG(death_test_style)` (which is initialized from the
681
681
  command-line flag `--gtest_death_test_style`).
@@ -787,15 +787,17 @@ If a test sub-routine is called from several places, when an assertion
787
787
  inside it fails, it can be hard to tell which invocation of the
788
788
  sub-routine the failure is from. You can alleviate this problem using
789
789
  extra logging or custom failure messages, but that usually clutters up
790
- your tests. A better solution is to use the `SCOPED_TRACE` macro:
790
+ your tests. A better solution is to use the `SCOPED_TRACE` macro or
791
+ the `ScopedTrace` utility:
791
792
 
792
- | `SCOPED_TRACE(`_message_`);` |
793
- |:-----------------------------|
793
+ | `SCOPED_TRACE(`_message_`);` | `::testing::ScopedTrace trace(`_"file\_path"_`, `_line\_number_`, `_message_`);` |
794
+ |:-----------------------------|:---------------------------------------------------------------------------------|
794
795
 
795
- where _message_ can be anything streamable to `std::ostream`. This
796
- macro will cause the current file name, line number, and the given
797
- message to be added in every failure message. The effect will be
798
- undone when the control leaves the current lexical scope.
796
+ where `message` can be anything streamable to `std::ostream`. `SCOPED_TRACE`
797
+ macro will cause the current file name, line number, and the given message to be
798
+ added in every failure message. `ScopedTrace` accepts explicit file name and
799
+ line number in arguments, which is useful for writing test helpers. The effect
800
+ will be undone when the control leaves the current lexical scope.
799
801
 
800
802
  For example,
801
803
 
@@ -870,13 +872,33 @@ TEST(FooTest, Bar) {
870
872
  }
871
873
  ```
872
874
 
873
- Since we don't use exceptions, it is technically impossible to
874
- implement the intended behavior here. To alleviate this, Google Test
875
- provides two solutions. You could use either the
876
- `(ASSERT|EXPECT)_NO_FATAL_FAILURE` assertions or the
877
- `HasFatalFailure()` function. They are described in the following two
875
+ To alleviate this, gUnit provides three different solutions. You could use
876
+ either exceptions, the `(ASSERT|EXPECT)_NO_FATAL_FAILURE` assertions or the
877
+ `HasFatalFailure()` function. They are described in the following two
878
878
  subsections.
879
879
 
880
+ #### Asserting on Subroutines with an exception
881
+
882
+ The following code can turn ASSERT-failure into an exception:
883
+
884
+ ```c++
885
+ class ThrowListener : public testing::EmptyTestEventListener {
886
+ void OnTestPartResult(const testing::TestPartResult& result) override {
887
+ if (result.type() == testing::TestPartResult::kFatalFailure) {
888
+ throw testing::AssertionException(result);
889
+ }
890
+ }
891
+ };
892
+ int main(int argc, char** argv) {
893
+ ...
894
+ testing::UnitTest::GetInstance()->listeners().Append(new ThrowListener);
895
+ return RUN_ALL_TESTS();
896
+ }
897
+ ```
898
+
899
+ This listener should be added after other listeners if you have any, otherwise
900
+ they won't see failed `OnTestPartResult`.
901
+
880
902
  ### Asserting on Subroutines ###
881
903
 
882
904
  As shown above, if your test calls a subroutine that has an `ASSERT_*`
@@ -1263,7 +1285,7 @@ known as <i>abstract tests</i>. As an example of its application, when you
1263
1285
  are designing an interface you can write a standard suite of abstract
1264
1286
  tests (perhaps using a factory function as the test parameter) that
1265
1287
  all implementations of the interface are expected to pass. When
1266
- someone implements the interface, he can instantiate your suite to get
1288
+ someone implements the interface, they can instantiate your suite to get
1267
1289
  all the interface-conformance tests for free.
1268
1290
 
1269
1291
  To define abstract tests, you should organize your code like this:
@@ -1344,7 +1366,7 @@ TYPED_TEST(FooTest, DoesBlah) {
1344
1366
  TYPED_TEST(FooTest, HasPropertyA) { ... }
1345
1367
  ```
1346
1368
 
1347
- You can see `samples/sample6_unittest.cc` for a complete example.
1369
+ You can see [`samples/sample6_unittest.cc`](../samples/sample6_unittest.cc) for a complete example.
1348
1370
 
1349
1371
  _Availability:_ Linux, Windows (requires MSVC 8.0 or above), Mac;
1350
1372
  since version 1.1.0.
@@ -1444,7 +1466,7 @@ absolutely have to test non-public interface code though, you can. There are
1444
1466
  two cases to consider:
1445
1467
 
1446
1468
  * Static functions (_not_ the same as static member functions!) or unnamed namespaces, and
1447
- * Private or protected class members
1469
+ * Private or protected class members.
1448
1470
 
1449
1471
  ## Static Functions ##
1450
1472
 
@@ -1551,7 +1573,7 @@ exception, you could catch the exception and assert on it. But Google
1551
1573
  Test doesn't use exceptions, so how do we test that a piece of code
1552
1574
  generates an expected failure?
1553
1575
 
1554
- `"gtest/gtest-spi.h"` contains some constructs to do this. After
1576
+ `"gtest/gtest-spi.h"` contains some constructs to do this. After
1555
1577
  `#include`ing this header, you can use
1556
1578
 
1557
1579
  | `EXPECT_FATAL_FAILURE(`_statement, substring_`);` |
@@ -1623,8 +1645,8 @@ printf("We are in test %s of test case %s.\n",
1623
1645
  ```
1624
1646
 
1625
1647
  `current_test_info()` returns a null pointer if no test is running. In
1626
- particular, you cannot find the test case name in `TestCaseSetUp()`,
1627
- `TestCaseTearDown()` (where you know the test case name implicitly), or
1648
+ particular, you cannot find the test case name in `SetUpTestCase()`,
1649
+ `TearDownTestCase()` (where you know the test case name implicitly), or
1628
1650
  functions called from them.
1629
1651
 
1630
1652
  _Availability:_ Linux, Windows, Mac.
@@ -1949,6 +1971,17 @@ variable to `0` has the same effect.
1949
1971
  _Availability:_ Linux, Windows, Mac. (In Google Test 1.3.0 and lower,
1950
1972
  the default behavior is that the elapsed time is **not** printed.)
1951
1973
 
1974
+ **Availability**: Linux, Windows, Mac.
1975
+
1976
+ #### Suppressing UTF-8 Text Output
1977
+
1978
+ In case of assertion failures, gUnit prints expected and actual values of type
1979
+ `string` both as hex-encoded strings as well as in readable UTF-8 text if they
1980
+ contain valid non-ASCII UTF-8 characters. If you want to suppress the UTF-8 text
1981
+ because, for example, you don't have an UTF-8 compatible output medium, run the
1982
+ test program with `--gunit_print_utf8=0` or set the `GUNIT_PRINT_UTF8`
1983
+ environment variable to `0`.
1984
+
1952
1985
  ### Generating an XML Report ###
1953
1986
 
1954
1987
  Google Test can emit a detailed XML report to a file in addition to its normal
@@ -2027,6 +2060,207 @@ Things to note:
2027
2060
 
2028
2061
  _Availability:_ Linux, Windows, Mac.
2029
2062
 
2063
+ #### Generating an JSON Report {#JsonReport}
2064
+
2065
+ gUnit can also emit a JSON report as an alternative format to XML. To generate
2066
+ the JSON report, set the `GUNIT_OUTPUT` environment variable or the
2067
+ `--gunit_output` flag to the string `"json:path_to_output_file"`, which will
2068
+ create the file at the given location. You can also just use the string
2069
+ `"json"`, in which case the output can be found in the `test_detail.json` file
2070
+ in the current directory.
2071
+
2072
+ The report format conforms to the following JSON Schema:
2073
+
2074
+ ```json
2075
+ {
2076
+ "$schema": "http://json-schema.org/schema#",
2077
+ "type": "object",
2078
+ "definitions": {
2079
+ "TestCase": {
2080
+ "type": "object",
2081
+ "properties": {
2082
+ "name": { "type": "string" },
2083
+ "tests": { "type": "integer" },
2084
+ "failures": { "type": "integer" },
2085
+ "disabled": { "type": "integer" },
2086
+ "time": { "type": "string" },
2087
+ "testsuite": {
2088
+ "type": "array",
2089
+ "items": {
2090
+ "$ref": "#/definitions/TestInfo"
2091
+ }
2092
+ }
2093
+ }
2094
+ },
2095
+ "TestInfo": {
2096
+ "type": "object",
2097
+ "properties": {
2098
+ "name": { "type": "string" },
2099
+ "status": {
2100
+ "type": "string",
2101
+ "enum": ["RUN", "NOTRUN"]
2102
+ },
2103
+ "time": { "type": "string" },
2104
+ "classname": { "type": "string" },
2105
+ "failures": {
2106
+ "type": "array",
2107
+ "items": {
2108
+ "$ref": "#/definitions/Failure"
2109
+ }
2110
+ }
2111
+ }
2112
+ },
2113
+ "Failure": {
2114
+ "type": "object",
2115
+ "properties": {
2116
+ "failures": { "type": "string" },
2117
+ "type": { "type": "string" }
2118
+ }
2119
+ }
2120
+ },
2121
+ "properties": {
2122
+ "tests": { "type": "integer" },
2123
+ "failures": { "type": "integer" },
2124
+ "disabled": { "type": "integer" },
2125
+ "errors": { "type": "integer" },
2126
+ "timestamp": {
2127
+ "type": "string",
2128
+ "format": "date-time"
2129
+ },
2130
+ "time": { "type": "string" },
2131
+ "name": { "type": "string" },
2132
+ "testsuites": {
2133
+ "type": "array",
2134
+ "items": {
2135
+ "$ref": "#/definitions/TestCase"
2136
+ }
2137
+ }
2138
+ }
2139
+ }
2140
+ ```
2141
+
2142
+ The report uses the format that conforms to the following Proto3 using the
2143
+ [JSON encoding](https://developers.google.com/protocol-buffers/docs/proto3#json):
2144
+
2145
+ ```proto
2146
+ syntax = "proto3";
2147
+
2148
+ package googletest;
2149
+
2150
+ import "google/protobuf/timestamp.proto";
2151
+ import "google/protobuf/duration.proto";
2152
+
2153
+ message UnitTest {
2154
+ int32 tests = 1;
2155
+ int32 failures = 2;
2156
+ int32 disabled = 3;
2157
+ int32 errors = 4;
2158
+ google.protobuf.Timestamp timestamp = 5;
2159
+ google.protobuf.Duration time = 6;
2160
+ string name = 7;
2161
+ repeated TestCase testsuites = 8;
2162
+ }
2163
+
2164
+ message TestCase {
2165
+ string name = 1;
2166
+ int32 tests = 2;
2167
+ int32 failures = 3;
2168
+ int32 disabled = 4;
2169
+ int32 errors = 5;
2170
+ google.protobuf.Duration time = 6;
2171
+ repeated TestInfo testsuite = 7;
2172
+ }
2173
+
2174
+ message TestInfo {
2175
+ string name = 1;
2176
+ enum Status {
2177
+ RUN = 0;
2178
+ NOTRUN = 1;
2179
+ }
2180
+ Status status = 2;
2181
+ google.protobuf.Duration time = 3;
2182
+ string classname = 4;
2183
+ message Failure {
2184
+ string failures = 1;
2185
+ string type = 2;
2186
+ }
2187
+ repeated Failure failures = 5;
2188
+ }
2189
+ ```
2190
+
2191
+ For instance, the following program
2192
+
2193
+ ```c++
2194
+ TEST(MathTest, Addition) { ... }
2195
+ TEST(MathTest, Subtraction) { ... }
2196
+ TEST(LogicTest, NonContradiction) { ... }
2197
+ ```
2198
+
2199
+ could generate this report:
2200
+
2201
+ ```json
2202
+ {
2203
+ "tests": 3,
2204
+ "failures": 1,
2205
+ "errors": 0,
2206
+ "time": "0.035s",
2207
+ "timestamp": "2011-10-31T18:52:42Z"
2208
+ "name": "AllTests",
2209
+ "testsuites": [
2210
+ {
2211
+ "name": "MathTest",
2212
+ "tests": 2,
2213
+ "failures": 1,
2214
+ "errors": 0,
2215
+ "time": "0.015s",
2216
+ "testsuite": [
2217
+ {
2218
+ "name": "Addition",
2219
+ "status": "RUN",
2220
+ "time": "0.007s",
2221
+ "classname": "",
2222
+ "failures": [
2223
+ {
2224
+ "message": "Value of: add(1, 1)\x0A Actual: 3\x0AExpected: 2",
2225
+ "type": ""
2226
+ },
2227
+ {
2228
+ "message": "Value of: add(1, -1)\x0A Actual: 1\x0AExpected: 0",
2229
+ "type": ""
2230
+ }
2231
+ ]
2232
+ },
2233
+ {
2234
+ "name": "Subtraction",
2235
+ "status": "RUN",
2236
+ "time": "0.005s",
2237
+ "classname": ""
2238
+ }
2239
+ ]
2240
+ }
2241
+ {
2242
+ "name": "LogicTest",
2243
+ "tests": 1,
2244
+ "failures": 0,
2245
+ "errors": 0,
2246
+ "time": "0.005s",
2247
+ "testsuite": [
2248
+ {
2249
+ "name": "NonContradiction",
2250
+ "status": "RUN",
2251
+ "time": "0.005s",
2252
+ "classname": ""
2253
+ }
2254
+ ]
2255
+ }
2256
+ ]
2257
+ }
2258
+ ```
2259
+
2260
+ IMPORTANT: The exact format of the JSON document is subject to change.
2261
+
2262
+ **Availability**: Linux, Windows, Mac.
2263
+
2030
2264
  ## Controlling How Failures Are Reported ##
2031
2265
 
2032
2266
  ### Turning Assertion Failures into Break-Points ###
@@ -2179,4 +2413,4 @@ file as an example on how to compile your tests against them.
2179
2413
 
2180
2414
  Congratulations! You've now learned more advanced Google Test tools and are
2181
2415
  ready to tackle more complex testing tasks. If you want to dive even deeper, you
2182
- can read the [Frequently-Asked Questions](FAQ.md).
2416
+ can read the [Frequently-Asked Questions](faq.md).