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
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env python
2
- #
3
1
  # Copyright 2006, Google Inc.
4
2
  # All rights reserved.
5
3
  #
@@ -36,19 +34,19 @@ __author__ = 'wan@google.com (Zhanyong Wan)'
36
34
  import os
37
35
  import sys
38
36
 
39
-
40
37
  # Determines path to gtest_test_utils and imports it.
41
38
  SCRIPT_DIR = os.path.dirname(__file__) or '.'
42
39
 
43
40
  # isdir resolves symbolic links.
44
- gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../gtest/test')
41
+ gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../../googletest/test')
45
42
  if os.path.isdir(gtest_tests_util_dir):
46
43
  GTEST_TESTS_UTIL_DIR = gtest_tests_util_dir
47
44
  else:
48
- GTEST_TESTS_UTIL_DIR = os.path.join(SCRIPT_DIR, '../../gtest/test')
49
-
45
+ GTEST_TESTS_UTIL_DIR = os.path.join(SCRIPT_DIR, '../../googletest/test')
50
46
  sys.path.append(GTEST_TESTS_UTIL_DIR)
51
- import gtest_test_utils # pylint: disable-msg=C6204
47
+
48
+ # pylint: disable=C6204
49
+ import gtest_test_utils
52
50
 
53
51
 
54
52
  def GetSourceDir():
@@ -44,8 +44,17 @@ endif()
44
44
  # as ${gtest_SOURCE_DIR} and to the root binary directory as
45
45
  # ${gtest_BINARY_DIR}.
46
46
  # Language "C" is required for find_package(Threads).
47
- project(gtest CXX C)
48
- cmake_minimum_required(VERSION 2.6.2)
47
+ if (CMAKE_VERSION VERSION_LESS 3.0)
48
+ project(gtest CXX C)
49
+ else()
50
+ cmake_policy(SET CMP0048 NEW)
51
+ project(gtest VERSION 1.9.0 LANGUAGES CXX C)
52
+ endif()
53
+ cmake_minimum_required(VERSION 2.6.4)
54
+
55
+ if (POLICY CMP0063) # Visibility
56
+ cmake_policy(SET CMP0063 NEW)
57
+ endif (POLICY CMP0063)
49
58
 
50
59
  if (COMMAND set_up_hermetic_build)
51
60
  set_up_hermetic_build()
@@ -63,11 +72,8 @@ config_compiler_and_linker() # Defined in internal_utils.cmake.
63
72
 
64
73
  # Where Google Test's .h files can be found.
65
74
  include_directories(
66
- ${gtest_SOURCE_DIR}/include
67
- ${gtest_SOURCE_DIR})
68
-
69
- # Where Google Test's libraries can be found.
70
- link_directories(${gtest_BINARY_DIR}/src)
75
+ "${gtest_SOURCE_DIR}/include"
76
+ "${gtest_SOURCE_DIR}")
71
77
 
72
78
  # Summary of tuple support for Microsoft Visual Studio:
73
79
  # Compiler version(MS) version(cmake) Support
@@ -75,10 +81,12 @@ link_directories(${gtest_BINARY_DIR}/src)
75
81
  # <= VS 2010 <= 10 <= 1600 Use Google Tests's own tuple.
76
82
  # VS 2012 11 1700 std::tr1::tuple + _VARIADIC_MAX=10
77
83
  # VS 2013 12 1800 std::tr1::tuple
84
+ # VS 2015 14 1900 std::tuple
85
+ # VS 2017 15 >= 1910 std::tuple
78
86
  if (MSVC AND MSVC_VERSION EQUAL 1700)
79
87
  add_definitions(/D _VARIADIC_MAX=10)
80
88
  endif()
81
-
89
+
82
90
  ########################################################################
83
91
  #
84
92
  # Defines the gtest & gtest_main libraries. User tests should link
@@ -95,17 +103,33 @@ target_link_libraries(gtest_main gtest)
95
103
  # to the targets for when we are part of a parent build (ie being pulled
96
104
  # in via add_subdirectory() rather than being a standalone build).
97
105
  if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
98
- target_include_directories(gtest INTERFACE "${gtest_SOURCE_DIR}/include")
99
- target_include_directories(gtest_main INTERFACE "${gtest_SOURCE_DIR}/include")
106
+ target_include_directories(gtest SYSTEM INTERFACE "${gtest_SOURCE_DIR}/include")
107
+ target_include_directories(gtest_main SYSTEM INTERFACE "${gtest_SOURCE_DIR}/include")
100
108
  endif()
101
109
 
102
110
  ########################################################################
103
111
  #
104
112
  # Install rules
