rj_schema 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (613) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -615
  3. data/ext/rj_schema/rapidjson/CHANGELOG.md +0 -158
  4. data/ext/rj_schema/rapidjson/CMakeLists.txt +0 -221
  5. data/ext/rj_schema/rapidjson/CMakeModules/FindGTestSrc.cmake +0 -30
  6. data/ext/rj_schema/rapidjson/RapidJSON.pc.in +0 -7
  7. data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +0 -15
  8. data/ext/rj_schema/rapidjson/RapidJSONConfigVersion.cmake.in +0 -10
  9. data/ext/rj_schema/rapidjson/appveyor.yml +0 -41
  10. data/ext/rj_schema/rapidjson/bin/data/glossary.json +0 -22
  11. data/ext/rj_schema/rapidjson/bin/data/menu.json +0 -27
  12. data/ext/rj_schema/rapidjson/bin/data/readme.txt +0 -1
  13. data/ext/rj_schema/rapidjson/bin/data/sample.json +0 -3315
  14. data/ext/rj_schema/rapidjson/bin/data/webapp.json +0 -88
  15. data/ext/rj_schema/rapidjson/bin/data/widget.json +0 -26
  16. data/ext/rj_schema/rapidjson/bin/draft-04/schema +0 -150
  17. data/ext/rj_schema/rapidjson/bin/encodings/utf16be.json +0 -0
  18. data/ext/rj_schema/rapidjson/bin/encodings/utf16bebom.json +0 -0
  19. data/ext/rj_schema/rapidjson/bin/encodings/utf16le.json +0 -0
  20. data/ext/rj_schema/rapidjson/bin/encodings/utf16lebom.json +0 -0
  21. data/ext/rj_schema/rapidjson/bin/encodings/utf32be.json +0 -0
  22. data/ext/rj_schema/rapidjson/bin/encodings/utf32bebom.json +0 -0
  23. data/ext/rj_schema/rapidjson/bin/encodings/utf32le.json +0 -0
  24. data/ext/rj_schema/rapidjson/bin/encodings/utf32lebom.json +0 -0
  25. data/ext/rj_schema/rapidjson/bin/encodings/utf8.json +0 -7
  26. data/ext/rj_schema/rapidjson/bin/encodings/utf8bom.json +0 -7
  27. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail1.json +0 -1
  28. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail10.json +0 -1
  29. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail11.json +0 -1
  30. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail12.json +0 -1
  31. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail13.json +0 -1
  32. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail14.json +0 -1
  33. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail15.json +0 -1
  34. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail16.json +0 -1
  35. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail17.json +0 -1
  36. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail18.json +0 -1
  37. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail19.json +0 -1
  38. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail2.json +0 -1
  39. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail20.json +0 -1
  40. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail21.json +0 -1
  41. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail22.json +0 -1
  42. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail23.json +0 -1
  43. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail24.json +0 -1
  44. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail25.json +0 -1
  45. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail26.json +0 -1
  46. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail27.json +0 -2
  47. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail28.json +0 -2
  48. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail29.json +0 -1
  49. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail3.json +0 -1
  50. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail30.json +0 -1
  51. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail31.json +0 -1
  52. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail32.json +0 -1
  53. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail33.json +0 -1
  54. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail4.json +0 -1
  55. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail5.json +0 -1
  56. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail6.json +0 -1
  57. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail7.json +0 -1
  58. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail8.json +0 -1
  59. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail9.json +0 -1
  60. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass1.json +0 -58
  61. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass2.json +0 -1
  62. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass3.json +0 -6
  63. data/ext/rj_schema/rapidjson/bin/jsonchecker/readme.txt +0 -3
  64. data/ext/rj_schema/rapidjson/bin/jsonschema/LICENSE +0 -19
  65. data/ext/rj_schema/rapidjson/bin/jsonschema/README.md +0 -148
  66. data/ext/rj_schema/rapidjson/bin/jsonschema/bin/jsonschema_suite +0 -283
  67. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json +0 -3
  68. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/integer.json +0 -3
  69. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/subSchemas.json +0 -8
  70. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json +0 -82
  71. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json +0 -88
  72. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/default.json +0 -49
  73. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/dependencies.json +0 -108
  74. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/disallow.json +0 -80
  75. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json +0 -60
  76. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json +0 -71
  77. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/extends.json +0 -94
  78. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/items.json +0 -46
  79. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxItems.json +0 -28
  80. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxLength.json +0 -33
  81. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maximum.json +0 -42
  82. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minItems.json +0 -28
  83. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minLength.json +0 -33
  84. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minimum.json +0 -42
  85. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json +0 -107
  86. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/format.json +0 -222
  87. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json +0 -18
  88. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json +0 -15
  89. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/pattern.json +0 -34
  90. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json +0 -110
  91. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/properties.json +0 -92
  92. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/ref.json +0 -159
  93. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/refRemote.json +0 -74
  94. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/required.json +0 -53
  95. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/type.json +0 -474
  96. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json +0 -79
  97. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json +0 -82
  98. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json +0 -88
  99. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/allOf.json +0 -112
  100. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/anyOf.json +0 -68
  101. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/default.json +0 -49
  102. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/definitions.json +0 -32
  103. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/dependencies.json +0 -113
  104. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json +0 -72
  105. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/items.json +0 -46
  106. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxItems.json +0 -28
  107. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxLength.json +0 -33
  108. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json +0 -28
  109. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maximum.json +0 -42
  110. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minItems.json +0 -28
  111. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minLength.json +0 -33
  112. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minProperties.json +0 -28
  113. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minimum.json +0 -42
  114. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json +0 -60
  115. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/not.json +0 -96
  116. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/oneOf.json +0 -68
  117. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json +0 -107
  118. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/format.json +0 -148
  119. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json +0 -15
  120. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/pattern.json +0 -34
  121. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json +0 -110
  122. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/properties.json +0 -92
  123. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/ref.json +0 -159
  124. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/refRemote.json +0 -74
  125. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/required.json +0 -39
  126. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json +0 -330
  127. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json +0 -79
  128. data/ext/rj_schema/rapidjson/bin/jsonschema/tox.ini +0 -8
  129. data/ext/rj_schema/rapidjson/bin/types/booleans.json +0 -102
  130. data/ext/rj_schema/rapidjson/bin/types/floats.json +0 -102
  131. data/ext/rj_schema/rapidjson/bin/types/guids.json +0 -102
  132. data/ext/rj_schema/rapidjson/bin/types/integers.json +0 -102
  133. data/ext/rj_schema/rapidjson/bin/types/mixed.json +0 -592
  134. data/ext/rj_schema/rapidjson/bin/types/nulls.json +0 -102
  135. data/ext/rj_schema/rapidjson/bin/types/paragraphs.json +0 -102
  136. data/ext/rj_schema/rapidjson/bin/types/readme.txt +0 -1
  137. data/ext/rj_schema/rapidjson/contrib/natvis/LICENSE +0 -45
  138. data/ext/rj_schema/rapidjson/contrib/natvis/README.md +0 -7
  139. data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +0 -38
  140. data/ext/rj_schema/rapidjson/doc/CMakeLists.txt +0 -27
  141. data/ext/rj_schema/rapidjson/doc/Doxyfile.in +0 -2369
  142. data/ext/rj_schema/rapidjson/doc/Doxyfile.zh-cn.in +0 -2369
  143. data/ext/rj_schema/rapidjson/doc/diagram/architecture.dot +0 -50
  144. data/ext/rj_schema/rapidjson/doc/diagram/architecture.png +0 -0
  145. data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.dot +0 -65
  146. data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.png +0 -0
  147. data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +0 -62
  148. data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
  149. data/ext/rj_schema/rapidjson/doc/diagram/makefile +0 -8
  150. data/ext/rj_schema/rapidjson/doc/diagram/move1.dot +0 -47
  151. data/ext/rj_schema/rapidjson/doc/diagram/move1.png +0 -0
  152. data/ext/rj_schema/rapidjson/doc/diagram/move2.dot +0 -62
  153. data/ext/rj_schema/rapidjson/doc/diagram/move2.png +0 -0
  154. data/ext/rj_schema/rapidjson/doc/diagram/move3.dot +0 -60
  155. data/ext/rj_schema/rapidjson/doc/diagram/move3.png +0 -0
  156. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.dot +0 -56
  157. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.png +0 -0
  158. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.dot +0 -54
  159. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.png +0 -0
  160. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.dot +0 -58
  161. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.png +0 -0
  162. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.dot +0 -73
  163. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.png +0 -0
  164. data/ext/rj_schema/rapidjson/doc/dom.md +0 -280
  165. data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +0 -284
  166. data/ext/rj_schema/rapidjson/doc/encoding.md +0 -146
  167. data/ext/rj_schema/rapidjson/doc/encoding.zh-cn.md +0 -152
  168. data/ext/rj_schema/rapidjson/doc/faq.md +0 -289
  169. data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +0 -290
  170. data/ext/rj_schema/rapidjson/doc/features.md +0 -104
  171. data/ext/rj_schema/rapidjson/doc/features.zh-cn.md +0 -103
  172. data/ext/rj_schema/rapidjson/doc/internals.md +0 -368
  173. data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +0 -363
  174. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.png +0 -0
  175. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.svg +0 -119
  176. data/ext/rj_schema/rapidjson/doc/misc/DoxygenLayout.xml +0 -194
  177. data/ext/rj_schema/rapidjson/doc/misc/doxygenextra.css +0 -274
  178. data/ext/rj_schema/rapidjson/doc/misc/footer.html +0 -11
  179. data/ext/rj_schema/rapidjson/doc/misc/header.html +0 -24
  180. data/ext/rj_schema/rapidjson/doc/npm.md +0 -31
  181. data/ext/rj_schema/rapidjson/doc/performance.md +0 -26
  182. data/ext/rj_schema/rapidjson/doc/performance.zh-cn.md +0 -26
  183. data/ext/rj_schema/rapidjson/doc/pointer.md +0 -234
  184. data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +0 -234
  185. data/ext/rj_schema/rapidjson/doc/sax.md +0 -509
  186. data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +0 -487
  187. data/ext/rj_schema/rapidjson/doc/schema.md +0 -505
  188. data/ext/rj_schema/rapidjson/doc/schema.zh-cn.md +0 -237
  189. data/ext/rj_schema/rapidjson/doc/stream.md +0 -429
  190. data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +0 -429
  191. data/ext/rj_schema/rapidjson/doc/tutorial.md +0 -536
  192. data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +0 -534
  193. data/ext/rj_schema/rapidjson/docker/debian/Dockerfile +0 -8
  194. data/ext/rj_schema/rapidjson/example/CMakeLists.txt +0 -45
  195. data/ext/rj_schema/rapidjson/example/archiver/archiver.cpp +0 -292
  196. data/ext/rj_schema/rapidjson/example/archiver/archiver.h +0 -145
  197. data/ext/rj_schema/rapidjson/example/archiver/archivertest.cpp +0 -287
  198. data/ext/rj_schema/rapidjson/example/capitalize/capitalize.cpp +0 -67
  199. data/ext/rj_schema/rapidjson/example/condense/condense.cpp +0 -32
  200. data/ext/rj_schema/rapidjson/example/filterkey/filterkey.cpp +0 -135
  201. data/ext/rj_schema/rapidjson/example/filterkeydom/filterkeydom.cpp +0 -170
  202. data/ext/rj_schema/rapidjson/example/jsonx/jsonx.cpp +0 -207
  203. data/ext/rj_schema/rapidjson/example/lookaheadparser/lookaheadparser.cpp +0 -350
  204. data/ext/rj_schema/rapidjson/example/messagereader/messagereader.cpp +0 -105
  205. data/ext/rj_schema/rapidjson/example/parsebyparts/parsebyparts.cpp +0 -176
  206. data/ext/rj_schema/rapidjson/example/pretty/pretty.cpp +0 -30
  207. data/ext/rj_schema/rapidjson/example/prettyauto/prettyauto.cpp +0 -56
  208. data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +0 -78
  209. data/ext/rj_schema/rapidjson/example/serialize/serialize.cpp +0 -173
  210. data/ext/rj_schema/rapidjson/example/simpledom/simpledom.cpp +0 -29
  211. data/ext/rj_schema/rapidjson/example/simplepullreader/simplepullreader.cpp +0 -53
  212. data/ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp +0 -42
  213. data/ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp +0 -36
  214. data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +0 -151
  215. data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +0 -284
  216. data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -78
  217. data/ext/rj_schema/rapidjson/include/rapidjson/document.h +0 -2648
  218. data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +0 -299
  219. data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +0 -716
  220. data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +0 -74
  221. data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +0 -161
  222. data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +0 -99
  223. data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +0 -104
  224. data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +0 -151
  225. data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +0 -290
  226. data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +0 -271
  227. data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +0 -245
  228. data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +0 -78
  229. data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +0 -308
  230. data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +0 -186
  231. data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +0 -55
  232. data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +0 -732
  233. data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +0 -231
  234. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +0 -69
  235. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +0 -290
  236. data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +0 -46
  237. data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +0 -113
  238. data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +0 -70
  239. data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +0 -71
  240. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -316
  241. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -300
  242. data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +0 -81
  243. data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +0 -1357
  244. data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +0 -277
  245. data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +0 -630
  246. data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +0 -2230
  247. data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +0 -2494
  248. data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +0 -223
  249. data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +0 -121
  250. data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +0 -710
  251. data/ext/rj_schema/rapidjson/include_dirs.js +0 -2
  252. data/ext/rj_schema/rapidjson/library.json +0 -15
  253. data/ext/rj_schema/rapidjson/license.txt +0 -57
  254. data/ext/rj_schema/rapidjson/package.json +0 -24
  255. data/ext/rj_schema/rapidjson/rapidjson.autopkg +0 -77
  256. data/ext/rj_schema/rapidjson/readme.md +0 -160
  257. data/ext/rj_schema/rapidjson/readme.zh-cn.md +0 -152
  258. data/ext/rj_schema/rapidjson/test/CMakeLists.txt +0 -20
  259. data/ext/rj_schema/rapidjson/test/perftest/CMakeLists.txt +0 -28
  260. data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +0 -974
  261. data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +0 -24
  262. data/ext/rj_schema/rapidjson/test/perftest/perftest.h +0 -185
  263. data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +0 -166
  264. data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +0 -472
  265. data/ext/rj_schema/rapidjson/test/perftest/schematest.cpp +0 -223
  266. data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +0 -92
  267. data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +0 -100
  268. data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +0 -138
  269. data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +0 -115
  270. data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +0 -672
  271. data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +0 -98
  272. data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +0 -313
  273. data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +0 -451
  274. data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +0 -112
  275. data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +0 -230
  276. data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +0 -181
  277. data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +0 -160
  278. data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +0 -143
  279. data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +0 -70
  280. data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +0 -92
  281. data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +0 -1529
  282. data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +0 -373
  283. data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +0 -2190
  284. data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +0 -638
  285. data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +0 -2072
  286. data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +0 -219
  287. data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +0 -30
  288. data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +0 -192
  289. data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +0 -132
  290. data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +0 -51
  291. data/ext/rj_schema/rapidjson/test/unittest/unittest.h +0 -140
  292. data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +0 -1851
  293. data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +0 -598
  294. data/ext/rj_schema/rapidjson/test/valgrind.supp +0 -17
  295. data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +0 -16
  296. data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +0 -141
  297. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +0 -126
  298. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +0 -202
  299. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +0 -40
  300. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +0 -28
  301. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +0 -224
  302. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +0 -333
  303. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +0 -146
  304. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +0 -562
  305. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +0 -3675
  306. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +0 -280
  307. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
  308. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +0 -12
  309. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +0 -439
  310. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +0 -628
  311. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +0 -19
  312. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +0 -525
  313. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +0 -3250
  314. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +0 -11
  315. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +0 -439
  316. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +0 -624
  317. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +0 -534
  318. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +0 -3342
  319. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +0 -12
  320. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +0 -439
  321. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +0 -628
  322. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +0 -556
  323. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +0 -3432
  324. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +0 -12
  325. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +0 -439
  326. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +0 -628
  327. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +0 -1205
  328. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +0 -147
  329. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +0 -2377
  330. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +0 -794
  331. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +0 -1095
  332. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +0 -291
  333. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +0 -2179
  334. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +0 -672
  335. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +0 -397
  336. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +0 -161
  337. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +0 -4399
  338. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +0 -246
  339. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +0 -58
  340. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +0 -1847
  341. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +0 -94
  342. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +0 -8
  343. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +0 -10
  344. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +0 -39
  345. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +0 -46
  346. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +0 -279
  347. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +0 -136
  348. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +0 -511
  349. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +0 -91
  350. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +0 -101
  351. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +0 -32
  352. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +0 -191
  353. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +0 -15
  354. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +0 -187
  355. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +0 -201
  356. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +0 -32
  357. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +0 -82
  358. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +0 -19
  359. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +0 -88
  360. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +0 -101
  361. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +0 -32
  362. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +0 -84
  363. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +0 -19
  364. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +0 -90
  365. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +0 -103
  366. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +0 -240
  367. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +0 -203
  368. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +0 -35
  369. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +0 -115
  370. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  371. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +0 -1733
  372. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +0 -227
  373. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +0 -448
  374. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +0 -59
  375. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +0 -287
  376. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +0 -41
  377. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +0 -31
  378. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +0 -303
  379. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +0 -640
  380. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +0 -1387
  381. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +0 -78
  382. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +0 -47
  383. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +0 -156
  384. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +0 -174
  385. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +0 -498
  386. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +0 -823
  387. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +0 -183
  388. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +0 -54
  389. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +0 -1411
  390. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +0 -428
  391. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +0 -1228
  392. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +0 -622
  393. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +0 -127
  394. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +0 -1286
  395. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +0 -699
  396. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +0 -5648
  397. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +0 -708
  398. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +0 -424
  399. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +0 -43
  400. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +0 -2644
  401. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +0 -51
  402. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +0 -81
  403. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +0 -108
  404. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +0 -100
  405. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +0 -40
  406. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +0 -40
  407. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +0 -669
  408. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +0 -180
  409. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +0 -291
  410. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +0 -310
  411. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +0 -322
  412. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +0 -220
  413. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +0 -112
  414. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +0 -157
  415. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +0 -286
  416. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +0 -37
  417. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +0 -28
  418. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +0 -310
  419. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +0 -280
  420. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +0 -242
  421. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +0 -138
  422. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +0 -54
  423. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +0 -38
  424. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +0 -40
  425. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +0 -82
  426. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +0 -88
  427. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +0 -68
  428. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +0 -2182
  429. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +0 -126
  430. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +0 -14
  431. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/FAQ.md +0 -1087
  432. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +0 -502
  433. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +0 -177
  434. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.md +0 -14
  435. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +0 -2096
  436. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +0 -12
  437. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +0 -886
  438. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +0 -497
  439. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +0 -177
  440. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +0 -93
  441. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +0 -2178
  442. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +0 -14
  443. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +0 -1038
  444. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +0 -501
  445. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +0 -177
  446. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +0 -14
  447. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +0 -93
  448. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +0 -2181
  449. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +0 -14
  450. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +0 -1082
  451. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +0 -501
  452. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +0 -177
  453. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +0 -14
  454. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +0 -93
  455. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +0 -93
  456. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +0 -294
  457. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +0 -250
  458. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +0 -1444
  459. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +0 -510
  460. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +0 -993
  461. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +0 -232
  462. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +0 -179
  463. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +0 -263
  464. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +0 -2236
  465. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +0 -358
  466. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +0 -58
  467. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +0 -69
  468. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
  469. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +0 -41
  470. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -319
  471. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +0 -206
  472. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +0 -1238
  473. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
  474. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5146
  475. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -286
  476. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +0 -731
  477. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +0 -93
  478. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +0 -2554
  479. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +0 -167
  480. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
  481. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
  482. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +0 -3331
  483. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -297
  484. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +0 -363
  485. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +0 -74
  486. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +0 -82
  487. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +0 -45
  488. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +0 -126
  489. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +0 -45
  490. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +0 -126
  491. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +0 -129
  492. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +0 -129
  493. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +0 -164
  494. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +0 -164
  495. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +0 -147
  496. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +0 -147
  497. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +0 -123
  498. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +0 -68
  499. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +0 -43
  500. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -144
  501. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +0 -153
  502. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +0 -56
  503. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +0 -85
  504. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +0 -109
  505. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +0 -172
  506. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +0 -151
  507. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +0 -46
  508. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +0 -53
  509. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +0 -45
  510. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +0 -199
  511. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +0 -224
  512. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +0 -130
  513. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +0 -173
  514. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -160
  515. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +0 -83
  516. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +0 -253
  517. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +0 -730
  518. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +0 -274
  519. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +0 -855
  520. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +0 -158
  521. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +0 -59
  522. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +0 -1387
  523. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +0 -78
  524. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +0 -48
  525. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +0 -1342
  526. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +0 -387
  527. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +0 -1183
  528. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +0 -1259
  529. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +0 -373
  530. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +0 -110
  531. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +0 -118
  532. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +0 -5388
  533. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +0 -38
  534. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +0 -93
  535. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +0 -1427
  536. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +0 -662
  537. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +0 -154
  538. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +0 -311
  539. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +0 -159
  540. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +0 -215
  541. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +0 -65
  542. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +0 -1055
  543. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +0 -57
  544. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +0 -1304
  545. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +0 -1635
  546. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +0 -208
  547. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +0 -320
  548. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +0 -45
  549. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +0 -380
  550. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +0 -66
  551. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +0 -341
  552. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +0 -47
  553. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +0 -212
  554. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +0 -88
  555. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -237
  556. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +0 -311
  557. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +0 -130
  558. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -71
  559. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +0 -117
  560. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -126
  561. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -192
  562. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +0 -636
  563. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -140
  564. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +0 -172
  565. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +0 -46
  566. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +0 -207
  567. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +0 -157
  568. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +0 -45
  569. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +0 -56
  570. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +0 -340
  571. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +0 -1062
  572. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +0 -743
  573. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +0 -2427
  574. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +0 -127
  575. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +0 -57
  576. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +0 -253
  577. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +0 -325
  578. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +0 -103
  579. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +0 -57
  580. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -256
  581. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +0 -320
  582. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +0 -92
  583. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +0 -171
  584. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +0 -72
  585. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +0 -70
  586. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +0 -43
  587. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +0 -7706
  588. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -49
  589. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -49
  590. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +0 -132
  591. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +0 -308
  592. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -181
  593. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +0 -194
  594. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +0 -36
  595. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +0 -55
  596. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +0 -30
  597. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +0 -17
  598. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +0 -41
  599. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +0 -32
  600. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +0 -18
  601. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +0 -8
  602. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +0 -30
  603. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +0 -28
  604. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +0 -457
  605. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +0 -62
  606. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +0 -63
  607. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +0 -59
  608. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +0 -68
  609. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +0 -65
  610. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +0 -100
  611. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +0 -1135
  612. data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
  613. data/ext/rj_schema/rapidjson/travis-doxygen.sh +0 -121
