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,2427 +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
- // This file is AUTOMATICALLY GENERATED on 10/31/2011 by command
31
- // 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND!
32
-
33
- // Regression test for gtest_pred_impl.h
34
- //
35
- // This file is generated by a script and quite long. If you intend to
36
- // learn how Google Test works by reading its unit tests, read
37
- // gtest_unittest.cc instead.
38
- //
39
- // This is intended as a regression test for the Google Test predicate
40
- // assertions. We compile it as part of the gtest_unittest target
41
- // only to keep the implementation tidy and compact, as it is quite
42
- // involved to set up the stage for testing Google Test using Google
43
- // Test itself.
44
- //
45
- // Currently, gtest_unittest takes ~11 seconds to run in the testing
46
- // daemon. In the future, if it grows too large and needs much more
47
- // time to finish, we should consider separating this file into a
48
- // stand-alone regression test.
49
-
50
- #include <iostream>
51
-
52
- #include "gtest/gtest.h"
53
- #include "gtest/gtest-spi.h"
54
-
55
- // A user-defined data type.
56
- struct Bool {
57
- explicit Bool(int val) : value(val != 0) {}
58
-
59
- bool operator>(int n) const { return value > Bool(n).value; }
60
-
61
- Bool operator+(const Bool& rhs) const { return Bool(value + rhs.value); }
62
-
63
- bool operator==(const Bool& rhs) const { return value == rhs.value; }
64
-
65
- bool value;
66
- };
67
-
68
- // Enables Bool to be used in assertions.
69
- std::ostream& operator<<(std::ostream& os, const Bool& x) {
70
- return os << (x.value ? "true" : "false");
71
- }
72
-
73
- // Sample functions/functors for testing unary predicate assertions.
74
-
75
- // A unary predicate function.
76
- template <typename T1>
77
- bool PredFunction1(T1 v1) {
78
- return v1 > 0;
79
- }
80
-
81
- // The following two functions are needed to circumvent a bug in
82
- // gcc 2.95.3, which sometimes has problem with the above template
83
- // function.
84
- bool PredFunction1Int(int v1) {
85
- return v1 > 0;
86
- }
87
- bool PredFunction1Bool(Bool v1) {
88
- return v1 > 0;
89
- }
90
-
91
- // A unary predicate functor.
92
- struct PredFunctor1 {
93
- template <typename T1>
94
- bool operator()(const T1& v1) {
95
- return v1 > 0;
96
- }
97
- };
98
-
99
- // A unary predicate-formatter function.
100
- template <typename T1>
101
- testing::AssertionResult PredFormatFunction1(const char* e1,
102
- const T1& v1) {
103
- if (PredFunction1(v1))
104
- return testing::AssertionSuccess();
105
-
106
- return testing::AssertionFailure()
107
- << e1
108
- << " is expected to be positive, but evaluates to "
109
- << v1 << ".";
110
- }
111
-
112
- // A unary predicate-formatter functor.
113
- struct PredFormatFunctor1 {
114
- template <typename T1>
115
- testing::AssertionResult operator()(const char* e1,
116
- const T1& v1) const {
117
- return PredFormatFunction1(e1, v1);
118
- }
119
- };
120
-
121
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT1.
122
-
123
- class Predicate1Test : public testing::Test {
124
- protected:
125
- virtual void SetUp() {
126
- expected_to_finish_ = true;
127
- finished_ = false;
128
- n1_ = 0;
129
- }
130
-
131
- virtual void TearDown() {
132
- // Verifies that each of the predicate's arguments was evaluated
133
- // exactly once.
134
- EXPECT_EQ(1, n1_) <<
135
- "The predicate assertion didn't evaluate argument 2 "
136
- "exactly once.";
137
-
138
- // Verifies that the control flow in the test function is expected.
139
- if (expected_to_finish_ && !finished_) {
140
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
141
- } else if (!expected_to_finish_ && finished_) {
142
- FAIL() << "The failed predicate assertion didn't abort the test "
143
- "as expected.";
144
- }
145
- }
146
-
147
- // true iff the test function is expected to run to finish.
148
- static bool expected_to_finish_;
149
-
150
- // true iff the test function did run to finish.
151
- static bool finished_;
152
-
153
- static int n1_;
154
- };
155
-
156
- bool Predicate1Test::expected_to_finish_;
157
- bool Predicate1Test::finished_;
158
- int Predicate1Test::n1_;
159
-
160
- typedef Predicate1Test EXPECT_PRED_FORMAT1Test;
161
- typedef Predicate1Test ASSERT_PRED_FORMAT1Test;
162
- typedef Predicate1Test EXPECT_PRED1Test;
163
- typedef Predicate1Test ASSERT_PRED1Test;
164
-
165
- // Tests a successful EXPECT_PRED1 where the
166
- // predicate-formatter is a function on a built-in type (int).
167
- TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeSuccess) {
168
- EXPECT_PRED1(PredFunction1Int,
169
- ++n1_);
170
- finished_ = true;
171
- }
172
-
173
- // Tests a successful EXPECT_PRED1 where the
174
- // predicate-formatter is a function on a user-defined type (Bool).
175
- TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeSuccess) {
176
- EXPECT_PRED1(PredFunction1Bool,
177
- Bool(++n1_));
178
- finished_ = true;
179
- }
180
-
181
- // Tests a successful EXPECT_PRED1 where the
182
- // predicate-formatter is a functor on a built-in type (int).
183
- TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeSuccess) {
184
- EXPECT_PRED1(PredFunctor1(),
185
- ++n1_);
186
- finished_ = true;
187
- }
188
-
189
- // Tests a successful EXPECT_PRED1 where the
190
- // predicate-formatter is a functor on a user-defined type (Bool).
191
- TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeSuccess) {
192
- EXPECT_PRED1(PredFunctor1(),
193
- Bool(++n1_));
194
- finished_ = true;
195
- }
196
-
197
- // Tests a failed EXPECT_PRED1 where the
198
- // predicate-formatter is a function on a built-in type (int).
199
- TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeFailure) {
200
- EXPECT_NONFATAL_FAILURE({ // NOLINT
201
- EXPECT_PRED1(PredFunction1Int,
202
- n1_++);
203
- finished_ = true;
204
- }, "");
205
- }
206
-
207
- // Tests a failed EXPECT_PRED1 where the
208
- // predicate-formatter is a function on a user-defined type (Bool).
209
- TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeFailure) {
210
- EXPECT_NONFATAL_FAILURE({ // NOLINT
211
- EXPECT_PRED1(PredFunction1Bool,
212
- Bool(n1_++));
213
- finished_ = true;
214
- }, "");
215
- }
216
-
217
- // Tests a failed EXPECT_PRED1 where the
218
- // predicate-formatter is a functor on a built-in type (int).
219
- TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeFailure) {
220
- EXPECT_NONFATAL_FAILURE({ // NOLINT
221
- EXPECT_PRED1(PredFunctor1(),
222
- n1_++);
223
- finished_ = true;
224
- }, "");
225
- }
226
-
227
- // Tests a failed EXPECT_PRED1 where the
228
- // predicate-formatter is a functor on a user-defined type (Bool).
229
- TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeFailure) {
230
- EXPECT_NONFATAL_FAILURE({ // NOLINT
231
- EXPECT_PRED1(PredFunctor1(),
232
- Bool(n1_++));
233
- finished_ = true;
234
- }, "");
235
- }
236
-
237
- // Tests a successful ASSERT_PRED1 where the
238
- // predicate-formatter is a function on a built-in type (int).
239
- TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeSuccess) {
240
- ASSERT_PRED1(PredFunction1Int,
241
- ++n1_);
242
- finished_ = true;
243
- }
244
-
245
- // Tests a successful ASSERT_PRED1 where the
246
- // predicate-formatter is a function on a user-defined type (Bool).
247
- TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeSuccess) {
248
- ASSERT_PRED1(PredFunction1Bool,
249
- Bool(++n1_));
250
- finished_ = true;
251
- }
252
-
253
- // Tests a successful ASSERT_PRED1 where the
254
- // predicate-formatter is a functor on a built-in type (int).
255
- TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeSuccess) {
256
- ASSERT_PRED1(PredFunctor1(),
257
- ++n1_);
258
- finished_ = true;
259
- }
260
-
261
- // Tests a successful ASSERT_PRED1 where the
262
- // predicate-formatter is a functor on a user-defined type (Bool).
263
- TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeSuccess) {
264
- ASSERT_PRED1(PredFunctor1(),
265
- Bool(++n1_));
266
- finished_ = true;
267
- }
268
-
269
- // Tests a failed ASSERT_PRED1 where the
270
- // predicate-formatter is a function on a built-in type (int).
271
- TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeFailure) {
272
- expected_to_finish_ = false;
273
- EXPECT_FATAL_FAILURE({ // NOLINT
274
- ASSERT_PRED1(PredFunction1Int,
275
- n1_++);
276
- finished_ = true;
277
- }, "");
278
- }
279
-
280
- // Tests a failed ASSERT_PRED1 where the
281
- // predicate-formatter is a function on a user-defined type (Bool).
282
- TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeFailure) {
283
- expected_to_finish_ = false;
284
- EXPECT_FATAL_FAILURE({ // NOLINT
285
- ASSERT_PRED1(PredFunction1Bool,
286
- Bool(n1_++));
287
- finished_ = true;
288
- }, "");
289
- }
290
-
291
- // Tests a failed ASSERT_PRED1 where the
292
- // predicate-formatter is a functor on a built-in type (int).
293
- TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeFailure) {
294
- expected_to_finish_ = false;
295
- EXPECT_FATAL_FAILURE({ // NOLINT
296
- ASSERT_PRED1(PredFunctor1(),
297
- n1_++);
298
- finished_ = true;
299
- }, "");
300
- }
301
-
302
- // Tests a failed ASSERT_PRED1 where the
303
- // predicate-formatter is a functor on a user-defined type (Bool).
304
- TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeFailure) {
305
- expected_to_finish_ = false;
306
- EXPECT_FATAL_FAILURE({ // NOLINT
307
- ASSERT_PRED1(PredFunctor1(),
308
- Bool(n1_++));
309
- finished_ = true;
310
- }, "");
311
- }
312
-
313
- // Tests a successful EXPECT_PRED_FORMAT1 where the
314
- // predicate-formatter is a function on a built-in type (int).
315
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) {
316
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
317
- ++n1_);
318
- finished_ = true;
319
- }
320
-
321
- // Tests a successful EXPECT_PRED_FORMAT1 where the
322
- // predicate-formatter is a function on a user-defined type (Bool).
323
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) {
324
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
325
- Bool(++n1_));
326
- finished_ = true;
327
- }
328
-
329
- // Tests a successful EXPECT_PRED_FORMAT1 where the
330
- // predicate-formatter is a functor on a built-in type (int).
331
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) {
332
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
333
- ++n1_);
334
- finished_ = true;
335
- }
336
-
337
- // Tests a successful EXPECT_PRED_FORMAT1 where the
338
- // predicate-formatter is a functor on a user-defined type (Bool).
339
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) {
340
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
341
- Bool(++n1_));
342
- finished_ = true;
343
- }
344
-
345
- // Tests a failed EXPECT_PRED_FORMAT1 where the
346
- // predicate-formatter is a function on a built-in type (int).
347
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) {
348
- EXPECT_NONFATAL_FAILURE({ // NOLINT
349
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
350
- n1_++);
351
- finished_ = true;
352
- }, "");
353
- }
354
-
355
- // Tests a failed EXPECT_PRED_FORMAT1 where the
356
- // predicate-formatter is a function on a user-defined type (Bool).
357
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) {
358
- EXPECT_NONFATAL_FAILURE({ // NOLINT
359
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
360
- Bool(n1_++));
361
- finished_ = true;
362
- }, "");
363
- }
364
-
365
- // Tests a failed EXPECT_PRED_FORMAT1 where the
366
- // predicate-formatter is a functor on a built-in type (int).
367
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) {
368
- EXPECT_NONFATAL_FAILURE({ // NOLINT
369
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
370
- n1_++);
371
- finished_ = true;
372
- }, "");
373
- }
374
-
375
- // Tests a failed EXPECT_PRED_FORMAT1 where the
376
- // predicate-formatter is a functor on a user-defined type (Bool).
377
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) {
378
- EXPECT_NONFATAL_FAILURE({ // NOLINT
379
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
380
- Bool(n1_++));
381
- finished_ = true;
382
- }, "");
383
- }
384
-
385
- // Tests a successful ASSERT_PRED_FORMAT1 where the
386
- // predicate-formatter is a function on a built-in type (int).
387
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) {
388
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
389
- ++n1_);
390
- finished_ = true;
391
- }
392
-
393
- // Tests a successful ASSERT_PRED_FORMAT1 where the
394
- // predicate-formatter is a function on a user-defined type (Bool).
395
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) {
396
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
397
- Bool(++n1_));
398
- finished_ = true;
399
- }
400
-
401
- // Tests a successful ASSERT_PRED_FORMAT1 where the
402
- // predicate-formatter is a functor on a built-in type (int).
403
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) {
404
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
405
- ++n1_);
406
- finished_ = true;
407
- }
408
-
409
- // Tests a successful ASSERT_PRED_FORMAT1 where the
410
- // predicate-formatter is a functor on a user-defined type (Bool).
411
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) {
412
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
413
- Bool(++n1_));
414
- finished_ = true;
415
- }
416
-
417
- // Tests a failed ASSERT_PRED_FORMAT1 where the
418
- // predicate-formatter is a function on a built-in type (int).
419
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) {
420
- expected_to_finish_ = false;
421
- EXPECT_FATAL_FAILURE({ // NOLINT
422
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
423
- n1_++);
424
- finished_ = true;
425
- }, "");
426
- }
427
-
428
- // Tests a failed ASSERT_PRED_FORMAT1 where the
429
- // predicate-formatter is a function on a user-defined type (Bool).
430
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) {
431
- expected_to_finish_ = false;
432
- EXPECT_FATAL_FAILURE({ // NOLINT
433
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
434
- Bool(n1_++));
435
- finished_ = true;
436
- }, "");
437
- }
438
-
439
- // Tests a failed ASSERT_PRED_FORMAT1 where the
440
- // predicate-formatter is a functor on a built-in type (int).
441
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) {
442
- expected_to_finish_ = false;
443
- EXPECT_FATAL_FAILURE({ // NOLINT
444
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
445
- n1_++);
446
- finished_ = true;
447
- }, "");
448
- }
449
-
450
- // Tests a failed ASSERT_PRED_FORMAT1 where the
451
- // predicate-formatter is a functor on a user-defined type (Bool).
452
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) {
453
- expected_to_finish_ = false;
454
- EXPECT_FATAL_FAILURE({ // NOLINT
455
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
456
- Bool(n1_++));
457
- finished_ = true;
458
- }, "");
459
- }
460
- // Sample functions/functors for testing binary predicate assertions.
461
-
462
- // A binary predicate function.
463
- template <typename T1, typename T2>
464
- bool PredFunction2(T1 v1, T2 v2) {
465
- return v1 + v2 > 0;
466
- }
467
-
468
- // The following two functions are needed to circumvent a bug in
469
- // gcc 2.95.3, which sometimes has problem with the above template
470
- // function.
471
- bool PredFunction2Int(int v1, int v2) {
472
- return v1 + v2 > 0;
473
- }
474
- bool PredFunction2Bool(Bool v1, Bool v2) {
475
- return v1 + v2 > 0;
476
- }
477
-
478
- // A binary predicate functor.
479
- struct PredFunctor2 {
480
- template <typename T1, typename T2>
481
- bool operator()(const T1& v1,
482
- const T2& v2) {
483
- return v1 + v2 > 0;
484
- }
485
- };
486
-
487
- // A binary predicate-formatter function.
488
- template <typename T1, typename T2>
489
- testing::AssertionResult PredFormatFunction2(const char* e1,
490
- const char* e2,
491
- const T1& v1,
492
- const T2& v2) {
493
- if (PredFunction2(v1, v2))
494
- return testing::AssertionSuccess();
495
-
496
- return testing::AssertionFailure()
497
- << e1 << " + " << e2
498
- << " is expected to be positive, but evaluates to "
499
- << v1 + v2 << ".";
500
- }
501
-
502
- // A binary predicate-formatter functor.
503
- struct PredFormatFunctor2 {
504
- template <typename T1, typename T2>
505
- testing::AssertionResult operator()(const char* e1,
506
- const char* e2,
507
- const T1& v1,
508
- const T2& v2) const {
509
- return PredFormatFunction2(e1, e2, v1, v2);
510
- }
511
- };
512
-
513
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT2.
514
-
515
- class Predicate2Test : public testing::Test {
516
- protected:
517
- virtual void SetUp() {
518
- expected_to_finish_ = true;
519
- finished_ = false;
520
- n1_ = n2_ = 0;
521
- }
522
-
523
- virtual void TearDown() {
524
- // Verifies that each of the predicate's arguments was evaluated
525
- // exactly once.
526
- EXPECT_EQ(1, n1_) <<
527
- "The predicate assertion didn't evaluate argument 2 "
528
- "exactly once.";
529
- EXPECT_EQ(1, n2_) <<
530
- "The predicate assertion didn't evaluate argument 3 "
531
- "exactly once.";
532
-
533
- // Verifies that the control flow in the test function is expected.
534
- if (expected_to_finish_ && !finished_) {
535
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
536
- } else if (!expected_to_finish_ && finished_) {
537
- FAIL() << "The failed predicate assertion didn't abort the test "
538
- "as expected.";
539
- }
540
- }
541
-
542
- // true iff the test function is expected to run to finish.
543
- static bool expected_to_finish_;
544
-
545
- // true iff the test function did run to finish.
546
- static bool finished_;
547
-
548
- static int n1_;
549
- static int n2_;
550
- };
551
-
552
- bool Predicate2Test::expected_to_finish_;
553
- bool Predicate2Test::finished_;
554
- int Predicate2Test::n1_;
555
- int Predicate2Test::n2_;
556
-
557
- typedef Predicate2Test EXPECT_PRED_FORMAT2Test;
558
- typedef Predicate2Test ASSERT_PRED_FORMAT2Test;
559
- typedef Predicate2Test EXPECT_PRED2Test;
560
- typedef Predicate2Test ASSERT_PRED2Test;
561
-
562
- // Tests a successful EXPECT_PRED2 where the
563
- // predicate-formatter is a function on a built-in type (int).
564
- TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeSuccess) {
565
- EXPECT_PRED2(PredFunction2Int,
566
- ++n1_,
567
- ++n2_);
568
- finished_ = true;
569
- }
570
-
571
- // Tests a successful EXPECT_PRED2 where the
572
- // predicate-formatter is a function on a user-defined type (Bool).
573
- TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeSuccess) {
574
- EXPECT_PRED2(PredFunction2Bool,
575
- Bool(++n1_),
576
- Bool(++n2_));
577
- finished_ = true;
578
- }
579
-
580
- // Tests a successful EXPECT_PRED2 where the
581
- // predicate-formatter is a functor on a built-in type (int).
582
- TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeSuccess) {
583
- EXPECT_PRED2(PredFunctor2(),
584
- ++n1_,
585
- ++n2_);
586
- finished_ = true;
587
- }
588
-
589
- // Tests a successful EXPECT_PRED2 where the
590
- // predicate-formatter is a functor on a user-defined type (Bool).
591
- TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeSuccess) {
592
- EXPECT_PRED2(PredFunctor2(),
593
- Bool(++n1_),
594
- Bool(++n2_));
595
- finished_ = true;
596
- }
597
-
598
- // Tests a failed EXPECT_PRED2 where the
599
- // predicate-formatter is a function on a built-in type (int).
600
- TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeFailure) {
601
- EXPECT_NONFATAL_FAILURE({ // NOLINT
602
- EXPECT_PRED2(PredFunction2Int,
603
- n1_++,
604
- n2_++);
605
- finished_ = true;
606
- }, "");
607
- }
608
-
609
- // Tests a failed EXPECT_PRED2 where the
610
- // predicate-formatter is a function on a user-defined type (Bool).
611
- TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeFailure) {
612
- EXPECT_NONFATAL_FAILURE({ // NOLINT
613
- EXPECT_PRED2(PredFunction2Bool,
614
- Bool(n1_++),
615
- Bool(n2_++));
616
- finished_ = true;
617
- }, "");
618
- }
619
-
620
- // Tests a failed EXPECT_PRED2 where the
621
- // predicate-formatter is a functor on a built-in type (int).
622
- TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeFailure) {
623
- EXPECT_NONFATAL_FAILURE({ // NOLINT
624
- EXPECT_PRED2(PredFunctor2(),
625
- n1_++,
626
- n2_++);
627
- finished_ = true;
628
- }, "");
629
- }
630
-
631
- // Tests a failed EXPECT_PRED2 where the
632
- // predicate-formatter is a functor on a user-defined type (Bool).
633
- TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeFailure) {
634
- EXPECT_NONFATAL_FAILURE({ // NOLINT
635
- EXPECT_PRED2(PredFunctor2(),
636
- Bool(n1_++),
637
- Bool(n2_++));
638
- finished_ = true;
639
- }, "");
640
- }
641
-
642
- // Tests a successful ASSERT_PRED2 where the
643
- // predicate-formatter is a function on a built-in type (int).
644
- TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeSuccess) {
645
- ASSERT_PRED2(PredFunction2Int,
646
- ++n1_,
647
- ++n2_);
648
- finished_ = true;
649
- }
650
-
651
- // Tests a successful ASSERT_PRED2 where the
652
- // predicate-formatter is a function on a user-defined type (Bool).
653
- TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeSuccess) {
654
- ASSERT_PRED2(PredFunction2Bool,
655
- Bool(++n1_),
656
- Bool(++n2_));
657
- finished_ = true;
658
- }
659
-
660
- // Tests a successful ASSERT_PRED2 where the
661
- // predicate-formatter is a functor on a built-in type (int).
662
- TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeSuccess) {
663
- ASSERT_PRED2(PredFunctor2(),
664
- ++n1_,
665
- ++n2_);
666
- finished_ = true;
667
- }
668
-
669
- // Tests a successful ASSERT_PRED2 where the
670
- // predicate-formatter is a functor on a user-defined type (Bool).
671
- TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeSuccess) {
672
- ASSERT_PRED2(PredFunctor2(),
673
- Bool(++n1_),
674
- Bool(++n2_));
675
- finished_ = true;
676
- }
677
-
678
- // Tests a failed ASSERT_PRED2 where the
679
- // predicate-formatter is a function on a built-in type (int).
680
- TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeFailure) {
681
- expected_to_finish_ = false;
682
- EXPECT_FATAL_FAILURE({ // NOLINT
683
- ASSERT_PRED2(PredFunction2Int,
684
- n1_++,
685
- n2_++);
686
- finished_ = true;
687
- }, "");
688
- }
689
-
690
- // Tests a failed ASSERT_PRED2 where the
691
- // predicate-formatter is a function on a user-defined type (Bool).
692
- TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeFailure) {
693
- expected_to_finish_ = false;
694
- EXPECT_FATAL_FAILURE({ // NOLINT
695
- ASSERT_PRED2(PredFunction2Bool,
696
- Bool(n1_++),
697
- Bool(n2_++));
698
- finished_ = true;
699
- }, "");
700
- }
701
-
702
- // Tests a failed ASSERT_PRED2 where the
703
- // predicate-formatter is a functor on a built-in type (int).
704
- TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeFailure) {
705
- expected_to_finish_ = false;
706
- EXPECT_FATAL_FAILURE({ // NOLINT
707
- ASSERT_PRED2(PredFunctor2(),
708
- n1_++,
709
- n2_++);
710
- finished_ = true;
711
- }, "");
712
- }
713
-
714
- // Tests a failed ASSERT_PRED2 where the
715
- // predicate-formatter is a functor on a user-defined type (Bool).
716
- TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeFailure) {
717
- expected_to_finish_ = false;
718
- EXPECT_FATAL_FAILURE({ // NOLINT
719
- ASSERT_PRED2(PredFunctor2(),
720
- Bool(n1_++),
721
- Bool(n2_++));
722
- finished_ = true;
723
- }, "");
724
- }
725
-
726
- // Tests a successful EXPECT_PRED_FORMAT2 where the
727
- // predicate-formatter is a function on a built-in type (int).
728
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) {
729
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
730
- ++n1_,
731
- ++n2_);
732
- finished_ = true;
733
- }
734
-
735
- // Tests a successful EXPECT_PRED_FORMAT2 where the
736
- // predicate-formatter is a function on a user-defined type (Bool).
737
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) {
738
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
739
- Bool(++n1_),
740
- Bool(++n2_));
741
- finished_ = true;
742
- }
743
-
744
- // Tests a successful EXPECT_PRED_FORMAT2 where the
745
- // predicate-formatter is a functor on a built-in type (int).
746
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) {
747
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
748
- ++n1_,
749
- ++n2_);
750
- finished_ = true;
751
- }
752
-
753
- // Tests a successful EXPECT_PRED_FORMAT2 where the
754
- // predicate-formatter is a functor on a user-defined type (Bool).
755
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) {
756
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
757
- Bool(++n1_),
758
- Bool(++n2_));
759
- finished_ = true;
760
- }
761
-
762
- // Tests a failed EXPECT_PRED_FORMAT2 where the
763
- // predicate-formatter is a function on a built-in type (int).
764
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) {
765
- EXPECT_NONFATAL_FAILURE({ // NOLINT
766
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
767
- n1_++,
768
- n2_++);
769
- finished_ = true;
770
- }, "");
771
- }
772
-
773
- // Tests a failed EXPECT_PRED_FORMAT2 where the
774
- // predicate-formatter is a function on a user-defined type (Bool).
775
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) {
776
- EXPECT_NONFATAL_FAILURE({ // NOLINT
777
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
778
- Bool(n1_++),
779
- Bool(n2_++));
780
- finished_ = true;
781
- }, "");
782
- }
783
-
784
- // Tests a failed EXPECT_PRED_FORMAT2 where the
785
- // predicate-formatter is a functor on a built-in type (int).
786
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) {
787
- EXPECT_NONFATAL_FAILURE({ // NOLINT
788
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
789
- n1_++,
790
- n2_++);
791
- finished_ = true;
792
- }, "");
793
- }
794
-
795
- // Tests a failed EXPECT_PRED_FORMAT2 where the
796
- // predicate-formatter is a functor on a user-defined type (Bool).
797
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) {
798
- EXPECT_NONFATAL_FAILURE({ // NOLINT
799
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
800
- Bool(n1_++),
801
- Bool(n2_++));
802
- finished_ = true;
803
- }, "");
804
- }
805
-
806
- // Tests a successful ASSERT_PRED_FORMAT2 where the
807
- // predicate-formatter is a function on a built-in type (int).
808
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) {
809
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
810
- ++n1_,
811
- ++n2_);
812
- finished_ = true;
813
- }
814
-
815
- // Tests a successful ASSERT_PRED_FORMAT2 where the
816
- // predicate-formatter is a function on a user-defined type (Bool).
817
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) {
818
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
819
- Bool(++n1_),
820
- Bool(++n2_));
821
- finished_ = true;
822
- }
823
-
824
- // Tests a successful ASSERT_PRED_FORMAT2 where the
825
- // predicate-formatter is a functor on a built-in type (int).
826
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) {
827
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
828
- ++n1_,
829
- ++n2_);
830
- finished_ = true;
831
- }
832
-
833
- // Tests a successful ASSERT_PRED_FORMAT2 where the
834
- // predicate-formatter is a functor on a user-defined type (Bool).
835
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) {
836
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
837
- Bool(++n1_),
838
- Bool(++n2_));
839
- finished_ = true;
840
- }
841
-
842
- // Tests a failed ASSERT_PRED_FORMAT2 where the
843
- // predicate-formatter is a function on a built-in type (int).
844
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) {
845
- expected_to_finish_ = false;
846
- EXPECT_FATAL_FAILURE({ // NOLINT
847
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
848
- n1_++,
849
- n2_++);
850
- finished_ = true;
851
- }, "");
852
- }
853
-
854
- // Tests a failed ASSERT_PRED_FORMAT2 where the
855
- // predicate-formatter is a function on a user-defined type (Bool).
856
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) {
857
- expected_to_finish_ = false;
858
- EXPECT_FATAL_FAILURE({ // NOLINT
859
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
860
- Bool(n1_++),
861
- Bool(n2_++));
862
- finished_ = true;
863
- }, "");
864
- }
865
-
866
- // Tests a failed ASSERT_PRED_FORMAT2 where the
867
- // predicate-formatter is a functor on a built-in type (int).
868
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) {
869
- expected_to_finish_ = false;
870
- EXPECT_FATAL_FAILURE({ // NOLINT
871
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
872
- n1_++,
873
- n2_++);
874
- finished_ = true;
875
- }, "");
876
- }
877
-
878
- // Tests a failed ASSERT_PRED_FORMAT2 where the
879
- // predicate-formatter is a functor on a user-defined type (Bool).
880
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) {
881
- expected_to_finish_ = false;
882
- EXPECT_FATAL_FAILURE({ // NOLINT
883
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
884
- Bool(n1_++),
885
- Bool(n2_++));
886
- finished_ = true;
887
- }, "");
888
- }
889
- // Sample functions/functors for testing ternary predicate assertions.
890
-
891
- // A ternary predicate function.
892
- template <typename T1, typename T2, typename T3>
893
- bool PredFunction3(T1 v1, T2 v2, T3 v3) {
894
- return v1 + v2 + v3 > 0;
895
- }
896
-
897
- // The following two functions are needed to circumvent a bug in
898
- // gcc 2.95.3, which sometimes has problem with the above template
899
- // function.
900
- bool PredFunction3Int(int v1, int v2, int v3) {
901
- return v1 + v2 + v3 > 0;
902
- }
903
- bool PredFunction3Bool(Bool v1, Bool v2, Bool v3) {
904
- return v1 + v2 + v3 > 0;
905
- }
906
-
907
- // A ternary predicate functor.
908
- struct PredFunctor3 {
909
- template <typename T1, typename T2, typename T3>
910
- bool operator()(const T1& v1,
911
- const T2& v2,
912
- const T3& v3) {
913
- return v1 + v2 + v3 > 0;
914
- }
915
- };
916
-
917
- // A ternary predicate-formatter function.
918
- template <typename T1, typename T2, typename T3>
919
- testing::AssertionResult PredFormatFunction3(const char* e1,
920
- const char* e2,
921
- const char* e3,
922
- const T1& v1,
923
- const T2& v2,
924
- const T3& v3) {
925
- if (PredFunction3(v1, v2, v3))
926
- return testing::AssertionSuccess();
927
-
928
- return testing::AssertionFailure()
929
- << e1 << " + " << e2 << " + " << e3
930
- << " is expected to be positive, but evaluates to "
931
- << v1 + v2 + v3 << ".";
932
- }
933
-
934
- // A ternary predicate-formatter functor.
935
- struct PredFormatFunctor3 {
936
- template <typename T1, typename T2, typename T3>
937
- testing::AssertionResult operator()(const char* e1,
938
- const char* e2,
939
- const char* e3,
940
- const T1& v1,
941
- const T2& v2,
942
- const T3& v3) const {
943
- return PredFormatFunction3(e1, e2, e3, v1, v2, v3);
944
- }
945
- };
946
-
947
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT3.
948
-
949
- class Predicate3Test : public testing::Test {
950
- protected:
951
- virtual void SetUp() {
952
- expected_to_finish_ = true;
953
- finished_ = false;
954
- n1_ = n2_ = n3_ = 0;
955
- }
956
-
957
- virtual void TearDown() {
958
- // Verifies that each of the predicate's arguments was evaluated
959
- // exactly once.
960
- EXPECT_EQ(1, n1_) <<
961
- "The predicate assertion didn't evaluate argument 2 "
962
- "exactly once.";
963
- EXPECT_EQ(1, n2_) <<
964
- "The predicate assertion didn't evaluate argument 3 "
965
- "exactly once.";
966
- EXPECT_EQ(1, n3_) <<
967
- "The predicate assertion didn't evaluate argument 4 "
968
- "exactly once.";
969
-
970
- // Verifies that the control flow in the test function is expected.
971
- if (expected_to_finish_ && !finished_) {
972
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
973
- } else if (!expected_to_finish_ && finished_) {
974
- FAIL() << "The failed predicate assertion didn't abort the test "
975
- "as expected.";
976
- }
977
- }
978
-
979
- // true iff the test function is expected to run to finish.
980
- static bool expected_to_finish_;
981
-
982
- // true iff the test function did run to finish.
983
- static bool finished_;
984
-
985
- static int n1_;
986
- static int n2_;
987
- static int n3_;
988
- };
989
-
990
- bool Predicate3Test::expected_to_finish_;
991
- bool Predicate3Test::finished_;
992
- int Predicate3Test::n1_;
993
- int Predicate3Test::n2_;
994
- int Predicate3Test::n3_;
995
-
996
- typedef Predicate3Test EXPECT_PRED_FORMAT3Test;
997
- typedef Predicate3Test ASSERT_PRED_FORMAT3Test;
998
- typedef Predicate3Test EXPECT_PRED3Test;
999
- typedef Predicate3Test ASSERT_PRED3Test;
1000
-
1001
- // Tests a successful EXPECT_PRED3 where the
1002
- // predicate-formatter is a function on a built-in type (int).
1003
- TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeSuccess) {
1004
- EXPECT_PRED3(PredFunction3Int,
1005
- ++n1_,
1006
- ++n2_,
1007
- ++n3_);
1008
- finished_ = true;
1009
- }
1010
-
1011
- // Tests a successful EXPECT_PRED3 where the
1012
- // predicate-formatter is a function on a user-defined type (Bool).
1013
- TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeSuccess) {
1014
- EXPECT_PRED3(PredFunction3Bool,
1015
- Bool(++n1_),
1016
- Bool(++n2_),
1017
- Bool(++n3_));
1018
- finished_ = true;
1019
- }
1020
-
1021
- // Tests a successful EXPECT_PRED3 where the
1022
- // predicate-formatter is a functor on a built-in type (int).
1023
- TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeSuccess) {
1024
- EXPECT_PRED3(PredFunctor3(),
1025
- ++n1_,
1026
- ++n2_,
1027
- ++n3_);
1028
- finished_ = true;
1029
- }
1030
-
1031
- // Tests a successful EXPECT_PRED3 where the
1032
- // predicate-formatter is a functor on a user-defined type (Bool).
1033
- TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeSuccess) {
1034
- EXPECT_PRED3(PredFunctor3(),
1035
- Bool(++n1_),
1036
- Bool(++n2_),
1037
- Bool(++n3_));
1038
- finished_ = true;
1039
- }
1040
-
1041
- // Tests a failed EXPECT_PRED3 where the
1042
- // predicate-formatter is a function on a built-in type (int).
1043
- TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeFailure) {
1044
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1045
- EXPECT_PRED3(PredFunction3Int,
1046
- n1_++,
1047
- n2_++,
1048
- n3_++);
1049
- finished_ = true;
1050
- }, "");
1051
- }
1052
-
1053
- // Tests a failed EXPECT_PRED3 where the
1054
- // predicate-formatter is a function on a user-defined type (Bool).
1055
- TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeFailure) {
1056
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1057
- EXPECT_PRED3(PredFunction3Bool,
1058
- Bool(n1_++),
1059
- Bool(n2_++),
1060
- Bool(n3_++));
1061
- finished_ = true;
1062
- }, "");
1063
- }
1064
-
1065
- // Tests a failed EXPECT_PRED3 where the
1066
- // predicate-formatter is a functor on a built-in type (int).
1067
- TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeFailure) {
1068
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1069
- EXPECT_PRED3(PredFunctor3(),
1070
- n1_++,
1071
- n2_++,
1072
- n3_++);
1073
- finished_ = true;
1074
- }, "");
1075
- }
1076
-
1077
- // Tests a failed EXPECT_PRED3 where the
1078
- // predicate-formatter is a functor on a user-defined type (Bool).
1079
- TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeFailure) {
1080
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1081
- EXPECT_PRED3(PredFunctor3(),
1082
- Bool(n1_++),
1083
- Bool(n2_++),
1084
- Bool(n3_++));
1085
- finished_ = true;
1086
- }, "");
1087
- }
1088
-
1089
- // Tests a successful ASSERT_PRED3 where the
1090
- // predicate-formatter is a function on a built-in type (int).
1091
- TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeSuccess) {
1092
- ASSERT_PRED3(PredFunction3Int,
1093
- ++n1_,
1094
- ++n2_,
1095
- ++n3_);
1096
- finished_ = true;
1097
- }
1098
-
1099
- // Tests a successful ASSERT_PRED3 where the
1100
- // predicate-formatter is a function on a user-defined type (Bool).
1101
- TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeSuccess) {
1102
- ASSERT_PRED3(PredFunction3Bool,
1103
- Bool(++n1_),
1104
- Bool(++n2_),
1105
- Bool(++n3_));
1106
- finished_ = true;
1107
- }
1108
-
1109
- // Tests a successful ASSERT_PRED3 where the
1110
- // predicate-formatter is a functor on a built-in type (int).
1111
- TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeSuccess) {
1112
- ASSERT_PRED3(PredFunctor3(),
1113
- ++n1_,
1114
- ++n2_,
1115
- ++n3_);
1116
- finished_ = true;
1117
- }
1118
-
1119
- // Tests a successful ASSERT_PRED3 where the
1120
- // predicate-formatter is a functor on a user-defined type (Bool).
1121
- TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeSuccess) {
1122
- ASSERT_PRED3(PredFunctor3(),
1123
- Bool(++n1_),
1124
- Bool(++n2_),
1125
- Bool(++n3_));
1126
- finished_ = true;
1127
- }
1128
-
1129
- // Tests a failed ASSERT_PRED3 where the
1130
- // predicate-formatter is a function on a built-in type (int).
1131
- TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeFailure) {
1132
- expected_to_finish_ = false;
1133
- EXPECT_FATAL_FAILURE({ // NOLINT
1134
- ASSERT_PRED3(PredFunction3Int,
1135
- n1_++,
1136
- n2_++,
1137
- n3_++);
1138
- finished_ = true;
1139
- }, "");
1140
- }
1141
-
1142
- // Tests a failed ASSERT_PRED3 where the
1143
- // predicate-formatter is a function on a user-defined type (Bool).
1144
- TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeFailure) {
1145
- expected_to_finish_ = false;
1146
- EXPECT_FATAL_FAILURE({ // NOLINT
1147
- ASSERT_PRED3(PredFunction3Bool,
1148
- Bool(n1_++),
1149
- Bool(n2_++),
1150
- Bool(n3_++));
1151
- finished_ = true;
1152
- }, "");
1153
- }
1154
-
1155
- // Tests a failed ASSERT_PRED3 where the
1156
- // predicate-formatter is a functor on a built-in type (int).
1157
- TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeFailure) {
1158
- expected_to_finish_ = false;
1159
- EXPECT_FATAL_FAILURE({ // NOLINT
1160
- ASSERT_PRED3(PredFunctor3(),
1161
- n1_++,
1162
- n2_++,
1163
- n3_++);
1164
- finished_ = true;
1165
- }, "");
1166
- }
1167
-
1168
- // Tests a failed ASSERT_PRED3 where the
1169
- // predicate-formatter is a functor on a user-defined type (Bool).
1170
- TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeFailure) {
1171
- expected_to_finish_ = false;
1172
- EXPECT_FATAL_FAILURE({ // NOLINT
1173
- ASSERT_PRED3(PredFunctor3(),
1174
- Bool(n1_++),
1175
- Bool(n2_++),
1176
- Bool(n3_++));
1177
- finished_ = true;
1178
- }, "");
1179
- }
1180
-
1181
- // Tests a successful EXPECT_PRED_FORMAT3 where the
1182
- // predicate-formatter is a function on a built-in type (int).
1183
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) {
1184
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
1185
- ++n1_,
1186
- ++n2_,
1187
- ++n3_);
1188
- finished_ = true;
1189
- }
1190
-
1191
- // Tests a successful EXPECT_PRED_FORMAT3 where the
1192
- // predicate-formatter is a function on a user-defined type (Bool).
1193
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) {
1194
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
1195
- Bool(++n1_),
1196
- Bool(++n2_),
1197
- Bool(++n3_));
1198
- finished_ = true;
1199
- }
1200
-
1201
- // Tests a successful EXPECT_PRED_FORMAT3 where the
1202
- // predicate-formatter is a functor on a built-in type (int).
1203
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) {
1204
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
1205
- ++n1_,
1206
- ++n2_,
1207
- ++n3_);
1208
- finished_ = true;
1209
- }
1210
-
1211
- // Tests a successful EXPECT_PRED_FORMAT3 where the
1212
- // predicate-formatter is a functor on a user-defined type (Bool).
1213
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) {
1214
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
1215
- Bool(++n1_),
1216
- Bool(++n2_),
1217
- Bool(++n3_));
1218
- finished_ = true;
1219
- }
1220
-
1221
- // Tests a failed EXPECT_PRED_FORMAT3 where the
1222
- // predicate-formatter is a function on a built-in type (int).
1223
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) {
1224
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1225
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
1226
- n1_++,
1227
- n2_++,
1228
- n3_++);
1229
- finished_ = true;
1230
- }, "");
1231
- }
1232
-
1233
- // Tests a failed EXPECT_PRED_FORMAT3 where the
1234
- // predicate-formatter is a function on a user-defined type (Bool).
1235
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) {
1236
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1237
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
1238
- Bool(n1_++),
1239
- Bool(n2_++),
1240
- Bool(n3_++));
1241
- finished_ = true;
1242
- }, "");
1243
- }
1244
-
1245
- // Tests a failed EXPECT_PRED_FORMAT3 where the
1246
- // predicate-formatter is a functor on a built-in type (int).
1247
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) {
1248
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1249
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
1250
- n1_++,
1251
- n2_++,
1252
- n3_++);
1253
- finished_ = true;
1254
- }, "");
1255
- }
1256
-
1257
- // Tests a failed EXPECT_PRED_FORMAT3 where the
1258
- // predicate-formatter is a functor on a user-defined type (Bool).
1259
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) {
1260
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1261
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
1262
- Bool(n1_++),
1263
- Bool(n2_++),
1264
- Bool(n3_++));
1265
- finished_ = true;
1266
- }, "");
1267
- }
1268
-
1269
- // Tests a successful ASSERT_PRED_FORMAT3 where the
1270
- // predicate-formatter is a function on a built-in type (int).
1271
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) {
1272
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
1273
- ++n1_,
1274
- ++n2_,
1275
- ++n3_);
1276
- finished_ = true;
1277
- }
1278
-
1279
- // Tests a successful ASSERT_PRED_FORMAT3 where the
1280
- // predicate-formatter is a function on a user-defined type (Bool).
1281
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) {
1282
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
1283
- Bool(++n1_),
1284
- Bool(++n2_),
1285
- Bool(++n3_));
1286
- finished_ = true;
1287
- }
1288
-
1289
- // Tests a successful ASSERT_PRED_FORMAT3 where the
1290
- // predicate-formatter is a functor on a built-in type (int).
1291
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) {
1292
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
1293
- ++n1_,
1294
- ++n2_,
1295
- ++n3_);
1296
- finished_ = true;
1297
- }
1298
-
1299
- // Tests a successful ASSERT_PRED_FORMAT3 where the
1300
- // predicate-formatter is a functor on a user-defined type (Bool).
1301
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) {
1302
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
1303
- Bool(++n1_),
1304
- Bool(++n2_),
1305
- Bool(++n3_));
1306
- finished_ = true;
1307
- }
1308
-
1309
- // Tests a failed ASSERT_PRED_FORMAT3 where the
1310
- // predicate-formatter is a function on a built-in type (int).
1311
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) {
1312
- expected_to_finish_ = false;
1313
- EXPECT_FATAL_FAILURE({ // NOLINT
1314
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
1315
- n1_++,
1316
- n2_++,
1317
- n3_++);
1318
- finished_ = true;
1319
- }, "");
1320
- }
1321
-
1322
- // Tests a failed ASSERT_PRED_FORMAT3 where the
1323
- // predicate-formatter is a function on a user-defined type (Bool).
1324
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) {
1325
- expected_to_finish_ = false;
1326
- EXPECT_FATAL_FAILURE({ // NOLINT
1327
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
1328
- Bool(n1_++),
1329
- Bool(n2_++),
1330
- Bool(n3_++));
1331
- finished_ = true;
1332
- }, "");
1333
- }
1334
-
1335
- // Tests a failed ASSERT_PRED_FORMAT3 where the
1336
- // predicate-formatter is a functor on a built-in type (int).
1337
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) {
1338
- expected_to_finish_ = false;
1339
- EXPECT_FATAL_FAILURE({ // NOLINT
1340
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
1341
- n1_++,
1342
- n2_++,
1343
- n3_++);
1344
- finished_ = true;
1345
- }, "");
1346
- }
1347
-
1348
- // Tests a failed ASSERT_PRED_FORMAT3 where the
1349
- // predicate-formatter is a functor on a user-defined type (Bool).
1350
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) {
1351
- expected_to_finish_ = false;
1352
- EXPECT_FATAL_FAILURE({ // NOLINT
1353
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
1354
- Bool(n1_++),
1355
- Bool(n2_++),
1356
- Bool(n3_++));
1357
- finished_ = true;
1358
- }, "");
1359
- }
1360
- // Sample functions/functors for testing 4-ary predicate assertions.
1361
-
1362
- // A 4-ary predicate function.
1363
- template <typename T1, typename T2, typename T3, typename T4>
1364
- bool PredFunction4(T1 v1, T2 v2, T3 v3, T4 v4) {
1365
- return v1 + v2 + v3 + v4 > 0;
1366
- }
1367
-
1368
- // The following two functions are needed to circumvent a bug in
1369
- // gcc 2.95.3, which sometimes has problem with the above template
1370
- // function.
1371
- bool PredFunction4Int(int v1, int v2, int v3, int v4) {
1372
- return v1 + v2 + v3 + v4 > 0;
1373
- }
1374
- bool PredFunction4Bool(Bool v1, Bool v2, Bool v3, Bool v4) {
1375
- return v1 + v2 + v3 + v4 > 0;
1376
- }
1377
-
1378
- // A 4-ary predicate functor.
1379
- struct PredFunctor4 {
1380
- template <typename T1, typename T2, typename T3, typename T4>
1381
- bool operator()(const T1& v1,
1382
- const T2& v2,
1383
- const T3& v3,
1384
- const T4& v4) {
1385
- return v1 + v2 + v3 + v4 > 0;
1386
- }
1387
- };
1388
-
1389
- // A 4-ary predicate-formatter function.
1390
- template <typename T1, typename T2, typename T3, typename T4>
1391
- testing::AssertionResult PredFormatFunction4(const char* e1,
1392
- const char* e2,
1393
- const char* e3,
1394
- const char* e4,
1395
- const T1& v1,
1396
- const T2& v2,
1397
- const T3& v3,
1398
- const T4& v4) {
1399
- if (PredFunction4(v1, v2, v3, v4))
1400
- return testing::AssertionSuccess();
1401
-
1402
- return testing::AssertionFailure()
1403
- << e1 << " + " << e2 << " + " << e3 << " + " << e4
1404
- << " is expected to be positive, but evaluates to "
1405
- << v1 + v2 + v3 + v4 << ".";
1406
- }
1407
-
1408
- // A 4-ary predicate-formatter functor.
1409
- struct PredFormatFunctor4 {
1410
- template <typename T1, typename T2, typename T3, typename T4>
1411
- testing::AssertionResult operator()(const char* e1,
1412
- const char* e2,
1413
- const char* e3,
1414
- const char* e4,
1415
- const T1& v1,
1416
- const T2& v2,
1417
- const T3& v3,
1418
- const T4& v4) const {
1419
- return PredFormatFunction4(e1, e2, e3, e4, v1, v2, v3, v4);
1420
- }
1421
- };
1422
-
1423
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT4.
1424
-
1425
- class Predicate4Test : public testing::Test {
1426
- protected:
1427
- virtual void SetUp() {
1428
- expected_to_finish_ = true;
1429
- finished_ = false;
1430
- n1_ = n2_ = n3_ = n4_ = 0;
1431
- }
1432
-
1433
- virtual void TearDown() {
1434
- // Verifies that each of the predicate's arguments was evaluated
1435
- // exactly once.
1436
- EXPECT_EQ(1, n1_) <<
1437
- "The predicate assertion didn't evaluate argument 2 "
1438
- "exactly once.";
1439
- EXPECT_EQ(1, n2_) <<
1440
- "The predicate assertion didn't evaluate argument 3 "
1441
- "exactly once.";
1442
- EXPECT_EQ(1, n3_) <<
1443
- "The predicate assertion didn't evaluate argument 4 "
1444
- "exactly once.";
1445
- EXPECT_EQ(1, n4_) <<
1446
- "The predicate assertion didn't evaluate argument 5 "
1447
- "exactly once.";
1448
-
1449
- // Verifies that the control flow in the test function is expected.
1450
- if (expected_to_finish_ && !finished_) {
1451
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
1452
- } else if (!expected_to_finish_ && finished_) {
1453
- FAIL() << "The failed predicate assertion didn't abort the test "
1454
- "as expected.";
1455
- }
1456
- }
1457
-
1458
- // true iff the test function is expected to run to finish.
1459
- static bool expected_to_finish_;
1460
-
1461
- // true iff the test function did run to finish.
1462
- static bool finished_;
1463
-
1464
- static int n1_;
1465
- static int n2_;
1466
- static int n3_;
1467
- static int n4_;
1468
- };
1469
-
1470
- bool Predicate4Test::expected_to_finish_;
1471
- bool Predicate4Test::finished_;
1472
- int Predicate4Test::n1_;
1473
- int Predicate4Test::n2_;
1474
- int Predicate4Test::n3_;
1475
- int Predicate4Test::n4_;
1476
-
1477
- typedef Predicate4Test EXPECT_PRED_FORMAT4Test;
1478
- typedef Predicate4Test ASSERT_PRED_FORMAT4Test;
1479
- typedef Predicate4Test EXPECT_PRED4Test;
1480
- typedef Predicate4Test ASSERT_PRED4Test;
1481
-
1482
- // Tests a successful EXPECT_PRED4 where the
1483
- // predicate-formatter is a function on a built-in type (int).
1484
- TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeSuccess) {
1485
- EXPECT_PRED4(PredFunction4Int,
1486
- ++n1_,
1487
- ++n2_,
1488
- ++n3_,
1489
- ++n4_);
1490
- finished_ = true;
1491
- }
1492
-
1493
- // Tests a successful EXPECT_PRED4 where the
1494
- // predicate-formatter is a function on a user-defined type (Bool).
1495
- TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeSuccess) {
1496
- EXPECT_PRED4(PredFunction4Bool,
1497
- Bool(++n1_),
1498
- Bool(++n2_),
1499
- Bool(++n3_),
1500
- Bool(++n4_));
1501
- finished_ = true;
1502
- }
1503
-
1504
- // Tests a successful EXPECT_PRED4 where the
1505
- // predicate-formatter is a functor on a built-in type (int).
1506
- TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeSuccess) {
1507
- EXPECT_PRED4(PredFunctor4(),
1508
- ++n1_,
1509
- ++n2_,
1510
- ++n3_,
1511
- ++n4_);
1512
- finished_ = true;
1513
- }
1514
-
1515
- // Tests a successful EXPECT_PRED4 where the
1516
- // predicate-formatter is a functor on a user-defined type (Bool).
1517
- TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeSuccess) {
1518
- EXPECT_PRED4(PredFunctor4(),
1519
- Bool(++n1_),
1520
- Bool(++n2_),
1521
- Bool(++n3_),
1522
- Bool(++n4_));
1523
- finished_ = true;
1524
- }
1525
-
1526
- // Tests a failed EXPECT_PRED4 where the
1527
- // predicate-formatter is a function on a built-in type (int).
1528
- TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeFailure) {
1529
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1530
- EXPECT_PRED4(PredFunction4Int,
1531
- n1_++,
1532
- n2_++,
1533
- n3_++,
1534
- n4_++);
1535
- finished_ = true;
1536
- }, "");
1537
- }
1538
-
1539
- // Tests a failed EXPECT_PRED4 where the
1540
- // predicate-formatter is a function on a user-defined type (Bool).
1541
- TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeFailure) {
1542
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1543
- EXPECT_PRED4(PredFunction4Bool,
1544
- Bool(n1_++),
1545
- Bool(n2_++),
1546
- Bool(n3_++),
1547
- Bool(n4_++));
1548
- finished_ = true;
1549
- }, "");
1550
- }
1551
-
1552
- // Tests a failed EXPECT_PRED4 where the
1553
- // predicate-formatter is a functor on a built-in type (int).
1554
- TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeFailure) {
1555
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1556
- EXPECT_PRED4(PredFunctor4(),
1557
- n1_++,
1558
- n2_++,
1559
- n3_++,
1560
- n4_++);
1561
- finished_ = true;
1562
- }, "");
1563
- }
1564
-
1565
- // Tests a failed EXPECT_PRED4 where the
1566
- // predicate-formatter is a functor on a user-defined type (Bool).
1567
- TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeFailure) {
1568
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1569
- EXPECT_PRED4(PredFunctor4(),
1570
- Bool(n1_++),
1571
- Bool(n2_++),
1572
- Bool(n3_++),
1573
- Bool(n4_++));
1574
- finished_ = true;
1575
- }, "");
1576
- }
1577
-
1578
- // Tests a successful ASSERT_PRED4 where the
1579
- // predicate-formatter is a function on a built-in type (int).
1580
- TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeSuccess) {
1581
- ASSERT_PRED4(PredFunction4Int,
1582
- ++n1_,
1583
- ++n2_,
1584
- ++n3_,
1585
- ++n4_);
1586
- finished_ = true;
1587
- }
1588
-
1589
- // Tests a successful ASSERT_PRED4 where the
1590
- // predicate-formatter is a function on a user-defined type (Bool).
1591
- TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeSuccess) {
1592
- ASSERT_PRED4(PredFunction4Bool,
1593
- Bool(++n1_),
1594
- Bool(++n2_),
1595
- Bool(++n3_),
1596
- Bool(++n4_));
1597
- finished_ = true;
1598
- }
1599
-
1600
- // Tests a successful ASSERT_PRED4 where the
1601
- // predicate-formatter is a functor on a built-in type (int).
1602
- TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeSuccess) {
1603
- ASSERT_PRED4(PredFunctor4(),
1604
- ++n1_,
1605
- ++n2_,
1606
- ++n3_,
1607
- ++n4_);
1608
- finished_ = true;
1609
- }
1610
-
1611
- // Tests a successful ASSERT_PRED4 where the
1612
- // predicate-formatter is a functor on a user-defined type (Bool).
1613
- TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeSuccess) {
1614
- ASSERT_PRED4(PredFunctor4(),
1615
- Bool(++n1_),
1616
- Bool(++n2_),
1617
- Bool(++n3_),
1618
- Bool(++n4_));
1619
- finished_ = true;
1620
- }
1621
-
1622
- // Tests a failed ASSERT_PRED4 where the
1623
- // predicate-formatter is a function on a built-in type (int).
1624
- TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeFailure) {
1625
- expected_to_finish_ = false;
1626
- EXPECT_FATAL_FAILURE({ // NOLINT
1627
- ASSERT_PRED4(PredFunction4Int,
1628
- n1_++,
1629
- n2_++,
1630
- n3_++,
1631
- n4_++);
1632
- finished_ = true;
1633
- }, "");
1634
- }
1635
-
1636
- // Tests a failed ASSERT_PRED4 where the
1637
- // predicate-formatter is a function on a user-defined type (Bool).
1638
- TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeFailure) {
1639
- expected_to_finish_ = false;
1640
- EXPECT_FATAL_FAILURE({ // NOLINT
1641
- ASSERT_PRED4(PredFunction4Bool,
1642
- Bool(n1_++),
1643
- Bool(n2_++),
1644
- Bool(n3_++),
1645
- Bool(n4_++));
1646
- finished_ = true;
1647
- }, "");
1648
- }
1649
-
1650
- // Tests a failed ASSERT_PRED4 where the
1651
- // predicate-formatter is a functor on a built-in type (int).
1652
- TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeFailure) {
1653
- expected_to_finish_ = false;
1654
- EXPECT_FATAL_FAILURE({ // NOLINT
1655
- ASSERT_PRED4(PredFunctor4(),
1656
- n1_++,
1657
- n2_++,
1658
- n3_++,
1659
- n4_++);
1660
- finished_ = true;
1661
- }, "");
1662
- }
1663
-
1664
- // Tests a failed ASSERT_PRED4 where the
1665
- // predicate-formatter is a functor on a user-defined type (Bool).
1666
- TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeFailure) {
1667
- expected_to_finish_ = false;
1668
- EXPECT_FATAL_FAILURE({ // NOLINT
1669
- ASSERT_PRED4(PredFunctor4(),
1670
- Bool(n1_++),
1671
- Bool(n2_++),
1672
- Bool(n3_++),
1673
- Bool(n4_++));
1674
- finished_ = true;
1675
- }, "");
1676
- }
1677
-
1678
- // Tests a successful EXPECT_PRED_FORMAT4 where the
1679
- // predicate-formatter is a function on a built-in type (int).
1680
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) {
1681
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
1682
- ++n1_,
1683
- ++n2_,
1684
- ++n3_,
1685
- ++n4_);
1686
- finished_ = true;
1687
- }
1688
-
1689
- // Tests a successful EXPECT_PRED_FORMAT4 where the
1690
- // predicate-formatter is a function on a user-defined type (Bool).
1691
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) {
1692
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
1693
- Bool(++n1_),
1694
- Bool(++n2_),
1695
- Bool(++n3_),
1696
- Bool(++n4_));
1697
- finished_ = true;
1698
- }
1699
-
1700
- // Tests a successful EXPECT_PRED_FORMAT4 where the
1701
- // predicate-formatter is a functor on a built-in type (int).
1702
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) {
1703
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
1704
- ++n1_,
1705
- ++n2_,
1706
- ++n3_,
1707
- ++n4_);
1708
- finished_ = true;
1709
- }
1710
-
1711
- // Tests a successful EXPECT_PRED_FORMAT4 where the
1712
- // predicate-formatter is a functor on a user-defined type (Bool).
1713
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) {
1714
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
1715
- Bool(++n1_),
1716
- Bool(++n2_),
1717
- Bool(++n3_),
1718
- Bool(++n4_));
1719
- finished_ = true;
1720
- }
1721
-
1722
- // Tests a failed EXPECT_PRED_FORMAT4 where the
1723
- // predicate-formatter is a function on a built-in type (int).
1724
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) {
1725
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1726
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
1727
- n1_++,
1728
- n2_++,
1729
- n3_++,
1730
- n4_++);
1731
- finished_ = true;
1732
- }, "");
1733
- }
1734
-
1735
- // Tests a failed EXPECT_PRED_FORMAT4 where the
1736
- // predicate-formatter is a function on a user-defined type (Bool).
1737
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) {
1738
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1739
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
1740
- Bool(n1_++),
1741
- Bool(n2_++),
1742
- Bool(n3_++),
1743
- Bool(n4_++));
1744
- finished_ = true;
1745
- }, "");
1746
- }
1747
-
1748
- // Tests a failed EXPECT_PRED_FORMAT4 where the
1749
- // predicate-formatter is a functor on a built-in type (int).
1750
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) {
1751
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1752
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
1753
- n1_++,
1754
- n2_++,
1755
- n3_++,
1756
- n4_++);
1757
- finished_ = true;
1758
- }, "");
1759
- }
1760
-
1761
- // Tests a failed EXPECT_PRED_FORMAT4 where the
1762
- // predicate-formatter is a functor on a user-defined type (Bool).
1763
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) {
1764
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1765
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
1766
- Bool(n1_++),
1767
- Bool(n2_++),
1768
- Bool(n3_++),
1769
- Bool(n4_++));
1770
- finished_ = true;
1771
- }, "");
1772
- }
1773
-
1774
- // Tests a successful ASSERT_PRED_FORMAT4 where the
1775
- // predicate-formatter is a function on a built-in type (int).
1776
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) {
1777
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
1778
- ++n1_,
1779
- ++n2_,
1780
- ++n3_,
1781
- ++n4_);
1782
- finished_ = true;
1783
- }
1784
-
1785
- // Tests a successful ASSERT_PRED_FORMAT4 where the
1786
- // predicate-formatter is a function on a user-defined type (Bool).
1787
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) {
1788
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
1789
- Bool(++n1_),
1790
- Bool(++n2_),
1791
- Bool(++n3_),
1792
- Bool(++n4_));
1793
- finished_ = true;
1794
- }
1795
-
1796
- // Tests a successful ASSERT_PRED_FORMAT4 where the
1797
- // predicate-formatter is a functor on a built-in type (int).
1798
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) {
1799
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
1800
- ++n1_,
1801
- ++n2_,
1802
- ++n3_,
1803
- ++n4_);
1804
- finished_ = true;
1805
- }
1806
-
1807
- // Tests a successful ASSERT_PRED_FORMAT4 where the
1808
- // predicate-formatter is a functor on a user-defined type (Bool).
1809
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) {
1810
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
1811
- Bool(++n1_),
1812
- Bool(++n2_),
1813
- Bool(++n3_),
1814
- Bool(++n4_));
1815
- finished_ = true;
1816
- }
1817
-
1818
- // Tests a failed ASSERT_PRED_FORMAT4 where the
1819
- // predicate-formatter is a function on a built-in type (int).
1820
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) {
1821
- expected_to_finish_ = false;
1822
- EXPECT_FATAL_FAILURE({ // NOLINT
1823
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
1824
- n1_++,
1825
- n2_++,
1826
- n3_++,
1827
- n4_++);
1828
- finished_ = true;
1829
- }, "");
1830
- }
1831
-
1832
- // Tests a failed ASSERT_PRED_FORMAT4 where the
1833
- // predicate-formatter is a function on a user-defined type (Bool).
1834
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) {
1835
- expected_to_finish_ = false;
1836
- EXPECT_FATAL_FAILURE({ // NOLINT
1837
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
1838
- Bool(n1_++),
1839
- Bool(n2_++),
1840
- Bool(n3_++),
1841
- Bool(n4_++));
1842
- finished_ = true;
1843
- }, "");
1844
- }
1845
-
1846
- // Tests a failed ASSERT_PRED_FORMAT4 where the
1847
- // predicate-formatter is a functor on a built-in type (int).
1848
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) {
1849
- expected_to_finish_ = false;
1850
- EXPECT_FATAL_FAILURE({ // NOLINT
1851
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
1852
- n1_++,
1853
- n2_++,
1854
- n3_++,
1855
- n4_++);
1856
- finished_ = true;
1857
- }, "");
1858
- }
1859
-
1860
- // Tests a failed ASSERT_PRED_FORMAT4 where the
1861
- // predicate-formatter is a functor on a user-defined type (Bool).
1862
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) {
1863
- expected_to_finish_ = false;
1864
- EXPECT_FATAL_FAILURE({ // NOLINT
1865
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
1866
- Bool(n1_++),
1867
- Bool(n2_++),
1868
- Bool(n3_++),
1869
- Bool(n4_++));
1870
- finished_ = true;
1871
- }, "");
1872
- }
1873
- // Sample functions/functors for testing 5-ary predicate assertions.
1874
-
1875
- // A 5-ary predicate function.
1876
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
1877
- bool PredFunction5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
1878
- return v1 + v2 + v3 + v4 + v5 > 0;
1879
- }
1880
-
1881
- // The following two functions are needed to circumvent a bug in
1882
- // gcc 2.95.3, which sometimes has problem with the above template
1883
- // function.
1884
- bool PredFunction5Int(int v1, int v2, int v3, int v4, int v5) {
1885
- return v1 + v2 + v3 + v4 + v5 > 0;
1886
- }
1887
- bool PredFunction5Bool(Bool v1, Bool v2, Bool v3, Bool v4, Bool v5) {
1888
- return v1 + v2 + v3 + v4 + v5 > 0;
1889
- }
1890
-
1891
- // A 5-ary predicate functor.
1892
- struct PredFunctor5 {
1893
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
1894
- bool operator()(const T1& v1,
1895
- const T2& v2,
1896
- const T3& v3,
1897
- const T4& v4,
1898
- const T5& v5) {
1899
- return v1 + v2 + v3 + v4 + v5 > 0;
1900
- }
1901
- };
1902
-
1903
- // A 5-ary predicate-formatter function.
1904
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
1905
- testing::AssertionResult PredFormatFunction5(const char* e1,
1906
- const char* e2,
1907
- const char* e3,
1908
- const char* e4,
1909
- const char* e5,
1910
- const T1& v1,
1911
- const T2& v2,
1912
- const T3& v3,
1913
- const T4& v4,
1914
- const T5& v5) {
1915
- if (PredFunction5(v1, v2, v3, v4, v5))
1916
- return testing::AssertionSuccess();
1917
-
1918
- return testing::AssertionFailure()
1919
- << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5
1920
- << " is expected to be positive, but evaluates to "
1921
- << v1 + v2 + v3 + v4 + v5 << ".";
1922
- }
1923
-
1924
- // A 5-ary predicate-formatter functor.
1925
- struct PredFormatFunctor5 {
1926
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
1927
- testing::AssertionResult operator()(const char* e1,
1928
- const char* e2,
1929
- const char* e3,
1930
- const char* e4,
1931
- const char* e5,
1932
- const T1& v1,
1933
- const T2& v2,
1934
- const T3& v3,
1935
- const T4& v4,
1936
- const T5& v5) const {
1937
- return PredFormatFunction5(e1, e2, e3, e4, e5, v1, v2, v3, v4, v5);
1938
- }
1939
- };
1940
-
1941
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT5.
1942
-
1943
- class Predicate5Test : public testing::Test {
1944
- protected:
1945
- virtual void SetUp() {
1946
- expected_to_finish_ = true;
1947
- finished_ = false;
1948
- n1_ = n2_ = n3_ = n4_ = n5_ = 0;
1949
- }
1950
-
1951
- virtual void TearDown() {
1952
- // Verifies that each of the predicate's arguments was evaluated
1953
- // exactly once.
1954
- EXPECT_EQ(1, n1_) <<
1955
- "The predicate assertion didn't evaluate argument 2 "
1956
- "exactly once.";
1957
- EXPECT_EQ(1, n2_) <<
1958
- "The predicate assertion didn't evaluate argument 3 "
1959
- "exactly once.";
1960
- EXPECT_EQ(1, n3_) <<
1961
- "The predicate assertion didn't evaluate argument 4 "
1962
- "exactly once.";
1963
- EXPECT_EQ(1, n4_) <<
1964
- "The predicate assertion didn't evaluate argument 5 "
1965
- "exactly once.";
1966
- EXPECT_EQ(1, n5_) <<
1967
- "The predicate assertion didn't evaluate argument 6 "
1968
- "exactly once.";
1969
-
1970
- // Verifies that the control flow in the test function is expected.
1971
- if (expected_to_finish_ && !finished_) {
1972
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
1973
- } else if (!expected_to_finish_ && finished_) {
1974
- FAIL() << "The failed predicate assertion didn't abort the test "
1975
- "as expected.";
1976
- }
1977
- }
1978
-
1979
- // true iff the test function is expected to run to finish.
1980
- static bool expected_to_finish_;
1981
-
1982
- // true iff the test function did run to finish.
1983
- static bool finished_;
1984
-
1985
- static int n1_;
1986
- static int n2_;
1987
- static int n3_;
1988
- static int n4_;
1989
- static int n5_;
1990
- };
1991
-
1992
- bool Predicate5Test::expected_to_finish_;
1993
- bool Predicate5Test::finished_;
1994
- int Predicate5Test::n1_;
1995
- int Predicate5Test::n2_;
1996
- int Predicate5Test::n3_;
1997
- int Predicate5Test::n4_;
1998
- int Predicate5Test::n5_;
1999
-
2000
- typedef Predicate5Test EXPECT_PRED_FORMAT5Test;
2001
- typedef Predicate5Test ASSERT_PRED_FORMAT5Test;
2002
- typedef Predicate5Test EXPECT_PRED5Test;
2003
- typedef Predicate5Test ASSERT_PRED5Test;
2004
-
2005
- // Tests a successful EXPECT_PRED5 where the
2006
- // predicate-formatter is a function on a built-in type (int).
2007
- TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeSuccess) {
2008
- EXPECT_PRED5(PredFunction5Int,
2009
- ++n1_,
2010
- ++n2_,
2011
- ++n3_,
2012
- ++n4_,
2013
- ++n5_);
2014
- finished_ = true;
2015
- }
2016
-
2017
- // Tests a successful EXPECT_PRED5 where the
2018
- // predicate-formatter is a function on a user-defined type (Bool).
2019
- TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeSuccess) {
2020
- EXPECT_PRED5(PredFunction5Bool,
2021
- Bool(++n1_),
2022
- Bool(++n2_),
2023
- Bool(++n3_),
2024
- Bool(++n4_),
2025
- Bool(++n5_));
2026
- finished_ = true;
2027
- }
2028
-
2029
- // Tests a successful EXPECT_PRED5 where the
2030
- // predicate-formatter is a functor on a built-in type (int).
2031
- TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeSuccess) {
2032
- EXPECT_PRED5(PredFunctor5(),
2033
- ++n1_,
2034
- ++n2_,
2035
- ++n3_,
2036
- ++n4_,
2037
- ++n5_);
2038
- finished_ = true;
2039
- }
2040
-
2041
- // Tests a successful EXPECT_PRED5 where the
2042
- // predicate-formatter is a functor on a user-defined type (Bool).
2043
- TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeSuccess) {
2044
- EXPECT_PRED5(PredFunctor5(),
2045
- Bool(++n1_),
2046
- Bool(++n2_),
2047
- Bool(++n3_),
2048
- Bool(++n4_),
2049
- Bool(++n5_));
2050
- finished_ = true;
2051
- }
2052
-
2053
- // Tests a failed EXPECT_PRED5 where the
2054
- // predicate-formatter is a function on a built-in type (int).
2055
- TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeFailure) {
2056
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2057
- EXPECT_PRED5(PredFunction5Int,
2058
- n1_++,
2059
- n2_++,
2060
- n3_++,
2061
- n4_++,
2062
- n5_++);
2063
- finished_ = true;
2064
- }, "");
2065
- }
2066
-
2067
- // Tests a failed EXPECT_PRED5 where the
2068
- // predicate-formatter is a function on a user-defined type (Bool).
2069
- TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeFailure) {
2070
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2071
- EXPECT_PRED5(PredFunction5Bool,
2072
- Bool(n1_++),
2073
- Bool(n2_++),
2074
- Bool(n3_++),
2075
- Bool(n4_++),
2076
- Bool(n5_++));
2077
- finished_ = true;
2078
- }, "");
2079
- }
2080
-
2081
- // Tests a failed EXPECT_PRED5 where the
2082
- // predicate-formatter is a functor on a built-in type (int).
2083
- TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeFailure) {
2084
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2085
- EXPECT_PRED5(PredFunctor5(),
2086
- n1_++,
2087
- n2_++,
2088
- n3_++,
2089
- n4_++,
2090
- n5_++);
2091
- finished_ = true;
2092
- }, "");
2093
- }
2094
-
2095
- // Tests a failed EXPECT_PRED5 where the
2096
- // predicate-formatter is a functor on a user-defined type (Bool).
2097
- TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeFailure) {
2098
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2099
- EXPECT_PRED5(PredFunctor5(),
2100
- Bool(n1_++),
2101
- Bool(n2_++),
2102
- Bool(n3_++),
2103
- Bool(n4_++),
2104
- Bool(n5_++));
2105
- finished_ = true;
2106
- }, "");
2107
- }
2108
-
2109
- // Tests a successful ASSERT_PRED5 where the
2110
- // predicate-formatter is a function on a built-in type (int).
2111
- TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeSuccess) {
2112
- ASSERT_PRED5(PredFunction5Int,
2113
- ++n1_,
2114
- ++n2_,
2115
- ++n3_,
2116
- ++n4_,
2117
- ++n5_);
2118
- finished_ = true;
2119
- }
2120
-
2121
- // Tests a successful ASSERT_PRED5 where the
2122
- // predicate-formatter is a function on a user-defined type (Bool).
2123
- TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeSuccess) {
2124
- ASSERT_PRED5(PredFunction5Bool,
2125
- Bool(++n1_),
2126
- Bool(++n2_),
2127
- Bool(++n3_),
2128
- Bool(++n4_),
2129
- Bool(++n5_));
2130
- finished_ = true;
2131
- }
2132
-
2133
- // Tests a successful ASSERT_PRED5 where the
2134
- // predicate-formatter is a functor on a built-in type (int).
2135
- TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeSuccess) {
2136
- ASSERT_PRED5(PredFunctor5(),
2137
- ++n1_,
2138
- ++n2_,
2139
- ++n3_,
2140
- ++n4_,
2141
- ++n5_);
2142
- finished_ = true;
2143
- }
2144
-
2145
- // Tests a successful ASSERT_PRED5 where the
2146
- // predicate-formatter is a functor on a user-defined type (Bool).
2147
- TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeSuccess) {
2148
- ASSERT_PRED5(PredFunctor5(),
2149
- Bool(++n1_),
2150
- Bool(++n2_),
2151
- Bool(++n3_),
2152
- Bool(++n4_),
2153
- Bool(++n5_));
2154
- finished_ = true;
2155
- }
2156
-
2157
- // Tests a failed ASSERT_PRED5 where the
2158
- // predicate-formatter is a function on a built-in type (int).
2159
- TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeFailure) {
2160
- expected_to_finish_ = false;
2161
- EXPECT_FATAL_FAILURE({ // NOLINT
2162
- ASSERT_PRED5(PredFunction5Int,
2163
- n1_++,
2164
- n2_++,
2165
- n3_++,
2166
- n4_++,
2167
- n5_++);
2168
- finished_ = true;
2169
- }, "");
2170
- }
2171
-
2172
- // Tests a failed ASSERT_PRED5 where the
2173
- // predicate-formatter is a function on a user-defined type (Bool).
2174
- TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeFailure) {
2175
- expected_to_finish_ = false;
2176
- EXPECT_FATAL_FAILURE({ // NOLINT
2177
- ASSERT_PRED5(PredFunction5Bool,
2178
- Bool(n1_++),
2179
- Bool(n2_++),
2180
- Bool(n3_++),
2181
- Bool(n4_++),
2182
- Bool(n5_++));
2183
- finished_ = true;
2184
- }, "");
2185
- }
2186
-
2187
- // Tests a failed ASSERT_PRED5 where the
2188
- // predicate-formatter is a functor on a built-in type (int).
2189
- TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeFailure) {
2190
- expected_to_finish_ = false;
2191
- EXPECT_FATAL_FAILURE({ // NOLINT
2192
- ASSERT_PRED5(PredFunctor5(),
2193
- n1_++,
2194
- n2_++,
2195
- n3_++,
2196
- n4_++,
2197
- n5_++);
2198
- finished_ = true;
2199
- }, "");
2200
- }
2201
-
2202
- // Tests a failed ASSERT_PRED5 where the
2203
- // predicate-formatter is a functor on a user-defined type (Bool).
2204
- TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeFailure) {
2205
- expected_to_finish_ = false;
2206
- EXPECT_FATAL_FAILURE({ // NOLINT
2207
- ASSERT_PRED5(PredFunctor5(),
2208
- Bool(n1_++),
2209
- Bool(n2_++),
2210
- Bool(n3_++),
2211
- Bool(n4_++),
2212
- Bool(n5_++));
2213
- finished_ = true;
2214
- }, "");
2215
- }
2216
-
2217
- // Tests a successful EXPECT_PRED_FORMAT5 where the
2218
- // predicate-formatter is a function on a built-in type (int).
2219
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) {
2220
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
2221
- ++n1_,
2222
- ++n2_,
2223
- ++n3_,
2224
- ++n4_,
2225
- ++n5_);
2226
- finished_ = true;
2227
- }
2228
-
2229
- // Tests a successful EXPECT_PRED_FORMAT5 where the
2230
- // predicate-formatter is a function on a user-defined type (Bool).
2231
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) {
2232
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
2233
- Bool(++n1_),
2234
- Bool(++n2_),
2235
- Bool(++n3_),
2236
- Bool(++n4_),
2237
- Bool(++n5_));
2238
- finished_ = true;
2239
- }
2240
-
2241
- // Tests a successful EXPECT_PRED_FORMAT5 where the
2242
- // predicate-formatter is a functor on a built-in type (int).
2243
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) {
2244
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
2245
- ++n1_,
2246
- ++n2_,
2247
- ++n3_,
2248
- ++n4_,
2249
- ++n5_);
2250
- finished_ = true;
2251
- }
2252
-
2253
- // Tests a successful EXPECT_PRED_FORMAT5 where the
2254
- // predicate-formatter is a functor on a user-defined type (Bool).
2255
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) {
2256
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
2257
- Bool(++n1_),
2258
- Bool(++n2_),
2259
- Bool(++n3_),
2260
- Bool(++n4_),
2261
- Bool(++n5_));
2262
- finished_ = true;
2263
- }
2264
-
2265
- // Tests a failed EXPECT_PRED_FORMAT5 where the
2266
- // predicate-formatter is a function on a built-in type (int).
2267
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) {
2268
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2269
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
2270
- n1_++,
2271
- n2_++,
2272
- n3_++,
2273
- n4_++,
2274
- n5_++);
2275
- finished_ = true;
2276
- }, "");
2277
- }
2278
-
2279
- // Tests a failed EXPECT_PRED_FORMAT5 where the
2280
- // predicate-formatter is a function on a user-defined type (Bool).
2281
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) {
2282
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2283
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
2284
- Bool(n1_++),
2285
- Bool(n2_++),
2286
- Bool(n3_++),
2287
- Bool(n4_++),
2288
- Bool(n5_++));
2289
- finished_ = true;
2290
- }, "");
2291
- }
2292
-
2293
- // Tests a failed EXPECT_PRED_FORMAT5 where the
2294
- // predicate-formatter is a functor on a built-in type (int).
2295
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) {
2296
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2297
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
2298
- n1_++,
2299
- n2_++,
2300
- n3_++,
2301
- n4_++,
2302
- n5_++);
2303
- finished_ = true;
2304
- }, "");
2305
- }
2306
-
2307
- // Tests a failed EXPECT_PRED_FORMAT5 where the
2308
- // predicate-formatter is a functor on a user-defined type (Bool).
2309
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) {
2310
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2311
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
2312
- Bool(n1_++),
2313
- Bool(n2_++),
2314
- Bool(n3_++),
2315
- Bool(n4_++),
2316
- Bool(n5_++));
2317
- finished_ = true;
2318
- }, "");
2319
- }
2320
-
2321
- // Tests a successful ASSERT_PRED_FORMAT5 where the
2322
- // predicate-formatter is a function on a built-in type (int).
2323
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) {
2324
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
2325
- ++n1_,
2326
- ++n2_,
2327
- ++n3_,
2328
- ++n4_,
2329
- ++n5_);
2330
- finished_ = true;
2331
- }
2332
-
2333
- // Tests a successful ASSERT_PRED_FORMAT5 where the
2334
- // predicate-formatter is a function on a user-defined type (Bool).
2335
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) {
2336
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
2337
- Bool(++n1_),
2338
- Bool(++n2_),
2339
- Bool(++n3_),
2340
- Bool(++n4_),
2341
- Bool(++n5_));
2342
- finished_ = true;
2343
- }
2344
-
2345
- // Tests a successful ASSERT_PRED_FORMAT5 where the
2346
- // predicate-formatter is a functor on a built-in type (int).
2347
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) {
2348
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
2349
- ++n1_,
2350
- ++n2_,
2351
- ++n3_,
2352
- ++n4_,
2353
- ++n5_);
2354
- finished_ = true;
2355
- }
2356
-
2357
- // Tests a successful ASSERT_PRED_FORMAT5 where the
2358
- // predicate-formatter is a functor on a user-defined type (Bool).
2359
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) {
2360
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
2361
- Bool(++n1_),
2362
- Bool(++n2_),
2363
- Bool(++n3_),
2364
- Bool(++n4_),
2365
- Bool(++n5_));
2366
- finished_ = true;
2367
- }
2368
-
2369
- // Tests a failed ASSERT_PRED_FORMAT5 where the
2370
- // predicate-formatter is a function on a built-in type (int).
2371
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) {
2372
- expected_to_finish_ = false;
2373
- EXPECT_FATAL_FAILURE({ // NOLINT
2374
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
2375
- n1_++,
2376
- n2_++,
2377
- n3_++,
2378
- n4_++,
2379
- n5_++);
2380
- finished_ = true;
2381
- }, "");
2382
- }
2383
-
2384
- // Tests a failed ASSERT_PRED_FORMAT5 where the
2385
- // predicate-formatter is a function on a user-defined type (Bool).
2386
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) {
2387
- expected_to_finish_ = false;
2388
- EXPECT_FATAL_FAILURE({ // NOLINT
2389
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
2390
- Bool(n1_++),
2391
- Bool(n2_++),
2392
- Bool(n3_++),
2393
- Bool(n4_++),
2394
- Bool(n5_++));
2395
- finished_ = true;
2396
- }, "");
2397
- }
2398
-
2399
- // Tests a failed ASSERT_PRED_FORMAT5 where the
2400
- // predicate-formatter is a functor on a built-in type (int).
2401
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) {
2402
- expected_to_finish_ = false;
2403
- EXPECT_FATAL_FAILURE({ // NOLINT
2404
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
2405
- n1_++,
2406
- n2_++,
2407
- n3_++,
2408
- n4_++,
2409
- n5_++);
2410
- finished_ = true;
2411
- }, "");
2412
- }
2413
-
2414
- // Tests a failed ASSERT_PRED_FORMAT5 where the
2415
- // predicate-formatter is a functor on a user-defined type (Bool).
2416
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) {
2417
- expected_to_finish_ = false;
2418
- EXPECT_FATAL_FAILURE({ // NOLINT
2419
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
2420
- Bool(n1_++),
2421
- Bool(n2_++),
2422
- Bool(n3_++),
2423
- Bool(n4_++),
2424
- Bool(n5_++));
2425
- finished_ = true;
2426
- }, "");
2427
- }