105
- install(TARGETS gtest gtest_main
106
- DESTINATION lib)
107
- install(DIRECTORY ${gtest_SOURCE_DIR}/include/gtest
108
- DESTINATION include)
113
+ if(INSTALL_GTEST)
114
+ install(TARGETS gtest gtest_main
115
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
116
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
117
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
118
+ install(DIRECTORY "${gtest_SOURCE_DIR}/include/gtest"
119
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
120
+
121
+ # configure and install pkgconfig files
122
+ configure_file(
123
+ cmake/gtest.pc.in
124
+ "${CMAKE_BINARY_DIR}/gtest.pc"
125
+ @ONLY)
126
+ configure_file(
127
+ cmake/gtest_main.pc.in
128
+ "${CMAKE_BINARY_DIR}/gtest_main.pc"
129
+ @ONLY)
130
+ install(FILES "${CMAKE_BINARY_DIR}/gtest.pc" "${CMAKE_BINARY_DIR}/gtest_main.pc"
131
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
132
+ endif()
109
133
 
110
134
  ########################################################################
111
135
  #
@@ -280,7 +304,9 @@ if (gtest_build_tests)
280
304
  cxx_executable(gtest_xml_outfile1_test_ test gtest_main)
281
305
  cxx_executable(gtest_xml_outfile2_test_ test gtest_main)
282
306
  py_test(gtest_xml_outfiles_test)
307
+ py_test(gtest_json_outfiles_test)
283
308
 
284
309
  cxx_executable(gtest_xml_output_unittest_ test gtest)
285
310
  py_test(gtest_xml_output_unittest)
311
+ py_test(gtest_json_output_unittest)
286
312
  endif()
@@ -34,6 +34,7 @@ EXTRA_DIST += $(GTEST_SRC)
34
34
  # Sample files that we don't compile.
35
35
  EXTRA_DIST += \
36
36
  samples/prime_tables.h \
37
+ samples/sample1_unittest.cc \
37
38
  samples/sample2_unittest.cc \
38
39
  samples/sample3_unittest.cc \
39
40
  samples/sample4_unittest.cc \
@@ -120,16 +121,16 @@ EXTRA_DIST += \
120
121
 
121
122
  # MSVC project files
122
123
  EXTRA_DIST += \
123
- msvc/gtest-md.sln \
124
- msvc/gtest-md.vcproj \
125
- msvc/gtest.sln \
126
- msvc/gtest.vcproj \
127
- msvc/gtest_main-md.vcproj \
128
- msvc/gtest_main.vcproj \
129
- msvc/gtest_prod_test-md.vcproj \
130
- msvc/gtest_prod_test.vcproj \
131
- msvc/gtest_unittest-md.vcproj \
132
- msvc/gtest_unittest.vcproj
124
+ msvc/2010/gtest-md.sln \
125
+ msvc/2010/gtest-md.vcxproj \
126
+ msvc/2010/gtest.sln \
127
+ msvc/2010/gtest.vcxproj \
128
+ msvc/2010/gtest_main-md.vcxproj \
129
+ msvc/2010/gtest_main.vcxproj \
130
+ msvc/2010/gtest_prod_test-md.vcxproj \
131
+ msvc/2010/gtest_prod_test.vcxproj \
132
+ msvc/2010/gtest_unittest-md.vcxproj \
133
+ msvc/2010/gtest_unittest.vcxproj
133
134
 
134
135
  # xcode project files
135
136
  EXTRA_DIST += \
@@ -216,40 +217,68 @@ pkginclude_internal_HEADERS = \
216
217
  lib_libgtest_main_la_SOURCES = src/gtest_main.cc
217
218
  lib_libgtest_main_la_LIBADD = lib/libgtest.la
218
219
 
219
- # Bulid rules for samples and tests. Automake's naming for some of
220
+ # Build rules for samples and tests. Automake's naming for some of
220
221
  # these variables isn't terribly obvious, so this is a brief
221
222
  # reference:
222
223
  #
223
224
  # TESTS -- Programs run automatically by "make check"
224
225
  # check_PROGRAMS -- Programs built by "make check" but not necessarily run
225
226
 
226
- noinst_LTLIBRARIES = samples/libsamples.la
227
-
228
- samples_libsamples_la_SOURCES = \
229
- samples/sample1.cc \
230
- samples/sample1.h \
231
- samples/sample2.cc \
232
- samples/sample2.h \
233
- samples/sample3-inl.h \
234
- samples/sample4.cc \
235
- samples/sample4.h
236
-
237
227
  TESTS=
238
228
  TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
239
229
  GTEST_BUILD_DIR="$(top_builddir)/test"
240
230
  check_PROGRAMS=
241
231
 
242
232
  # A simple sample on using gtest.
243
- TESTS += samples/sample1_unittest
244
- check_PROGRAMS += samples/sample1_unittest
245
- samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
233
+ TESTS += samples/sample1_unittest \
234
+ samples/sample2_unittest \
235
+ samples/sample3_unittest \
236
+ samples/sample4_unittest \
237
+ samples/sample5_unittest \
238
+ samples/sample6_unittest \
239
+ samples/sample7_unittest \
240
+ samples/sample8_unittest \
241
+ samples/sample9_unittest \
242
+ samples/sample10_unittest
243
+ check_PROGRAMS += samples/sample1_unittest \
244
+ samples/sample2_unittest \
245
+ samples/sample3_unittest \
246
+ samples/sample4_unittest \
247
+ samples/sample5_unittest \
248
+ samples/sample6_unittest \
249
+ samples/sample7_unittest \
250
+ samples/sample8_unittest \
251
+ samples/sample9_unittest \
252
+ samples/sample10_unittest
253
+
254
+ samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc samples/sample1.cc
246
255
  samples_sample1_unittest_LDADD = lib/libgtest_main.la \
247
- lib/libgtest.la \
248
- samples/libsamples.la
249
-
250
- # Another sample. It also verifies that libgtest works.
251
- TESTS += samples/sample10_unittest
252
- check_PROGRAMS += samples/sample10_unittest
256
+ lib/libgtest.la
257
+ samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc samples/sample2.cc
258
+ samples_sample2_unittest_LDADD = lib/libgtest_main.la \
259
+ lib/libgtest.la
260
+ samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc
261
+ samples_sample3_unittest_LDADD = lib/libgtest_main.la \
262
+ lib/libgtest.la
263
+ samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc samples/sample4.cc
264
+ samples_sample4_unittest_LDADD = lib/libgtest_main.la \
265
+ lib/libgtest.la
266
+ samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc samples/sample1.cc
267
+ samples_sample5_unittest_LDADD = lib/libgtest_main.la \
268
+ lib/libgtest.la
269
+ samples_sample6_unittest_SOURCES = samples/sample6_unittest.cc
270
+ samples_sample6_unittest_LDADD = lib/libgtest_main.la \
271
+ lib/libgtest.la
272
+ samples_sample7_unittest_SOURCES = samples/sample7_unittest.cc
273
+ samples_sample7_unittest_LDADD = lib/libgtest_main.la \
274
+ lib/libgtest.la
275
+ samples_sample8_unittest_SOURCES = samples/sample8_unittest.cc
276
+ samples_sample8_unittest_LDADD = lib/libgtest_main.la \
277
+ lib/libgtest.la
278
+
279
+ # Also verify that libgtest works by itself.
280
+ samples_sample9_unittest_SOURCES = samples/sample9_unittest.cc
281
+ samples_sample9_unittest_LDADD = lib/libgtest.la
253
282
  samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
254
283
  samples_sample10_unittest_LDADD = lib/libgtest.la
255
284
 
@@ -1,23 +1,21 @@
1
+ ### Generic Build Instructions
1
2
 
2
- ### Generic Build Instructions ###
3
+ #### Setup
3
4
 
4
- #### Setup ####
5
+ To build Google Test and your tests that use it, you need to tell your build
6
+ system where to find its headers and source files. The exact way to do it
7
+ depends on which build system you use, and is usually straightforward.
5
8
 
6
- To build Google Test and your tests that use it, you need to tell your
7
- build system where to find its headers and source files. The exact
8
- way to do it depends on which build system you use, and is usually
9
- straightforward.
9
+ #### Build
10
10
 
11
- #### Build ####
12
-
13
- Suppose you put Google Test in directory `${GTEST_DIR}`. To build it,
14
- create a library build target (or a project as called by Visual Studio
15
- and Xcode) to compile
11
+ Suppose you put Google Test in directory `${GTEST_DIR}`. To build it, create a
12
+ library build target (or a project as called by Visual Studio and Xcode) to
13
+ compile
16
14
 
17
15
  ${GTEST_DIR}/src/gtest-all.cc
18
16
 
19
17
  with `${GTEST_DIR}/include` in the system header search path and `${GTEST_DIR}`
20
- in the normal header search path. Assuming a Linux-like system and gcc,
18
+ in the normal header search path. Assuming a Linux-like system and gcc,
21
19
  something like the following will do:
22
20
 
23
21
  g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} \
@@ -26,136 +24,239 @@ something like the following will do:
26
24
 
27
25
  (We need `-pthread` as Google Test uses threads.)
28
26
 
29
- Next, you should compile your test source file with
30
- `${GTEST_DIR}/include` in the system header search path, and link it
31
- with gtest and any other necessary libraries:
27
+ Next, you should compile your test source file with `${GTEST_DIR}/include` in
28
+ the system header search path, and link it with gtest and any other necessary
29
+ libraries:
32
30
 
33
31
  g++ -isystem ${GTEST_DIR}/include -pthread path/to/your_test.cc libgtest.a \
34
32
  -o your_test
35
33
 
36
- As an example, the make/ directory contains a Makefile that you can
37
- use to build Google Test on systems where GNU make is available
38
- (e.g. Linux, Mac OS X, and Cygwin). It doesn't try to build Google
39
- Test's own tests. Instead, it just builds the Google Test library and
40
- a sample test. You can use it as a starting point for your own build
41
- script.
34
+ As an example, the make/ directory contains a Makefile that you can use to build
35
+ Google Test on systems where GNU make is available (e.g. Linux, Mac OS X, and
36
+ Cygwin). It doesn't try to build Google Test's own tests. Instead, it just
37
+ builds the Google Test library and a sample test. You can use it as a starting
38
+ point for your own build script.
42
39
 
43
- If the default settings are correct for your environment, the
44
- following commands should succeed:
40
+ If the default settings are correct for your environment, the following commands
41
+ should succeed:
45
42
 
46
43
  cd ${GTEST_DIR}/make
47
44
  make
48
45
  ./sample1_unittest
49
46
 
50
- If you see errors, try to tweak the contents of `make/Makefile` to make
51
- them go away. There are instructions in `make/Makefile` on how to do
52
- it.
47
+ If you see errors, try to tweak the contents of `make/Makefile` to make them go
48
+ away. There are instructions in `make/Makefile` on how to do it.
53
49
 
54
- ### Using CMake ###
50
+ ### Using CMake
55
51
 
56
52
  Google Test comes with a CMake build script (
57
- [CMakeLists.txt](CMakeLists.txt)) that can be used on a wide range of platforms ("C" stands for
58
- cross-platform.). If you don't have CMake installed already, you can
59
- download it for free from <http://www.cmake.org/>.
53
+ [CMakeLists.txt](https://github.com/google/googletest/blob/master/CMakeLists.txt))
54
+ that can be used on a wide range of platforms ("C" stands for cross-platform.).
55
+ If you don't have CMake installed already, you can download it for free from
56
+ <http://www.cmake.org/>.
57
+
58
+ CMake works by generating native makefiles or build projects that can be used in
59
+ the compiler environment of your choice. You can either build Google Test as a
60
+ standalone project or it can be incorporated into an existing CMake build for
61
+ another project.
60
62
 
61
- CMake works by generating native makefiles or build projects that can
62
- be used in the compiler environment of your choice. The typical
63
- workflow starts with:
63
+ #### Standalone CMake Project
64
+
65
+ When building Google Test as a standalone project, the typical workflow starts
66
+ with:
64
67
 
65
68
  mkdir mybuild # Create a directory to hold the build output.
66
69
  cd mybuild
67
70
  cmake ${GTEST_DIR} # Generate native build scripts.
68
71
 
69
- If you want to build Google Test's samples, you should replace the
70
- last command with
72
+ If you want to build Google Test's samples, you should replace the last command
73
+ with
71
74
 
72
75
  cmake -Dgtest_build_samples=ON ${GTEST_DIR}
73
76
 
74
- If you are on a \*nix system, you should now see a Makefile in the
75
- current directory. Just type 'make' to build gtest.
77
+ If you are on a \*nix system, you should now see a Makefile in the current
78
+ directory. Just type 'make' to build gtest.
76
79
 
77
- If you use Windows and have Visual Studio installed, a `gtest.sln` file
78
- and several `.vcproj` files will be created. You can then build them
79
- using Visual Studio.
80
+ If you use Windows and have Visual Studio installed, a `gtest.sln` file and
81
+ several `.vcproj` files will be created. You can then build them using Visual
82
+ Studio.
80
83
 
81
84
  On Mac OS X with Xcode installed, a `.xcodeproj` file will be generated.
82
85
 
83
- ### Legacy Build Scripts ###
86
+ #### Incorporating Into An Existing CMake Project
87
+
88
+ If you want to use gtest in a project which already uses CMake, then a more
89
+ robust and flexible approach is to build gtest as part of that project directly.
90
+ This is done by making the GoogleTest source code available to the main build
91
+ and adding it using CMake's `add_subdirectory()` command. This has the
92
+ significant advantage that the same compiler and linker settings are used
93
+ between gtest and the rest of your project, so issues associated with using
94
+ incompatible libraries (eg debug/release), etc. are avoided. This is
95
+ particularly useful on Windows. Making GoogleTest's source code available to the
96
+ main build can be done a few different ways:
97
+
98
+ * Download the GoogleTest source code manually and place it at a known
99
+ location. This is the least flexible approach and can make it more difficult
100
+ to use with continuous integration systems, etc.
101
+ * Embed the GoogleTest source code as a direct copy in the main project's
102
+ source tree. This is often the simplest approach, but is also the hardest to
103
+ keep up to date. Some organizations may not permit this method.
104
+ * Add GoogleTest as a git submodule or equivalent. This may not always be
105
+ possible or appropriate. Git submodules, for example, have their own set of
106
+ advantages and drawbacks.
107
+ * Use CMake to download GoogleTest as part of the build's configure step. This
108
+ is just a little more complex, but doesn't have the limitations of the other
109
+ methods.
110
+
111
+ The last of the above methods is implemented with a small piece of CMake code in
112
+ a separate file (e.g. `CMakeLists.txt.in`) which is copied to the build area and
113
+ then invoked as a sub-build _during the CMake stage_. That directory is then
114
+ pulled into the main build with `add_subdirectory()`. For example:
115
+
116
+ New file `CMakeLists.txt.in`:
117
+
118
+ cmake_minimum_required(VERSION 2.8.2)
119
+
120
+ project(googletest-download NONE)
121
+
122
+ include(ExternalProject)
123
+ ExternalProject_Add(googletest
124
+ GIT_REPOSITORY https://github.com/google/googletest.git
125
+ GIT_TAG master
126
+ SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
127
+ BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
128
+ CONFIGURE_COMMAND ""
129
+ BUILD_COMMAND ""
130
+ INSTALL_COMMAND ""
131
+ TEST_COMMAND ""
132
+ )
133
+
134
+ Existing build's `CMakeLists.txt`:
135
+
136
+ # Download and unpack googletest at configure time
137
+ configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt)
138
+ execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
139
+ RESULT_VARIABLE result
140
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download )
141
+ if(result)
142
+ message(FATAL_ERROR "CMake step for googletest failed: ${result}")
143
+ endif()
144
+ execute_process(COMMAND ${CMAKE_COMMAND} --build .
145
+ RESULT_VARIABLE result
146
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download )
147
+ if(result)
148
+ message(FATAL_ERROR "Build step for googletest failed: ${result}")
149
+ endif()
150
+
151
+ # Prevent overriding the parent project's compiler/linker
152
+ # settings on Windows
153
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
154
+
155
+ # Add googletest directly to our build. This defines
156
+ # the gtest and gtest_main targets.
157
+ add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src
158
+ ${CMAKE_BINARY_DIR}/googletest-build
159
+ EXCLUDE_FROM_ALL)
160
+
161
+ # The gtest/gtest_main targets carry header search path
162
+ # dependencies automatically when using CMake 2.8.11 or
163
+ # later. Otherwise we have to add them here ourselves.
164
+ if (CMAKE_VERSION VERSION_LESS 2.8.11)
165
+ include_directories("${gtest_SOURCE_DIR}/include")
166
+ endif()
167
+
168
+ # Now simply link against gtest or gtest_main as needed. Eg
169
+ add_executable(example example.cpp)
170
+ target_link_libraries(example gtest_main)
171
+ add_test(NAME example_test COMMAND example)
172
+
173
+ Note that this approach requires CMake 2.8.2 or later due to its use of the
174
+ `ExternalProject_Add()` command. The above technique is discussed in more detail
175
+ in [this separate article](http://crascit.com/2015/07/25/cmake-gtest/) which
176
+ also contains a link to a fully generalized implementation of the technique.
177
+
178
+ ##### Visual Studio Dynamic vs Static Runtimes
179
+
180
+ By default, new Visual Studio projects link the C runtimes dynamically but
181
+ Google Test links them statically. This will generate an error that looks
182
+ something like the following: gtest.lib(gtest-all.obj) : error LNK2038: mismatch
183
+ detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value
184
+ 'MDd_DynamicDebug' in main.obj
185
+
186
+ Google Test already has a CMake option for this: `gtest_force_shared_crt`
187
+
188
+ Enabling this option will make gtest link the runtimes dynamically too, and
189
+ match the project in which it is included.
190
+
191
+ ### Legacy Build Scripts
84
192
 
85
193
  Before settling on CMake, we have been providing hand-maintained build
86
- projects/scripts for Visual Studio, Xcode, and Autotools. While we
87
- continue to provide them for convenience, they are not actively
88
- maintained any more. We highly recommend that you follow the
89
- instructions in the previous two sections to integrate Google Test
90
- with your existing build system.
194
+ projects/scripts for Visual Studio, Xcode, and Autotools. While we continue to
195
+ provide them for convenience, they are not actively maintained any more. We
196
+ highly recommend that you follow the instructions in the above sections to
197
+ integrate Google Test with your existing build system.
91
198
 
92
199
  If you still need to use the legacy build scripts, here's how:
93
200
 
94
- The msvc\ folder contains two solutions with Visual C++ projects.
95
- Open the `gtest.sln` or `gtest-md.sln` file using Visual Studio, and you
96
- are ready to build Google Test the same way you build any Visual
97
- Studio project. Files that have names ending with -md use DLL
98
- versions of Microsoft runtime libraries (the /MD or the /MDd compiler
99
- option). Files without that suffix use static versions of the runtime
100
- libraries (the /MT or the /MTd option). Please note that one must use
101
- the same option to compile both gtest and the test code. If you use
102
- Visual Studio 2005 or above, we recommend the -md version as /MD is
103
- the default for new projects in these versions of Visual Studio.
104
-
105
- On Mac OS X, open the `gtest.xcodeproj` in the `xcode/` folder using
106
- Xcode. Build the "gtest" target. The universal binary framework will
107
- end up in your selected build directory (selected in the Xcode
108
- "Preferences..." -> "Building" pane and defaults to xcode/build).
109
- Alternatively, at the command line, enter:
201
+ The msvc\ folder contains two solutions with Visual C++ projects. Open the
202
+ `gtest.sln` or `gtest-md.sln` file using Visual Studio, and you are ready to
203
+ build Google Test the same way you build any Visual Studio project. Files that
204
+ have names ending with -md use DLL versions of Microsoft runtime libraries (the
205
+ /MD or the /MDd compiler option). Files without that suffix use static versions
206
+ of the runtime libraries (the /MT or the /MTd option). Please note that one must
207
+ use the same option to compile both gtest and the test code. If you use Visual
208
+ Studio 2005 or above, we recommend the -md version as /MD is the default for new
209
+ projects in these versions of Visual Studio.
210
+
211
+ On Mac OS X, open the `gtest.xcodeproj` in the `xcode/` folder using Xcode.
212
+ Build the "gtest" target. The universal binary framework will end up in your
213
+ selected build directory (selected in the Xcode "Preferences..." -> "Building"
214
+ pane and defaults to xcode/build). Alternatively, at the command line, enter:
110
215
 
111
216
  xcodebuild
112
217
 
113
- This will build the "Release" configuration of gtest.framework in your
114
- default build location. See the "xcodebuild" man page for more
115
- information about building different configurations and building in
116
- different locations.
218
+ This will build the "Release" configuration of gtest.framework in your default
219
+ build location. See the "xcodebuild" man page for more information about
220
+ building different configurations and building in different locations.
117
221
 
118
- If you wish to use the Google Test Xcode project with Xcode 4.x and
119
- above, you need to either:
222
+ If you wish to use the Google Test Xcode project with Xcode 4.x and above, you
223
+ need to either:
120
224
 
121
- * update the SDK configuration options in xcode/Config/General.xconfig.
122
- Comment options `SDKROOT`, `MACOS_DEPLOYMENT_TARGET`, and `GCC_VERSION`. If
123
- you choose this route you lose the ability to target earlier versions
124
- of MacOS X.
125
- * Install an SDK for an earlier version. This doesn't appear to be
126
- supported by Apple, but has been reported to work
127
- (http://stackoverflow.com/questions/5378518).
225
+ * update the SDK configuration options in xcode/Config/General.xconfig.
226
+ Comment options `SDKROOT`, `MACOS_DEPLOYMENT_TARGET`, and `GCC_VERSION`. If
227
+ you choose this route you lose the ability to target earlier versions of
228
+ MacOS X.
229
+ * Install an SDK for an earlier version. This doesn't appear to be supported
230
+ by Apple, but has been reported to work
231
+ (http://stackoverflow.com/questions/5378518).
128
232
 
129
- ### Tweaking Google Test ###
233
+ ### Tweaking Google Test
130
234
 
131
- Google Test can be used in diverse environments. The default
132
- configuration may not work (or may not work well) out of the box in
133
- some environments. However, you can easily tweak Google Test by
134
- defining control macros on the compiler command line. Generally,
135
- these macros are named like `GTEST_XYZ` and you define them to either 1
136
- or 0 to enable or disable a certain feature.
235
+ Google Test can be used in diverse environments. The default configuration may
236
+ not work (or may not work well) out of the box in some environments. However,
237
+ you can easily tweak Google Test by defining control macros on the compiler
238
+ command line. Generally, these macros are named like `GTEST_XYZ` and you define
239
+ them to either 1 or 0 to enable or disable a certain feature.
137
240
 
138
- We list the most frequently used macros below. For a complete list,
139
- see file [include/gtest/internal/gtest-port.h](include/gtest/internal/gtest-port.h).
241
+ We list the most frequently used macros below. For a complete list, see file
242
+ [include/gtest/internal/gtest-port.h](https://github.com/google/googletest/blob/master/include/gtest/internal/gtest-port.h).
140
243
 
141
- ### Choosing a TR1 Tuple Library ###
244
+ ### Choosing a TR1 Tuple Library
142
245
 
143
- Some Google Test features require the C++ Technical Report 1 (TR1)
144
- tuple library, which is not yet available with all compilers. The
145
- good news is that Google Test implements a subset of TR1 tuple that's
146
- enough for its own need, and will automatically use this when the
147
- compiler doesn't provide TR1 tuple.
246
+ Some Google Test features require the C++ Technical Report 1 (TR1) tuple
247
+ library, which is not yet available with all compilers. The good news is that
248
+ Google Test implements a subset of TR1 tuple that's enough for its own need, and
249
+ will automatically use this when the compiler doesn't provide TR1 tuple.
148
250
 
149
- Usually you don't need to care about which tuple library Google Test
150
- uses. However, if your project already uses TR1 tuple, you need to
151
- tell Google Test to use the same TR1 tuple library the rest of your
152
- project uses, or the two tuple implementations will clash. To do
153
- that, add
251
+ Usually you don't need to care about which tuple library Google Test uses.
252
+ However, if your project already uses TR1 tuple, you need to tell Google Test to
253
+ use the same TR1 tuple library the rest of your project uses, or the two tuple
254
+ implementations will clash. To do that, add
154
255
 
155
256
  -DGTEST_USE_OWN_TR1_TUPLE=0
156
257
 
157
- to the compiler flags while compiling Google Test and your tests. If
158
- you want to force Google Test to use its own tuple library, just add
258
+ to the compiler flags while compiling Google Test and your tests. If you want to
259
+ force Google Test to use its own tuple library, just add
159
260
 
160
261
  -DGTEST_USE_OWN_TR1_TUPLE=1
161
262
 
@@ -167,15 +268,15 @@ If you don't want Google Test to use tuple at all, add
167
268
 
168
269
  and all features using tuple will be disabled.
169
270
 
170
- ### Multi-threaded Tests ###
271
+ ### Multi-threaded Tests
171
272
 
172
- Google Test is thread-safe where the pthread library is available.
173
- After `#include "gtest/gtest.h"`, you can check the `GTEST_IS_THREADSAFE`
174
- macro to see whether this is the case (yes if the macro is `#defined` to
175
- 1, no if it's undefined.).
273
+ Google Test is thread-safe where the pthread library is available. After
274
+ `#include "gtest/gtest.h"`, you can check the `GTEST_IS_THREADSAFE` macro to see
275
+ whether this is the case (yes if the macro is `#defined` to 1, no if it's
276
+ undefined.).
176
277
 
177
- If Google Test doesn't correctly detect whether pthread is available
178
- in your environment, you can force it with
278
+ If Google Test doesn't correctly detect whether pthread is available in your
279
+ environment, you can force it with
179
280
 
180
281
  -DGTEST_HAS_PTHREAD=1
181
282
 
@@ -183,26 +284,24 @@ or
183
284
 
184
285
  -DGTEST_HAS_PTHREAD=0
185
286
 
186
- When Google Test uses pthread, you may need to add flags to your
187
- compiler and/or linker to select the pthread library, or you'll get
188
- link errors. If you use the CMake script or the deprecated Autotools
189
- script, this is taken care of for you. If you use your own build
190
- script, you'll need to read your compiler and linker's manual to
191
- figure out what flags to add.
287
+ When Google Test uses pthread, you may need to add flags to your compiler and/or
288
+ linker to select the pthread library, or you'll get link errors. If you use the
289
+ CMake script or the deprecated Autotools script, this is taken care of for you.
290
+ If you use your own build script, you'll need to read your compiler and linker's
291
+ manual to figure out what flags to add.
192
292
 
193
- ### As a Shared Library (DLL) ###
293
+ ### As a Shared Library (DLL)
194
294
 
195
- Google Test is compact, so most users can build and link it as a
196
- static library for the simplicity. You can choose to use Google Test
197
- as a shared library (known as a DLL on Windows) if you prefer.
295
+ Google Test is compact, so most users can build and link it as a static library
296
+ for the simplicity. You can choose to use Google Test as a shared library (known
297
+ as a DLL on Windows) if you prefer.
198
298
 
199
299
  To compile *gtest* as a shared library, add
200
300
 
201
301
  -DGTEST_CREATE_SHARED_LIBRARY=1
202
302
 
203
- to the compiler flags. You'll also need to tell the linker to produce
204
- a shared library instead - consult your linker's manual for how to do
205
- it.
303
+ to the compiler flags. You'll also need to tell the linker to produce a shared
304
+ library instead - consult your linker's manual for how to do it.
206
305
 
207
306
  To compile your *tests* that use the gtest shared library, add
208
307
 
@@ -210,31 +309,28 @@ To compile your *tests* that use the gtest shared library, add
210
309
 
211
310
  to the compiler flags.
212
311
 
213
- Note: while the above steps aren't technically necessary today when
214
- using some compilers (e.g. GCC), they may become necessary in the
215
- future, if we decide to improve the speed of loading the library (see
216
- <http://gcc.gnu.org/wiki/Visibility> for details). Therefore you are
217
- recommended to always add the above flags when using Google Test as a
218
- shared library. Otherwise a future release of Google Test may break
219
- your build script.
312
+ Note: while the above steps aren't technically necessary today when using some
313
+ compilers (e.g. GCC), they may become necessary in the future, if we decide to
314
+ improve the speed of loading the library (see
315
+ <http://gcc.gnu.org/wiki/Visibility> for details). Therefore you are recommended
316
+ to always add the above flags when using Google Test as a shared library.
317
+ Otherwise a future release of Google Test may break your build script.
220
318
 
221
- ### Avoiding Macro Name Clashes ###
319
+ ### Avoiding Macro Name Clashes
222
320
 
223
- In C++, macros don't obey namespaces. Therefore two libraries that
224
- both define a macro of the same name will clash if you `#include` both
225
- definitions. In case a Google Test macro clashes with another
226
- library, you can force Google Test to rename its macro to avoid the
227
- conflict.
321
+ In C++, macros don't obey namespaces. Therefore two libraries that both define a
322
+ macro of the same name will clash if you `#include` both definitions. In case a
323
+ Google Test macro clashes with another library, you can force Google Test to
324
+ rename its macro to avoid the conflict.
228
325
 
229
- Specifically, if both Google Test and some other code define macro
230
- FOO, you can add
326
+ Specifically, if both Google Test and some other code define macro FOO, you can
327
+ add
231
328
 
232
329
  -DGTEST_DONT_DEFINE_FOO=1
233
330
 
234
- to the compiler flags to tell Google Test to change the macro's name
235
- from `FOO` to `GTEST_FOO`. Currently `FOO` can be `FAIL`, `SUCCEED`,
236
- or `TEST`. For example, with `-DGTEST_DONT_DEFINE_TEST=1`, you'll
237
- need to write
331
+ to the compiler flags to tell Google Test to change the macro's name from `FOO`
332
+ to `GTEST_FOO`. Currently `FOO` can be `FAIL`, `SUCCEED`, or `TEST`. For
333
+ example, with `-DGTEST_DONT_DEFINE_TEST=1`, you'll need to write
238
334
 
239
335
  GTEST_TEST(SomeTest, DoesThis) { ... }
240
336
 
@@ -243,38 +339,3 @@ instead of
243
339
  TEST(SomeTest, DoesThis) { ... }
244
340
 
245
341
  in order to define a test.
246
-
247
- ## Developing Google Test ##
248
-
249
- This section discusses how to make your own changes to Google Test.
250
-
251
- ### Testing Google Test Itself ###
252
-
253
- To make sure your changes work as intended and don't break existing
254
- functionality, you'll want to compile and run Google Test's own tests.
255
- For that you can use CMake:
256
-
257
- mkdir mybuild
258
- cd mybuild
259
- cmake -Dgtest_build_tests=ON ${GTEST_DIR}
260
-
261
- Make sure you have Python installed, as some of Google Test's tests
262
- are written in Python. If the cmake command complains about not being
263
- able to find Python (`Could NOT find PythonInterp (missing:
264
- PYTHON_EXECUTABLE)`), try telling it explicitly where your Python
265
- executable can be found:
266
-
267
- cmake -DPYTHON_EXECUTABLE=path/to/python -Dgtest_build_tests=ON ${GTEST_DIR}
268
-
269
- Next, you can build Google Test and all of its own tests. On \*nix,
270
- this is usually done by 'make'. To run the tests, do
271
-
272
- make test
273
-
274
- All tests should pass.
275
-
276
- Normally you don't need to worry about regenerating the source files,
277
- unless you need to modify them. In that case, you should modify the
278
- corresponding .pump files instead and run the pump.py Python script to
279
- regenerate them. You can find pump.py in the [scripts/](scripts/) directory.
280
- Read the [Pump manual](docs/PumpManual.md) for how to use it.