@@ -1,38 +0,0 @@
1
- // Copyright 2006, Google Inc.
2
- // All rights reserved.
3
- //
4
- // Redistribution and use in source and binary forms, with or without
5
- // modification, are permitted provided that the following conditions are
6
- // met:
7
- //
8
- // * Redistributions of source code must retain the above copyright
9
- // notice, this list of conditions and the following disclaimer.
10
- // * Redistributions in binary form must reproduce the above
11
- // copyright notice, this list of conditions and the following disclaimer
12
- // in the documentation and/or other materials provided with the
13
- // distribution.
14
- // * Neither the name of Google Inc. nor the names of its
15
- // contributors may be used to endorse or promote products derived from
16
- // this software without specific prior written permission.
17
- //
18
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
-
30
- #include <stdio.h>
31
-
32
- #include "gtest/gtest.h"
33
-
34
- GTEST_API_ int main(int argc, char **argv) {
35
- printf("Running main() from gtest_main.cc\n");
36
- testing::InitGoogleTest(&argc, argv);
37
- return RUN_ALL_TESTS();
38
- }
@@ -1,93 +0,0 @@
1
- // Copyright 2010, Google Inc.
2
- // All rights reserved.
3
- //
4
- // Redistribution and use in source and binary forms, with or without
5
- // modification, are permitted provided that the following conditions are
6
- // met:
7
- //
8
- // * Redistributions of source code must retain the above copyright
9
- // notice, this list of conditions and the following disclaimer.
10
- // * Redistributions in binary form must reproduce the above
11
- // copyright notice, this list of conditions and the following disclaimer
12
- // in the documentation and/or other materials provided with the
13
- // distribution.
14
- // * Neither the name of Google Inc. nor the names of its
15
- // contributors may be used to endorse or promote products derived from
16
- // this software without specific prior written permission.
17
- //
18
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
- //
30
- // Author: vladl@google.com (Vlad Losev)
31
- //
32
- // Tests that verify interaction of exceptions and death tests.
33
-
34
- #include "gtest/gtest-death-test.h"
35
- #include "gtest/gtest.h"
36
-
37
- #if GTEST_HAS_DEATH_TEST
38
-
39
- # if GTEST_HAS_SEH
40
- # include <windows.h> // For RaiseException().
41
- # endif
42
-
43
- # include "gtest/gtest-spi.h"
44
-
45
- # if GTEST_HAS_EXCEPTIONS
46
-
47
- # include <exception> // For std::exception.
48
-
49
- // Tests that death tests report thrown exceptions as failures and that the
50
- // exceptions do not escape death test macros.
51
- TEST(CxxExceptionDeathTest, ExceptionIsFailure) {
52
- try {
53
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw 1, ""), "threw an exception");
54
- } catch (...) { // NOLINT
55
- FAIL() << "An exception escaped a death test macro invocation "
56
- << "with catch_exceptions "
57
- << (testing::GTEST_FLAG(catch_exceptions) ? "enabled" : "disabled");
58
- }
59
- }
60
-
61
- class TestException : public std::exception {
62
- public:
63
- virtual const char* what() const throw() { return "exceptional message"; }
64
- };
65
-
66
- TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) {
67
- // Verifies that the exception message is quoted in the failure text.
68
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""),
69
- "exceptional message");
70
- // Verifies that the location is mentioned in the failure text.
71
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""),
72
- "gtest-death-test_ex_test.cc");
73
- }
74
- # endif // GTEST_HAS_EXCEPTIONS
75
-
76
- # if GTEST_HAS_SEH
77
- // Tests that enabling interception of SEH exceptions with the
78
- // catch_exceptions flag does not interfere with SEH exceptions being
79
- // treated as death by death tests.
80
- TEST(SehExceptionDeasTest, CatchExceptionsDoesNotInterfere) {
81
- EXPECT_DEATH(RaiseException(42, 0x0, 0, NULL), "")
82
- << "with catch_exceptions "
83
- << (testing::GTEST_FLAG(catch_exceptions) ? "enabled" : "disabled");
84
- }
85
- # endif
86
-
87
- #endif // GTEST_HAS_DEATH_TEST
88
-
89
- int main(int argc, char** argv) {
90
- testing::InitGoogleTest(&argc, argv);
91
- testing::GTEST_FLAG(catch_exceptions) = GTEST_ENABLE_CATCH_EXCEPTIONS_ != 0;
92
- return RUN_ALL_TESTS();
93
- }
@@ -1,1427 +0,0 @@
1
- // Copyright 2005, Google Inc.
2
- // All rights reserved.
3
- //
4
- // Redistribution and use in source and binary forms, with or without
5
- // modification, are permitted provided that the following conditions are
6
- // met:
7
- //
8
- // * Redistributions of source code must retain the above copyright
9
- // notice, this list of conditions and the following disclaimer.
10
- // * Redistributions in binary form must reproduce the above
11
- // copyright notice, this list of conditions and the following disclaimer
12
- // in the documentation and/or other materials provided with the
13
- // distribution.
14
- // * Neither the name of Google Inc. nor the names of its
15
- // contributors may be used to endorse or promote products derived from
16
- // this software without specific prior written permission.
17
- //
18
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
- //
30
- // Author: wan@google.com (Zhanyong Wan)
31
- //
32
- // Tests for death tests.
33
-
34
- #include "gtest/gtest-death-test.h"
35
- #include "gtest/gtest.h"
36
- #include "gtest/internal/gtest-filepath.h"
37
-
38
- using testing::internal::AlwaysFalse;
39
- using testing::internal::AlwaysTrue;
40
-
41
- #if GTEST_HAS_DEATH_TEST
42
-
43
- # if GTEST_OS_WINDOWS
44
- # include <direct.h> // For chdir().
45
- # else
46
- # include <unistd.h>
47
- # include <sys/wait.h> // For waitpid.
48
- # endif // GTEST_OS_WINDOWS
49
-
50
- # include <limits.h>
51
- # include <signal.h>
52
- # include <stdio.h>
53
-
54
- # if GTEST_OS_LINUX
55
- # include <sys/time.h>
56
- # endif // GTEST_OS_LINUX
57
-
58
- # include "gtest/gtest-spi.h"
59
-
60
- // Indicates that this translation unit is part of Google Test's
61
- // implementation. It must come before gtest-internal-inl.h is
62
- // included, or there will be a compiler error. This trick is to
63
- // prevent a user from accidentally including gtest-internal-inl.h in
64
- // his code.
65
- # define GTEST_IMPLEMENTATION_ 1
66
- # include "src/gtest-internal-inl.h"
67
- # undef GTEST_IMPLEMENTATION_
68
-
69
- namespace posix = ::testing::internal::posix;
70
-
71
- using testing::Message;
72
- using testing::internal::DeathTest;
73
- using testing::internal::DeathTestFactory;
74
- using testing::internal::FilePath;
75
- using testing::internal::GetLastErrnoDescription;
76
- using testing::internal::GetUnitTestImpl;
77
- using testing::internal::InDeathTestChild;
78
- using testing::internal::ParseNaturalNumber;
79
-
80
- namespace testing {
81
- namespace internal {
82
-
83
- // A helper class whose objects replace the death test factory for a
84
- // single UnitTest object during their lifetimes.
85
- class ReplaceDeathTestFactory {
86
- public:
87
- explicit ReplaceDeathTestFactory(DeathTestFactory* new_factory)
88
- : unit_test_impl_(GetUnitTestImpl()) {
89
- old_factory_ = unit_test_impl_->death_test_factory_.release();
90
- unit_test_impl_->death_test_factory_.reset(new_factory);
91
- }
92
-
93
- ~ReplaceDeathTestFactory() {
94
- unit_test_impl_->death_test_factory_.release();
95
- unit_test_impl_->death_test_factory_.reset(old_factory_);
96
- }
97
- private:
98
- // Prevents copying ReplaceDeathTestFactory objects.
99
- ReplaceDeathTestFactory(const ReplaceDeathTestFactory&);
100
- void operator=(const ReplaceDeathTestFactory&);
101
-
102
- UnitTestImpl* unit_test_impl_;
103
- DeathTestFactory* old_factory_;
104
- };
105
-
106
- } // namespace internal
107
- } // namespace testing
108
-
109
- void DieWithMessage(const ::std::string& message) {
110
- fprintf(stderr, "%s", message.c_str());
111
- fflush(stderr); // Make sure the text is printed before the process exits.
112
-
113
- // We call _exit() instead of exit(), as the former is a direct
114
- // system call and thus safer in the presence of threads. exit()
115
- // will invoke user-defined exit-hooks, which may do dangerous
116
- // things that conflict with death tests.
117
- //
118
- // Some compilers can recognize that _exit() never returns and issue the
119
- // 'unreachable code' warning for code following this function, unless
120
- // fooled by a fake condition.
121
- if (AlwaysTrue())
122
- _exit(1);
123
- }
124
-
125
- void DieInside(const ::std::string& function) {
126
- DieWithMessage("death inside " + function + "().");
127
- }
128
-
129
- // Tests that death tests work.
130
-
131
- class TestForDeathTest : public testing::Test {
132
- protected:
133
- TestForDeathTest() : original_dir_(FilePath::GetCurrentDir()) {}
134
-
135
- virtual ~TestForDeathTest() {
136
- posix::ChDir(original_dir_.c_str());
137
- }
138
-
139
- // A static member function that's expected to die.
140
- static void StaticMemberFunction() { DieInside("StaticMemberFunction"); }
141
-
142
- // A method of the test fixture that may die.
143
- void MemberFunction() {
144
- if (should_die_)
145
- DieInside("MemberFunction");
146
- }
147
-
148
- // True iff MemberFunction() should die.
149
- bool should_die_;
150
- const FilePath original_dir_;
151
- };
152
-
153
- // A class with a member function that may die.
154
- class MayDie {
155
- public:
156
- explicit MayDie(bool should_die) : should_die_(should_die) {}
157
-
158
- // A member function that may die.
159
- void MemberFunction() const {
160
- if (should_die_)
161
- DieInside("MayDie::MemberFunction");
162
- }
163
-
164
- private:
165
- // True iff MemberFunction() should die.
166
- bool should_die_;
167
- };
168
-
169
- // A global function that's expected to die.
170
- void GlobalFunction() { DieInside("GlobalFunction"); }
171
-
172
- // A non-void function that's expected to die.
173
- int NonVoidFunction() {
174
- DieInside("NonVoidFunction");
175
- return 1;
176
- }
177
-
178
- // A unary function that may die.
179
- void DieIf(bool should_die) {
180
- if (should_die)
181
- DieInside("DieIf");
182
- }
183
-
184
- // A binary function that may die.
185
- bool DieIfLessThan(int x, int y) {
186
- if (x < y) {
187
- DieInside("DieIfLessThan");
188
- }
189
- return true;
190
- }
191
-
192
- // Tests that ASSERT_DEATH can be used outside a TEST, TEST_F, or test fixture.
193
- void DeathTestSubroutine() {
194
- EXPECT_DEATH(GlobalFunction(), "death.*GlobalFunction");
195
- ASSERT_DEATH(GlobalFunction(), "death.*GlobalFunction");
196
- }
197
-
198
- // Death in dbg, not opt.
199
- int DieInDebugElse12(int* sideeffect) {
200
- if (sideeffect) *sideeffect = 12;
201
-
202
- # ifndef NDEBUG
203
-
204
- DieInside("DieInDebugElse12");
205
-
206
- # endif // NDEBUG
207
-
208
- return 12;
209
- }
210
-
211
- # if GTEST_OS_WINDOWS
212
-
213
- // Tests the ExitedWithCode predicate.
214
- TEST(ExitStatusPredicateTest, ExitedWithCode) {
215
- // On Windows, the process's exit code is the same as its exit status,
216
- // so the predicate just compares the its input with its parameter.
217
- EXPECT_TRUE(testing::ExitedWithCode(0)(0));
218
- EXPECT_TRUE(testing::ExitedWithCode(1)(1));
219
- EXPECT_TRUE(testing::ExitedWithCode(42)(42));
220
- EXPECT_FALSE(testing::ExitedWithCode(0)(1));
221
- EXPECT_FALSE(testing::ExitedWithCode(1)(0));
222
- }
223
-
224
- # else
225
-
226
- // Returns the exit status of a process that calls _exit(2) with a
227
- // given exit code. This is a helper function for the
228
- // ExitStatusPredicateTest test suite.
229
- static int NormalExitStatus(int exit_code) {
230
- pid_t child_pid = fork();
231
- if (child_pid == 0) {
232
- _exit(exit_code);
233
- }
234
- int status;
235
- waitpid(child_pid, &status, 0);
236
- return status;
237
- }
238
-
239
- // Returns the exit status of a process that raises a given signal.
240
- // If the signal does not cause the process to die, then it returns
241
- // instead the exit status of a process that exits normally with exit
242
- // code 1. This is a helper function for the ExitStatusPredicateTest
243
- // test suite.
244
- static int KilledExitStatus(int signum) {
245
- pid_t child_pid = fork();
246
- if (child_pid == 0) {
247
- raise(signum);
248
- _exit(1);
249
- }
250
- int status;
251
- waitpid(child_pid, &status, 0);
252
- return status;
253
- }
254
-
255
- // Tests the ExitedWithCode predicate.
256
- TEST(ExitStatusPredicateTest, ExitedWithCode) {
257
- const int status0 = NormalExitStatus(0);
258
- const int status1 = NormalExitStatus(1);
259
- const int status42 = NormalExitStatus(42);
260
- const testing::ExitedWithCode pred0(0);
261
- const testing::ExitedWithCode pred1(1);
262
- const testing::ExitedWithCode pred42(42);
263
- EXPECT_PRED1(pred0, status0);
264
- EXPECT_PRED1(pred1, status1);
265
- EXPECT_PRED1(pred42, status42);
266
- EXPECT_FALSE(pred0(status1));
267
- EXPECT_FALSE(pred42(status0));
268
- EXPECT_FALSE(pred1(status42));
269
- }
270
-
271
- // Tests the KilledBySignal predicate.
272
- TEST(ExitStatusPredicateTest, KilledBySignal) {
273
- const int status_segv = KilledExitStatus(SIGSEGV);
274
- const int status_kill = KilledExitStatus(SIGKILL);
275
- const testing::KilledBySignal pred_segv(SIGSEGV);
276
- const testing::KilledBySignal pred_kill(SIGKILL);
277
- EXPECT_PRED1(pred_segv, status_segv);
278
- EXPECT_PRED1(pred_kill, status_kill);
279
- EXPECT_FALSE(pred_segv(status_kill));
280
- EXPECT_FALSE(pred_kill(status_segv));
281
- }
282
-
283
- # endif // GTEST_OS_WINDOWS
284
-
285
- // Tests that the death test macros expand to code which may or may not
286
- // be followed by operator<<, and that in either case the complete text
287
- // comprises only a single C++ statement.
288
- TEST_F(TestForDeathTest, SingleStatement) {
289
- if (AlwaysFalse())
290
- // This would fail if executed; this is a compilation test only
291
- ASSERT_DEATH(return, "");
292
-
293
- if (AlwaysTrue())
294
- EXPECT_DEATH(_exit(1), "");
295
- else
296
- // This empty "else" branch is meant to ensure that EXPECT_DEATH
297
- // doesn't expand into an "if" statement without an "else"
298
- ;
299
-
300
- if (AlwaysFalse())
301
- ASSERT_DEATH(return, "") << "did not die";
302
-
303
- if (AlwaysFalse())
304
- ;
305
- else
306
- EXPECT_DEATH(_exit(1), "") << 1 << 2 << 3;
307
- }
308
-
309
- void DieWithEmbeddedNul() {
310
- fprintf(stderr, "Hello%cmy null world.\n", '\0');
311
- fflush(stderr);
312
- _exit(1);
313
- }
314
-
315
- # if GTEST_USES_PCRE
316
- // Tests that EXPECT_DEATH and ASSERT_DEATH work when the error
317
- // message has a NUL character in it.
318
- TEST_F(TestForDeathTest, EmbeddedNulInMessage) {
319
- // TODO(wan@google.com): <regex.h> doesn't support matching strings
320
- // with embedded NUL characters - find a way to workaround it.
321
- EXPECT_DEATH(DieWithEmbeddedNul(), "my null world");
322
- ASSERT_DEATH(DieWithEmbeddedNul(), "my null world");
323
- }
324
- # endif // GTEST_USES_PCRE
325
-
326
- // Tests that death test macros expand to code which interacts well with switch
327
- // statements.
328
- TEST_F(TestForDeathTest, SwitchStatement) {
329
- // Microsoft compiler usually complains about switch statements without
330
- // case labels. We suppress that warning for this test.
331
- GTEST_DISABLE_MSC_WARNINGS_PUSH_(4065)
332
-
333
- switch (0)
334
- default:
335
- ASSERT_DEATH(_exit(1), "") << "exit in default switch handler";
336
-
337
- switch (0)
338
- case 0:
339
- EXPECT_DEATH(_exit(1), "") << "exit in switch case";
340
-
341
- GTEST_DISABLE_MSC_WARNINGS_POP_()
342
- }
343
-
344
- // Tests that a static member function can be used in a "fast" style
345
- // death test.
346
- TEST_F(TestForDeathTest, StaticMemberFunctionFastStyle) {
347
- testing::GTEST_FLAG(death_test_style) = "fast";
348
- ASSERT_DEATH(StaticMemberFunction(), "death.*StaticMember");
349
- }
350
-
351
- // Tests that a method of the test fixture can be used in a "fast"
352
- // style death test.
353
- TEST_F(TestForDeathTest, MemberFunctionFastStyle) {
354
- testing::GTEST_FLAG(death_test_style) = "fast";
355
- should_die_ = true;
356
- EXPECT_DEATH(MemberFunction(), "inside.*MemberFunction");
357
- }
358
-
359
- void ChangeToRootDir() { posix::ChDir(GTEST_PATH_SEP_); }
360
-
361
- // Tests that death tests work even if the current directory has been
362
- // changed.
363
- TEST_F(TestForDeathTest, FastDeathTestInChangedDir) {
364
- testing::GTEST_FLAG(death_test_style) = "fast";
365
-
366
- ChangeToRootDir();
367
- EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), "");
368
-
369
- ChangeToRootDir();
370
- ASSERT_DEATH(_exit(1), "");
371
- }
372
-
373
- # if GTEST_OS_LINUX
374
- void SigprofAction(int, siginfo_t*, void*) { /* no op */ }
375
-
376
- // Sets SIGPROF action and ITIMER_PROF timer (interval: 1ms).
377
- void SetSigprofActionAndTimer() {
378
- struct itimerval timer;
379
- timer.it_interval.tv_sec = 0;
380
- timer.it_interval.tv_usec = 1;
381
- timer.it_value = timer.it_interval;
382
- ASSERT_EQ(0, setitimer(ITIMER_PROF, &timer, NULL));
383
- struct sigaction signal_action;
384
- memset(&signal_action, 0, sizeof(signal_action));
385
- sigemptyset(&signal_action.sa_mask);
386
- signal_action.sa_sigaction = SigprofAction;
387
- signal_action.sa_flags = SA_RESTART | SA_SIGINFO;
388
- ASSERT_EQ(0, sigaction(SIGPROF, &signal_action, NULL));
389
- }
390
-
391
- // Disables ITIMER_PROF timer and ignores SIGPROF signal.
392
- void DisableSigprofActionAndTimer(struct sigaction* old_signal_action) {
393
- struct itimerval timer;
394
- timer.it_interval.tv_sec = 0;
395
- timer.it_interval.tv_usec = 0;
396
- timer.it_value = timer.it_interval;
397
- ASSERT_EQ(0, setitimer(ITIMER_PROF, &timer, NULL));
398
- struct sigaction signal_action;
399
- memset(&signal_action, 0, sizeof(signal_action));
400
- sigemptyset(&signal_action.sa_mask);
401
- signal_action.sa_handler = SIG_IGN;
402
- ASSERT_EQ(0, sigaction(SIGPROF, &signal_action, old_signal_action));
403
- }
404
-
405
- // Tests that death tests work when SIGPROF handler and timer are set.
406
- TEST_F(TestForDeathTest, FastSigprofActionSet) {
407
- testing::GTEST_FLAG(death_test_style) = "fast";
408
- SetSigprofActionAndTimer();
409
- EXPECT_DEATH(_exit(1), "");
410
- struct sigaction old_signal_action;
411
- DisableSigprofActionAndTimer(&old_signal_action);
412
- EXPECT_TRUE(old_signal_action.sa_sigaction == SigprofAction);
413
- }
414
-
415
- TEST_F(TestForDeathTest, ThreadSafeSigprofActionSet) {
416
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
417
- SetSigprofActionAndTimer();
418
- EXPECT_DEATH(_exit(1), "");
419
- struct sigaction old_signal_action;
420
- DisableSigprofActionAndTimer(&old_signal_action);
421
- EXPECT_TRUE(old_signal_action.sa_sigaction == SigprofAction);
422
- }
423
- # endif // GTEST_OS_LINUX
424
-
425
- // Repeats a representative sample of death tests in the "threadsafe" style:
426
-
427
- TEST_F(TestForDeathTest, StaticMemberFunctionThreadsafeStyle) {
428
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
429
- ASSERT_DEATH(StaticMemberFunction(), "death.*StaticMember");
430
- }
431
-
432
- TEST_F(TestForDeathTest, MemberFunctionThreadsafeStyle) {
433
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
434
- should_die_ = true;
435
- EXPECT_DEATH(MemberFunction(), "inside.*MemberFunction");
436
- }
437
-
438
- TEST_F(TestForDeathTest, ThreadsafeDeathTestInLoop) {
439
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
440
-
441
- for (int i = 0; i < 3; ++i)
442
- EXPECT_EXIT(_exit(i), testing::ExitedWithCode(i), "") << ": i = " << i;
443
- }
444
-
445
- TEST_F(TestForDeathTest, ThreadsafeDeathTestInChangedDir) {
446
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
447
-
448
- ChangeToRootDir();
449
- EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), "");
450
-
451
- ChangeToRootDir();
452
- ASSERT_DEATH(_exit(1), "");
453
- }
454
-
455
- TEST_F(TestForDeathTest, MixedStyles) {
456
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
457
- EXPECT_DEATH(_exit(1), "");
458
- testing::GTEST_FLAG(death_test_style) = "fast";
459
- EXPECT_DEATH(_exit(1), "");
460
- }
461
-
462
- # if GTEST_HAS_CLONE && GTEST_HAS_PTHREAD
463
-
464
- namespace {
465
-
466
- bool pthread_flag;
467
-
468
- void SetPthreadFlag() {
469
- pthread_flag = true;
470
- }
471
-
472
- } // namespace
473
-
474
- TEST_F(TestForDeathTest, DoesNotExecuteAtforkHooks) {
475
- if (!testing::GTEST_FLAG(death_test_use_fork)) {
476
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
477
- pthread_flag = false;
478
- ASSERT_EQ(0, pthread_atfork(&SetPthreadFlag, NULL, NULL));
479
- ASSERT_DEATH(_exit(1), "");
480
- ASSERT_FALSE(pthread_flag);
481
- }
482
- }
483
-
484
- # endif // GTEST_HAS_CLONE && GTEST_HAS_PTHREAD
485
-
486
- // Tests that a method of another class can be used in a death test.
487
- TEST_F(TestForDeathTest, MethodOfAnotherClass) {
488
- const MayDie x(true);
489
- ASSERT_DEATH(x.MemberFunction(), "MayDie\\:\\:MemberFunction");
490
- }
491
-
492
- // Tests that a global function can be used in a death test.
493
- TEST_F(TestForDeathTest, GlobalFunction) {
494
- EXPECT_DEATH(GlobalFunction(), "GlobalFunction");
495
- }
496
-
497
- // Tests that any value convertible to an RE works as a second
498
- // argument to EXPECT_DEATH.
499
- TEST_F(TestForDeathTest, AcceptsAnythingConvertibleToRE) {
500
- static const char regex_c_str[] = "GlobalFunction";
501
- EXPECT_DEATH(GlobalFunction(), regex_c_str);
502
-
503
- const testing::internal::RE regex(regex_c_str);
504
- EXPECT_DEATH(GlobalFunction(), regex);
505
-
506
- # if GTEST_HAS_GLOBAL_STRING
507
-
508
- const string regex_str(regex_c_str);
509
- EXPECT_DEATH(GlobalFunction(), regex_str);
510
-
511
- # endif // GTEST_HAS_GLOBAL_STRING
512
-
513
- # if !GTEST_USES_PCRE
514
-
515
- const ::std::string regex_std_str(regex_c_str);
516
- EXPECT_DEATH(GlobalFunction(), regex_std_str);
517
-
518
- # endif // !GTEST_USES_PCRE
519
- }
520
-
521
- // Tests that a non-void function can be used in a death test.
522
- TEST_F(TestForDeathTest, NonVoidFunction) {
523
- ASSERT_DEATH(NonVoidFunction(), "NonVoidFunction");
524
- }
525
-
526
- // Tests that functions that take parameter(s) can be used in a death test.
527
- TEST_F(TestForDeathTest, FunctionWithParameter) {
528
- EXPECT_DEATH(DieIf(true), "DieIf\\(\\)");
529
- EXPECT_DEATH(DieIfLessThan(2, 3), "DieIfLessThan");
530
- }
531
-
532
- // Tests that ASSERT_DEATH can be used outside a TEST, TEST_F, or test fixture.
533
- TEST_F(TestForDeathTest, OutsideFixture) {
534
- DeathTestSubroutine();
535
- }
536
-
537
- // Tests that death tests can be done inside a loop.
538
- TEST_F(TestForDeathTest, InsideLoop) {
539
- for (int i = 0; i < 5; i++) {
540
- EXPECT_DEATH(DieIfLessThan(-1, i), "DieIfLessThan") << "where i == " << i;
541
- }
542
- }
543
-
544
- // Tests that a compound statement can be used in a death test.
545
- TEST_F(TestForDeathTest, CompoundStatement) {
546
- EXPECT_DEATH({ // NOLINT
547
- const int x = 2;
548
- const int y = x + 1;
549
- DieIfLessThan(x, y);
550
- },
551
- "DieIfLessThan");
552
- }
553
-
554
- // Tests that code that doesn't die causes a death test to fail.
555
- TEST_F(TestForDeathTest, DoesNotDie) {
556
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(DieIf(false), "DieIf"),
557
- "failed to die");
558
- }
559
-
560
- // Tests that a death test fails when the error message isn't expected.
561
- TEST_F(TestForDeathTest, ErrorMessageMismatch) {
562
- EXPECT_NONFATAL_FAILURE({ // NOLINT
563
- EXPECT_DEATH(DieIf(true), "DieIfLessThan") << "End of death test message.";
564
- }, "died but not with expected error");
565
- }
566
-
567
- // On exit, *aborted will be true iff the EXPECT_DEATH() statement
568
- // aborted the function.
569
- void ExpectDeathTestHelper(bool* aborted) {
570
- *aborted = true;
571
- EXPECT_DEATH(DieIf(false), "DieIf"); // This assertion should fail.
572
- *aborted = false;
573
- }
574
-
575
- // Tests that EXPECT_DEATH doesn't abort the test on failure.
576
- TEST_F(TestForDeathTest, EXPECT_DEATH) {
577
- bool aborted = true;
578
- EXPECT_NONFATAL_FAILURE(ExpectDeathTestHelper(&aborted),
579
- "failed to die");
580
- EXPECT_FALSE(aborted);
581
- }
582
-
583
- // Tests that ASSERT_DEATH does abort the test on failure.
584
- TEST_F(TestForDeathTest, ASSERT_DEATH) {
585
- static bool aborted;
586
- EXPECT_FATAL_FAILURE({ // NOLINT
587
- aborted = true;
588
- ASSERT_DEATH(DieIf(false), "DieIf"); // This assertion should fail.
589
- aborted = false;
590
- }, "failed to die");
591
- EXPECT_TRUE(aborted);
592
- }
593
-
594
- // Tests that EXPECT_DEATH evaluates the arguments exactly once.
595
- TEST_F(TestForDeathTest, SingleEvaluation) {
596
- int x = 3;
597
- EXPECT_DEATH(DieIf((++x) == 4), "DieIf");
598
-
599
- const char* regex = "DieIf";
600
- const char* regex_save = regex;
601
- EXPECT_DEATH(DieIfLessThan(3, 4), regex++);
602
- EXPECT_EQ(regex_save + 1, regex);
603
- }
604
-
605
- // Tests that run-away death tests are reported as failures.
606
- TEST_F(TestForDeathTest, RunawayIsFailure) {
607
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(static_cast<void>(0), "Foo"),
608
- "failed to die.");
609
- }
610
-
611
- // Tests that death tests report executing 'return' in the statement as
612
- // failure.
613
- TEST_F(TestForDeathTest, ReturnIsFailure) {
614
- EXPECT_FATAL_FAILURE(ASSERT_DEATH(return, "Bar"),
615
- "illegal return in test statement.");
616
- }
617
-
618
- // Tests that EXPECT_DEBUG_DEATH works as expected, that is, you can stream a
619
- // message to it, and in debug mode it:
620
- // 1. Asserts on death.
621
- // 2. Has no side effect.
622
- //
623
- // And in opt mode, it:
624
- // 1. Has side effects but does not assert.
625
- TEST_F(TestForDeathTest, TestExpectDebugDeath) {
626
- int sideeffect = 0;
627
-
628
- EXPECT_DEBUG_DEATH(DieInDebugElse12(&sideeffect), "death.*DieInDebugElse12")
629
- << "Must accept a streamed message";
630
-
631
- # ifdef NDEBUG
632
-
633
- // Checks that the assignment occurs in opt mode (sideeffect).
634
- EXPECT_EQ(12, sideeffect);
635
-
636
- # else
637
-
638
- // Checks that the assignment does not occur in dbg mode (no sideeffect).
639
- EXPECT_EQ(0, sideeffect);
640
-
641
- # endif
642
- }
643
-
644
- // Tests that ASSERT_DEBUG_DEATH works as expected, that is, you can stream a
645
- // message to it, and in debug mode it:
646
- // 1. Asserts on death.
647
- // 2. Has no side effect.
648
- //
649
- // And in opt mode, it:
650
- // 1. Has side effects but does not assert.
651
- TEST_F(TestForDeathTest, TestAssertDebugDeath) {
652
- int sideeffect = 0;
653
-
654
- ASSERT_DEBUG_DEATH(DieInDebugElse12(&sideeffect), "death.*DieInDebugElse12")
655
- << "Must accept a streamed message";
656
-
657
- # ifdef NDEBUG
658
-
659
- // Checks that the assignment occurs in opt mode (sideeffect).
660
- EXPECT_EQ(12, sideeffect);
661
-
662
- # else
663
-
664
- // Checks that the assignment does not occur in dbg mode (no sideeffect).
665
- EXPECT_EQ(0, sideeffect);
666
-
667
- # endif
668
- }
669
-
670
- # ifndef NDEBUG
671
-
672
- void ExpectDebugDeathHelper(bool* aborted) {
673
- *aborted = true;
674
- EXPECT_DEBUG_DEATH(return, "") << "This is expected to fail.";
675
- *aborted = false;
676
- }
677
-
678
- # if GTEST_OS_WINDOWS
679
- TEST(PopUpDeathTest, DoesNotShowPopUpOnAbort) {
680
- printf("This test should be considered failing if it shows "
681
- "any pop-up dialogs.\n");
682
- fflush(stdout);
683
-
684
- EXPECT_DEATH({
685
- testing::GTEST_FLAG(catch_exceptions) = false;
686
- abort();
687
- }, "");
688
- }
689
- # endif // GTEST_OS_WINDOWS
690
-
691
- // Tests that EXPECT_DEBUG_DEATH in debug mode does not abort
692
- // the function.
693
- TEST_F(TestForDeathTest, ExpectDebugDeathDoesNotAbort) {
694
- bool aborted = true;
695
- EXPECT_NONFATAL_FAILURE(ExpectDebugDeathHelper(&aborted), "");
696
- EXPECT_FALSE(aborted);
697
- }
698
-
699
- void AssertDebugDeathHelper(bool* aborted) {
700
- *aborted = true;
701
- GTEST_LOG_(INFO) << "Before ASSERT_DEBUG_DEATH";
702
- ASSERT_DEBUG_DEATH(GTEST_LOG_(INFO) << "In ASSERT_DEBUG_DEATH"; return, "")
703
- << "This is expected to fail.";
704
- GTEST_LOG_(INFO) << "After ASSERT_DEBUG_DEATH";
705
- *aborted = false;
706
- }
707
-
708
- // Tests that ASSERT_DEBUG_DEATH in debug mode aborts the function on
709
- // failure.
710
- TEST_F(TestForDeathTest, AssertDebugDeathAborts) {
711
- static bool aborted;
712
- aborted = false;
713
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
714
- EXPECT_TRUE(aborted);
715
- }
716
-
717
- TEST_F(TestForDeathTest, AssertDebugDeathAborts2) {
718
- static bool aborted;
719
- aborted = false;
720
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
721
- EXPECT_TRUE(aborted);
722
- }
723
-
724
- TEST_F(TestForDeathTest, AssertDebugDeathAborts3) {
725
- static bool aborted;
726
- aborted = false;
727
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
728
- EXPECT_TRUE(aborted);
729
- }
730
-
731
- TEST_F(TestForDeathTest, AssertDebugDeathAborts4) {
732
- static bool aborted;
733
- aborted = false;
734
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
735
- EXPECT_TRUE(aborted);
736
- }
737
-
738
- TEST_F(TestForDeathTest, AssertDebugDeathAborts5) {
739
- static bool aborted;
740
- aborted = false;
741
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
742
- EXPECT_TRUE(aborted);
743
- }
744
-
745
- TEST_F(TestForDeathTest, AssertDebugDeathAborts6) {
746
- static bool aborted;
747
- aborted = false;
748
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
749
- EXPECT_TRUE(aborted);
750
- }
751
-
752
- TEST_F(TestForDeathTest, AssertDebugDeathAborts7) {
753
- static bool aborted;
754
- aborted = false;
755
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
756
- EXPECT_TRUE(aborted);
757
- }
758
-
759
- TEST_F(TestForDeathTest, AssertDebugDeathAborts8) {
760
- static bool aborted;
761
- aborted = false;
762
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
763
- EXPECT_TRUE(aborted);
764
- }
765
-
766
- TEST_F(TestForDeathTest, AssertDebugDeathAborts9) {
767
- static bool aborted;
768
- aborted = false;
769
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
770
- EXPECT_TRUE(aborted);
771
- }
772
-
773
- TEST_F(TestForDeathTest, AssertDebugDeathAborts10) {
774
- static bool aborted;
775
- aborted = false;
776
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
777
- EXPECT_TRUE(aborted);
778
- }
779
-
780
- # endif // _NDEBUG
781
-
782
- // Tests the *_EXIT family of macros, using a variety of predicates.
783
- static void TestExitMacros() {
784
- EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), "");
785
- ASSERT_EXIT(_exit(42), testing::ExitedWithCode(42), "");
786
-
787
- # if GTEST_OS_WINDOWS
788
-
789
- // Of all signals effects on the process exit code, only those of SIGABRT
790
- // are documented on Windows.
791
- // See http://msdn.microsoft.com/en-us/library/dwwzkt4c(VS.71).aspx.
792
- EXPECT_EXIT(raise(SIGABRT), testing::ExitedWithCode(3), "") << "b_ar";
793
-
794
- # else
795
-
796
- EXPECT_EXIT(raise(SIGKILL), testing::KilledBySignal(SIGKILL), "") << "foo";
797
- ASSERT_EXIT(raise(SIGUSR2), testing::KilledBySignal(SIGUSR2), "") << "bar";
798
-
799
- EXPECT_FATAL_FAILURE({ // NOLINT
800
- ASSERT_EXIT(_exit(0), testing::KilledBySignal(SIGSEGV), "")
801
- << "This failure is expected, too.";
802
- }, "This failure is expected, too.");
803
-
804
- # endif // GTEST_OS_WINDOWS
805
-
806
- EXPECT_NONFATAL_FAILURE({ // NOLINT
807
- EXPECT_EXIT(raise(SIGSEGV), testing::ExitedWithCode(0), "")
808
- << "This failure is expected.";
809
- }, "This failure is expected.");
810
- }
811
-
812
- TEST_F(TestForDeathTest, ExitMacros) {
813
- TestExitMacros();
814
- }
815
-
816
- TEST_F(TestForDeathTest, ExitMacrosUsingFork) {
817
- testing::GTEST_FLAG(death_test_use_fork) = true;
818
- TestExitMacros();
819
- }
820
-
821
- TEST_F(TestForDeathTest, InvalidStyle) {
822
- testing::GTEST_FLAG(death_test_style) = "rococo";
823
- EXPECT_NONFATAL_FAILURE({ // NOLINT
824
- EXPECT_DEATH(_exit(0), "") << "This failure is expected.";
825
- }, "This failure is expected.");
826
- }
827
-
828
- TEST_F(TestForDeathTest, DeathTestFailedOutput) {
829
- testing::GTEST_FLAG(death_test_style) = "fast";
830
- EXPECT_NONFATAL_FAILURE(
831
- EXPECT_DEATH(DieWithMessage("death\n"),
832
- "expected message"),
833
- "Actual msg:\n"
834
- "[ DEATH ] death\n");
835
- }
836
-
837
- TEST_F(TestForDeathTest, DeathTestUnexpectedReturnOutput) {
838
- testing::GTEST_FLAG(death_test_style) = "fast";
839
- EXPECT_NONFATAL_FAILURE(
840
- EXPECT_DEATH({
841
- fprintf(stderr, "returning\n");
842
- fflush(stderr);
843
- return;
844
- }, ""),
845
- " Result: illegal return in test statement.\n"
846
- " Error msg:\n"
847
- "[ DEATH ] returning\n");
848
- }
849
-
850
- TEST_F(TestForDeathTest, DeathTestBadExitCodeOutput) {
851
- testing::GTEST_FLAG(death_test_style) = "fast";
852
- EXPECT_NONFATAL_FAILURE(
853
- EXPECT_EXIT(DieWithMessage("exiting with rc 1\n"),
854
- testing::ExitedWithCode(3),
855
- "expected message"),
856
- " Result: died but not with expected exit code:\n"
857
- " Exited with exit status 1\n"
858
- "Actual msg:\n"
859
- "[ DEATH ] exiting with rc 1\n");
860
- }
861
-
862
- TEST_F(TestForDeathTest, DeathTestMultiLineMatchFail) {
863
- testing::GTEST_FLAG(death_test_style) = "fast";
864
- EXPECT_NONFATAL_FAILURE(
865
- EXPECT_DEATH(DieWithMessage("line 1\nline 2\nline 3\n"),
866
- "line 1\nxyz\nline 3\n"),
867
- "Actual msg:\n"
868
- "[ DEATH ] line 1\n"
869
- "[ DEATH ] line 2\n"
870
- "[ DEATH ] line 3\n");
871
- }
872
-
873
- TEST_F(TestForDeathTest, DeathTestMultiLineMatchPass) {
874
- testing::GTEST_FLAG(death_test_style) = "fast";
875
- EXPECT_DEATH(DieWithMessage("line 1\nline 2\nline 3\n"),
876
- "line 1\nline 2\nline 3\n");
877
- }
878
-
879
- // A DeathTestFactory that returns MockDeathTests.
880
- class MockDeathTestFactory : public DeathTestFactory {
881
- public:
882
- MockDeathTestFactory();
883
- virtual bool Create(const char* statement,
884
- const ::testing::internal::RE* regex,
885
- const char* file, int line, DeathTest** test);
886
-
887
- // Sets the parameters for subsequent calls to Create.
888
- void SetParameters(bool create, DeathTest::TestRole role,
889
- int status, bool passed);
890
-
891
- // Accessors.
892
- int AssumeRoleCalls() const { return assume_role_calls_; }
893
- int WaitCalls() const { return wait_calls_; }
894
- size_t PassedCalls() const { return passed_args_.size(); }
895
- bool PassedArgument(int n) const { return passed_args_[n]; }
896
- size_t AbortCalls() const { return abort_args_.size(); }
897
- DeathTest::AbortReason AbortArgument(int n) const {
898
- return abort_args_[n];
899
- }
900
- bool TestDeleted() const { return test_deleted_; }
901
-
902
- private:
903
- friend class MockDeathTest;
904
- // If true, Create will return a MockDeathTest; otherwise it returns
905
- // NULL.
906
- bool create_;
907
- // The value a MockDeathTest will return from its AssumeRole method.
908
- DeathTest::TestRole role_;
909
- // The value a MockDeathTest will return from its Wait method.
910
- int status_;
911
- // The value a MockDeathTest will return from its Passed method.
912
- bool passed_;
913
-
914
- // Number of times AssumeRole was called.
915
- int assume_role_calls_;
916
- // Number of times Wait was called.
917
- int wait_calls_;
918
- // The arguments to the calls to Passed since the last call to
919
- // SetParameters.
920
- std::vector<bool> passed_args_;
921
- // The arguments to the calls to Abort since the last call to
922
- // SetParameters.
923
- std::vector<DeathTest::AbortReason> abort_args_;
924
- // True if the last MockDeathTest returned by Create has been
925
- // deleted.
926
- bool test_deleted_;
927
- };
928
-
929
-
930
- // A DeathTest implementation useful in testing. It returns values set
931
- // at its creation from its various inherited DeathTest methods, and
932
- // reports calls to those methods to its parent MockDeathTestFactory
933
- // object.
934
- class MockDeathTest : public DeathTest {
935
- public:
936
- MockDeathTest(MockDeathTestFactory *parent,
937
- TestRole role, int status, bool passed) :
938
- parent_(parent), role_(role), status_(status), passed_(passed) {
939
- }
940
- virtual ~MockDeathTest() {
941
- parent_->test_deleted_ = true;
942
- }
943
- virtual TestRole AssumeRole() {
944
- ++parent_->assume_role_calls_;
945
- return role_;
946
- }
947
- virtual int Wait() {
948
- ++parent_->wait_calls_;
949
- return status_;
950
- }
951
- virtual bool Passed(bool exit_status_ok) {
952
- parent_->passed_args_.push_back(exit_status_ok);
953
- return passed_;
954
- }
955
- virtual void Abort(AbortReason reason) {
956
- parent_->abort_args_.push_back(reason);
957
- }
958
-
959
- private:
960
- MockDeathTestFactory* const parent_;
961
- const TestRole role_;
962
- const int status_;
963
- const bool passed_;
964
- };
965
-
966
-
967
- // MockDeathTestFactory constructor.
968
- MockDeathTestFactory::MockDeathTestFactory()
969
- : create_(true),
970
- role_(DeathTest::OVERSEE_TEST),
971
- status_(0),
972
- passed_(true),
973
- assume_role_calls_(0),
974
- wait_calls_(0),
975
- passed_args_(),
976
- abort_args_() {
977
- }
978
-
979
-
980
- // Sets the parameters for subsequent calls to Create.
981
- void MockDeathTestFactory::SetParameters(bool create,
982
- DeathTest::TestRole role,
983
- int status, bool passed) {
984
- create_ = create;
985
- role_ = role;
986
- status_ = status;
987
- passed_ = passed;
988
-
989
- assume_role_calls_ = 0;
990
- wait_calls_ = 0;
991
- passed_args_.clear();
992
- abort_args_.clear();
993
- }
994
-
995
-
996
- // Sets test to NULL (if create_ is false) or to the address of a new
997
- // MockDeathTest object with parameters taken from the last call
998
- // to SetParameters (if create_ is true). Always returns true.
999
- bool MockDeathTestFactory::Create(const char* /*statement*/,
1000
- const ::testing::internal::RE* /*regex*/,
1001
- const char* /*file*/,
1002
- int /*line*/,
1003
- DeathTest** test) {
1004
- test_deleted_ = false;
1005
- if (create_) {
1006
- *test = new MockDeathTest(this, role_, status_, passed_);
1007
- } else {
1008
- *test = NULL;
1009
- }
1010
- return true;
1011
- }
1012
-
1013
- // A test fixture for testing the logic of the GTEST_DEATH_TEST_ macro.
1014
- // It installs a MockDeathTestFactory that is used for the duration
1015
- // of the test case.
1016
- class MacroLogicDeathTest : public testing::Test {
1017
- protected:
1018
- static testing::internal::ReplaceDeathTestFactory* replacer_;
1019
- static MockDeathTestFactory* factory_;
1020
-
1021
- static void SetUpTestCase() {
1022
- factory_ = new MockDeathTestFactory;
1023
- replacer_ = new testing::internal::ReplaceDeathTestFactory(factory_);
1024
- }
1025
-
1026
- static void TearDownTestCase() {
1027
- delete replacer_;
1028
- replacer_ = NULL;
1029
- delete factory_;
1030
- factory_ = NULL;
1031
- }
1032
-
1033
- // Runs a death test that breaks the rules by returning. Such a death
1034
- // test cannot be run directly from a test routine that uses a
1035
- // MockDeathTest, or the remainder of the routine will not be executed.
1036
- static void RunReturningDeathTest(bool* flag) {
1037
- ASSERT_DEATH({ // NOLINT
1038
- *flag = true;
1039
- return;
1040
- }, "");
1041
- }
1042
- };
1043
-
1044
- testing::internal::ReplaceDeathTestFactory* MacroLogicDeathTest::replacer_
1045
- = NULL;
1046
- MockDeathTestFactory* MacroLogicDeathTest::factory_ = NULL;
1047
-
1048
-
1049
- // Test that nothing happens when the factory doesn't return a DeathTest:
1050
- TEST_F(MacroLogicDeathTest, NothingHappens) {
1051
- bool flag = false;
1052
- factory_->SetParameters(false, DeathTest::OVERSEE_TEST, 0, true);
1053
- EXPECT_DEATH(flag = true, "");
1054
- EXPECT_FALSE(flag);
1055
- EXPECT_EQ(0, factory_->AssumeRoleCalls());
1056
- EXPECT_EQ(0, factory_->WaitCalls());
1057
- EXPECT_EQ(0U, factory_->PassedCalls());
1058
- EXPECT_EQ(0U, factory_->AbortCalls());
1059
- EXPECT_FALSE(factory_->TestDeleted());
1060
- }
1061
-
1062
- // Test that the parent process doesn't run the death test code,
1063
- // and that the Passed method returns false when the (simulated)
1064
- // child process exits with status 0:
1065
- TEST_F(MacroLogicDeathTest, ChildExitsSuccessfully) {
1066
- bool flag = false;
1067
- factory_->SetParameters(true, DeathTest::OVERSEE_TEST, 0, true);
1068
- EXPECT_DEATH(flag = true, "");
1069
- EXPECT_FALSE(flag);
1070
- EXPECT_EQ(1, factory_->AssumeRoleCalls());
1071
- EXPECT_EQ(1, factory_->WaitCalls());
1072
- ASSERT_EQ(1U, factory_->PassedCalls());
1073
- EXPECT_FALSE(factory_->PassedArgument(0));
1074
- EXPECT_EQ(0U, factory_->AbortCalls());
1075
- EXPECT_TRUE(factory_->TestDeleted());
1076
- }
1077
-
1078
- // Tests that the Passed method was given the argument "true" when
1079
- // the (simulated) child process exits with status 1:
1080
- TEST_F(MacroLogicDeathTest, ChildExitsUnsuccessfully) {
1081
- bool flag = false;
1082
- factory_->SetParameters(true, DeathTest::OVERSEE_TEST, 1, true);
1083
- EXPECT_DEATH(flag = true, "");
1084
- EXPECT_FALSE(flag);
1085
- EXPECT_EQ(1, factory_->AssumeRoleCalls());
1086
- EXPECT_EQ(1, factory_->WaitCalls());
1087
- ASSERT_EQ(1U, factory_->PassedCalls());
1088
- EXPECT_TRUE(factory_->PassedArgument(0));
1089
- EXPECT_EQ(0U, factory_->AbortCalls());
1090
- EXPECT_TRUE(factory_->TestDeleted());
1091
- }
1092
-
1093
- // Tests that the (simulated) child process executes the death test
1094
- // code, and is aborted with the correct AbortReason if it
1095
- // executes a return statement.
1096
- TEST_F(MacroLogicDeathTest, ChildPerformsReturn) {
1097
- bool flag = false;
1098
- factory_->SetParameters(true, DeathTest::EXECUTE_TEST, 0, true);
1099
- RunReturningDeathTest(&flag);
1100
- EXPECT_TRUE(flag);
1101
- EXPECT_EQ(1, factory_->AssumeRoleCalls());
1102
- EXPECT_EQ(0, factory_->WaitCalls());
1103
- EXPECT_EQ(0U, factory_->PassedCalls());
1104
- EXPECT_EQ(1U, factory_->AbortCalls());
1105
- EXPECT_EQ(DeathTest::TEST_ENCOUNTERED_RETURN_STATEMENT,
1106
- factory_->AbortArgument(0));
1107
- EXPECT_TRUE(factory_->TestDeleted());
1108
- }
1109
-
1110
- // Tests that the (simulated) child process is aborted with the
1111
- // correct AbortReason if it does not die.
1112
- TEST_F(MacroLogicDeathTest, ChildDoesNotDie) {
1113
- bool flag = false;
1114
- factory_->SetParameters(true, DeathTest::EXECUTE_TEST, 0, true);
1115
- EXPECT_DEATH(flag = true, "");
1116
- EXPECT_TRUE(flag);
1117
- EXPECT_EQ(1, factory_->AssumeRoleCalls());
1118
- EXPECT_EQ(0, factory_->WaitCalls());
1119
- EXPECT_EQ(0U, factory_->PassedCalls());
1120
- // This time there are two calls to Abort: one since the test didn't
1121
- // die, and another from the ReturnSentinel when it's destroyed. The
1122
- // sentinel normally isn't destroyed if a test doesn't die, since
1123
- // _exit(2) is called in that case by ForkingDeathTest, but not by
1124
- // our MockDeathTest.
1125
- ASSERT_EQ(2U, factory_->AbortCalls());
1126
- EXPECT_EQ(DeathTest::TEST_DID_NOT_DIE,
1127
- factory_->AbortArgument(0));
1128
- EXPECT_EQ(DeathTest::TEST_ENCOUNTERED_RETURN_STATEMENT,
1129
- factory_->AbortArgument(1));
1130
- EXPECT_TRUE(factory_->TestDeleted());
1131
- }
1132
-
1133
- // Tests that a successful death test does not register a successful
1134
- // test part.
1135
- TEST(SuccessRegistrationDeathTest, NoSuccessPart) {
1136
- EXPECT_DEATH(_exit(1), "");
1137
- EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
1138
- }
1139
-
1140
- TEST(StreamingAssertionsDeathTest, DeathTest) {
1141
- EXPECT_DEATH(_exit(1), "") << "unexpected failure";
1142
- ASSERT_DEATH(_exit(1), "") << "unexpected failure";
1143
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1144
- EXPECT_DEATH(_exit(0), "") << "expected failure";
1145
- }, "expected failure");
1146
- EXPECT_FATAL_FAILURE({ // NOLINT
1147
- ASSERT_DEATH(_exit(0), "") << "expected failure";
1148
- }, "expected failure");
1149
- }
1150
-
1151
- // Tests that GetLastErrnoDescription returns an empty string when the
1152
- // last error is 0 and non-empty string when it is non-zero.
1153
- TEST(GetLastErrnoDescription, GetLastErrnoDescriptionWorks) {
1154
- errno = ENOENT;
1155
- EXPECT_STRNE("", GetLastErrnoDescription().c_str());
1156
- errno = 0;
1157
- EXPECT_STREQ("", GetLastErrnoDescription().c_str());
1158
- }
1159
-
1160
- # if GTEST_OS_WINDOWS
1161
- TEST(AutoHandleTest, AutoHandleWorks) {
1162
- HANDLE handle = ::CreateEvent(NULL, FALSE, FALSE, NULL);
1163
- ASSERT_NE(INVALID_HANDLE_VALUE, handle);
1164
-
1165
- // Tests that the AutoHandle is correctly initialized with a handle.
1166
- testing::internal::AutoHandle auto_handle(handle);
1167
- EXPECT_EQ(handle, auto_handle.Get());
1168
-
1169
- // Tests that Reset assigns INVALID_HANDLE_VALUE.
1170
- // Note that this cannot verify whether the original handle is closed.
1171
- auto_handle.Reset();
1172
- EXPECT_EQ(INVALID_HANDLE_VALUE, auto_handle.Get());
1173
-
1174
- // Tests that Reset assigns the new handle.
1175
- // Note that this cannot verify whether the original handle is closed.
1176
- handle = ::CreateEvent(NULL, FALSE, FALSE, NULL);
1177
- ASSERT_NE(INVALID_HANDLE_VALUE, handle);
1178
- auto_handle.Reset(handle);
1179
- EXPECT_EQ(handle, auto_handle.Get());
1180
-
1181
- // Tests that AutoHandle contains INVALID_HANDLE_VALUE by default.
1182
- testing::internal::AutoHandle auto_handle2;
1183
- EXPECT_EQ(INVALID_HANDLE_VALUE, auto_handle2.Get());
1184
- }
1185
- # endif // GTEST_OS_WINDOWS
1186
-
1187
- # if GTEST_OS_WINDOWS
1188
- typedef unsigned __int64 BiggestParsable;
1189
- typedef signed __int64 BiggestSignedParsable;
1190
- # else
1191
- typedef unsigned long long BiggestParsable;
1192
- typedef signed long long BiggestSignedParsable;
1193
- # endif // GTEST_OS_WINDOWS
1194
-
1195
- // We cannot use std::numeric_limits<T>::max() as it clashes with the
1196
- // max() macro defined by <windows.h>.
1197
- const BiggestParsable kBiggestParsableMax = ULLONG_MAX;
1198
- const BiggestSignedParsable kBiggestSignedParsableMax = LLONG_MAX;
1199
-
1200
- TEST(ParseNaturalNumberTest, RejectsInvalidFormat) {
1201
- BiggestParsable result = 0;
1202
-
1203
- // Rejects non-numbers.
1204
- EXPECT_FALSE(ParseNaturalNumber("non-number string", &result));
1205
-
1206
- // Rejects numbers with whitespace prefix.
1207
- EXPECT_FALSE(ParseNaturalNumber(" 123", &result));
1208
-
1209
- // Rejects negative numbers.
1210
- EXPECT_FALSE(ParseNaturalNumber("-123", &result));
1211
-
1212
- // Rejects numbers starting with a plus sign.
1213
- EXPECT_FALSE(ParseNaturalNumber("+123", &result));
1214
- errno = 0;
1215
- }
1216
-
1217
- TEST(ParseNaturalNumberTest, RejectsOverflownNumbers) {
1218
- BiggestParsable result = 0;
1219
-
1220
- EXPECT_FALSE(ParseNaturalNumber("99999999999999999999999", &result));
1221
-
1222
- signed char char_result = 0;
1223
- EXPECT_FALSE(ParseNaturalNumber("200", &char_result));
1224
- errno = 0;
1225
- }
1226
-
1227
- TEST(ParseNaturalNumberTest, AcceptsValidNumbers) {
1228
- BiggestParsable result = 0;
1229
-
1230
- result = 0;
1231
- ASSERT_TRUE(ParseNaturalNumber("123", &result));
1232
- EXPECT_EQ(123U, result);
1233
-
1234
- // Check 0 as an edge case.
1235
- result = 1;
1236
- ASSERT_TRUE(ParseNaturalNumber("0", &result));
1237
- EXPECT_EQ(0U, result);
1238
-
1239
- result = 1;
1240
- ASSERT_TRUE(ParseNaturalNumber("00000", &result));
1241
- EXPECT_EQ(0U, result);
1242
- }
1243
-
1244
- TEST(ParseNaturalNumberTest, AcceptsTypeLimits) {
1245
- Message msg;
1246
- msg << kBiggestParsableMax;
1247
-
1248
- BiggestParsable result = 0;
1249
- EXPECT_TRUE(ParseNaturalNumber(msg.GetString(), &result));
1250
- EXPECT_EQ(kBiggestParsableMax, result);
1251
-
1252
- Message msg2;
1253
- msg2 << kBiggestSignedParsableMax;
1254
-
1255
- BiggestSignedParsable signed_result = 0;
1256
- EXPECT_TRUE(ParseNaturalNumber(msg2.GetString(), &signed_result));
1257
- EXPECT_EQ(kBiggestSignedParsableMax, signed_result);
1258
-
1259
- Message msg3;
1260
- msg3 << INT_MAX;
1261
-
1262
- int int_result = 0;
1263
- EXPECT_TRUE(ParseNaturalNumber(msg3.GetString(), &int_result));
1264
- EXPECT_EQ(INT_MAX, int_result);
1265
-
1266
- Message msg4;
1267
- msg4 << UINT_MAX;
1268
-
1269
- unsigned int uint_result = 0;
1270
- EXPECT_TRUE(ParseNaturalNumber(msg4.GetString(), &uint_result));
1271
- EXPECT_EQ(UINT_MAX, uint_result);
1272
- }
1273
-
1274
- TEST(ParseNaturalNumberTest, WorksForShorterIntegers) {
1275
- short short_result = 0;
1276
- ASSERT_TRUE(ParseNaturalNumber("123", &short_result));
1277
- EXPECT_EQ(123, short_result);
1278
-
1279
- signed char char_result = 0;
1280
- ASSERT_TRUE(ParseNaturalNumber("123", &char_result));
1281
- EXPECT_EQ(123, char_result);
1282
- }
1283
-
1284
- # if GTEST_OS_WINDOWS
1285
- TEST(EnvironmentTest, HandleFitsIntoSizeT) {
1286
- // TODO(vladl@google.com): Remove this test after this condition is verified
1287
- // in a static assertion in gtest-death-test.cc in the function
1288
- // GetStatusFileDescriptor.
1289
- ASSERT_TRUE(sizeof(HANDLE) <= sizeof(size_t));
1290
- }
1291
- # endif // GTEST_OS_WINDOWS
1292
-
1293
- // Tests that EXPECT_DEATH_IF_SUPPORTED/ASSERT_DEATH_IF_SUPPORTED trigger
1294
- // failures when death tests are available on the system.
1295
- TEST(ConditionalDeathMacrosDeathTest, ExpectsDeathWhenDeathTestsAvailable) {
1296
- EXPECT_DEATH_IF_SUPPORTED(DieInside("CondDeathTestExpectMacro"),
1297
- "death inside CondDeathTestExpectMacro");
1298
- ASSERT_DEATH_IF_SUPPORTED(DieInside("CondDeathTestAssertMacro"),
1299
- "death inside CondDeathTestAssertMacro");
1300
-
1301
- // Empty statement will not crash, which must trigger a failure.
1302
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH_IF_SUPPORTED(;, ""), "");
1303
- EXPECT_FATAL_FAILURE(ASSERT_DEATH_IF_SUPPORTED(;, ""), "");
1304
- }
1305
-
1306
- TEST(InDeathTestChildDeathTest, ReportsDeathTestCorrectlyInFastStyle) {
1307
- testing::GTEST_FLAG(death_test_style) = "fast";
1308
- EXPECT_FALSE(InDeathTestChild());
1309
- EXPECT_DEATH({
1310
- fprintf(stderr, InDeathTestChild() ? "Inside" : "Outside");
1311
- fflush(stderr);
1312
- _exit(1);
1313
- }, "Inside");
1314
- }
1315
-
1316
- TEST(InDeathTestChildDeathTest, ReportsDeathTestCorrectlyInThreadSafeStyle) {
1317
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
1318
- EXPECT_FALSE(InDeathTestChild());
1319
- EXPECT_DEATH({
1320
- fprintf(stderr, InDeathTestChild() ? "Inside" : "Outside");
1321
- fflush(stderr);
1322
- _exit(1);
1323
- }, "Inside");
1324
- }
1325
-
1326
- #else // !GTEST_HAS_DEATH_TEST follows
1327
-
1328
- using testing::internal::CaptureStderr;
1329
- using testing::internal::GetCapturedStderr;
1330
-
1331
- // Tests that EXPECT_DEATH_IF_SUPPORTED/ASSERT_DEATH_IF_SUPPORTED are still
1332
- // defined but do not trigger failures when death tests are not available on
1333
- // the system.
1334
- TEST(ConditionalDeathMacrosTest, WarnsWhenDeathTestsNotAvailable) {
1335
- // Empty statement will not crash, but that should not trigger a failure
1336
- // when death tests are not supported.
1337
- CaptureStderr();
1338
- EXPECT_DEATH_IF_SUPPORTED(;, "");
1339
- std::string output = GetCapturedStderr();
1340
- ASSERT_TRUE(NULL != strstr(output.c_str(),
1341
- "Death tests are not supported on this platform"));
1342
- ASSERT_TRUE(NULL != strstr(output.c_str(), ";"));
1343
-
1344
- // The streamed message should not be printed as there is no test failure.
1345
- CaptureStderr();
1346
- EXPECT_DEATH_IF_SUPPORTED(;, "") << "streamed message";
1347
- output = GetCapturedStderr();
1348
- ASSERT_TRUE(NULL == strstr(output.c_str(), "streamed message"));
1349
-
1350
- CaptureStderr();
1351
- ASSERT_DEATH_IF_SUPPORTED(;, ""); // NOLINT
1352
- output = GetCapturedStderr();
1353
- ASSERT_TRUE(NULL != strstr(output.c_str(),
1354
- "Death tests are not supported on this platform"));
1355
- ASSERT_TRUE(NULL != strstr(output.c_str(), ";"));
1356
-
1357
- CaptureStderr();
1358
- ASSERT_DEATH_IF_SUPPORTED(;, "") << "streamed message"; // NOLINT
1359
- output = GetCapturedStderr();
1360
- ASSERT_TRUE(NULL == strstr(output.c_str(), "streamed message"));
1361
- }
1362
-
1363
- void FuncWithAssert(int* n) {
1364
- ASSERT_DEATH_IF_SUPPORTED(return;, "");
1365
- (*n)++;
1366
- }
1367
-
1368
- // Tests that ASSERT_DEATH_IF_SUPPORTED does not return from the current
1369
- // function (as ASSERT_DEATH does) if death tests are not supported.
1370
- TEST(ConditionalDeathMacrosTest, AssertDeatDoesNotReturnhIfUnsupported) {
1371
- int n = 0;
1372
- FuncWithAssert(&n);
1373
- EXPECT_EQ(1, n);
1374
- }
1375
-
1376
- #endif // !GTEST_HAS_DEATH_TEST
1377
-
1378
- // Tests that the death test macros expand to code which may or may not
1379
- // be followed by operator<<, and that in either case the complete text
1380
- // comprises only a single C++ statement.
1381
- //
1382
- // The syntax should work whether death tests are available or not.
1383
- TEST(ConditionalDeathMacrosSyntaxDeathTest, SingleStatement) {
1384
- if (AlwaysFalse())
1385
- // This would fail if executed; this is a compilation test only
1386
- ASSERT_DEATH_IF_SUPPORTED(return, "");
1387
-
1388
- if (AlwaysTrue())
1389
- EXPECT_DEATH_IF_SUPPORTED(_exit(1), "");
1390
- else
1391
- // This empty "else" branch is meant to ensure that EXPECT_DEATH
1392
- // doesn't expand into an "if" statement without an "else"
1393
- ; // NOLINT
1394
-
1395
- if (AlwaysFalse())
1396
- ASSERT_DEATH_IF_SUPPORTED(return, "") << "did not die";
1397
-
1398
- if (AlwaysFalse())
1399
- ; // NOLINT
1400
- else
1401
- EXPECT_DEATH_IF_SUPPORTED(_exit(1), "") << 1 << 2 << 3;
1402
- }
1403
-
1404
- // Tests that conditional death test macros expand to code which interacts
1405
- // well with switch statements.
1406
- TEST(ConditionalDeathMacrosSyntaxDeathTest, SwitchStatement) {
1407
- // Microsoft compiler usually complains about switch statements without
1408
- // case labels. We suppress that warning for this test.
1409
- GTEST_DISABLE_MSC_WARNINGS_PUSH_(4065)
1410
-
1411
- switch (0)
1412
- default:
1413
- ASSERT_DEATH_IF_SUPPORTED(_exit(1), "")
1414
- << "exit in default switch handler";
1415
-
1416
- switch (0)
1417
- case 0:
1418
- EXPECT_DEATH_IF_SUPPORTED(_exit(1), "") << "exit in switch case";
1419
-
1420
- GTEST_DISABLE_MSC_WARNINGS_POP_()
1421
- }
1422
-
1423
- // Tests that a test case whose name ends with "DeathTest" works fine
1424
- // on Windows.
1425
- TEST(NotADeathTest, Test) {
1426
- SUCCEED();
1427
- }