rj_schema 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (614) hide show
  1. checksums.yaml +4 -4
  2. data/ext/rj_schema/rapidjson/CHANGELOG.md +158 -0
  3. data/ext/rj_schema/rapidjson/CMakeLists.txt +226 -0
  4. data/ext/rj_schema/rapidjson/CMakeModules/FindGTestSrc.cmake +30 -0
  5. data/ext/rj_schema/rapidjson/RapidJSON.pc.in +7 -0
  6. data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +25 -0
  7. data/ext/rj_schema/rapidjson/RapidJSONConfigVersion.cmake.in +10 -0
  8. data/ext/rj_schema/rapidjson/appveyor.yml +54 -0
  9. data/ext/rj_schema/rapidjson/bin/data/abcde.txt +1 -0
  10. data/ext/rj_schema/rapidjson/bin/data/glossary.json +22 -0
  11. data/ext/rj_schema/rapidjson/bin/data/menu.json +27 -0
  12. data/ext/rj_schema/rapidjson/bin/data/readme.txt +1 -0
  13. data/ext/rj_schema/rapidjson/bin/data/sample.json +3315 -0
  14. data/ext/rj_schema/rapidjson/bin/data/webapp.json +88 -0
  15. data/ext/rj_schema/rapidjson/bin/data/widget.json +26 -0
  16. data/ext/rj_schema/rapidjson/bin/draft-04/schema +150 -0
  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 +7 -0
  26. data/ext/rj_schema/rapidjson/bin/encodings/utf8bom.json +7 -0
  27. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail1.json +1 -0
  28. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail10.json +1 -0
  29. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail11.json +1 -0
  30. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail12.json +1 -0
  31. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail13.json +1 -0
  32. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail14.json +1 -0
  33. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail15.json +1 -0
  34. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail16.json +1 -0
  35. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail17.json +1 -0
  36. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail18.json +1 -0
  37. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail19.json +1 -0
  38. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail2.json +1 -0
  39. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail20.json +1 -0
  40. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail21.json +1 -0
  41. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail22.json +1 -0
  42. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail23.json +1 -0
  43. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail24.json +1 -0
  44. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail25.json +1 -0
  45. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail26.json +1 -0
  46. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail27.json +2 -0
  47. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail28.json +2 -0
  48. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail29.json +1 -0
  49. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail3.json +1 -0
  50. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail30.json +1 -0
  51. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail31.json +1 -0
  52. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail32.json +1 -0
  53. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail33.json +1 -0
  54. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail4.json +1 -0
  55. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail5.json +1 -0
  56. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail6.json +1 -0
  57. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail7.json +1 -0
  58. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail8.json +1 -0
  59. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail9.json +1 -0
  60. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass1.json +58 -0
  61. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass2.json +1 -0
  62. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass3.json +6 -0
  63. data/ext/rj_schema/rapidjson/bin/jsonchecker/readme.txt +3 -0
  64. data/ext/rj_schema/rapidjson/bin/jsonschema/LICENSE +19 -0
  65. data/ext/rj_schema/rapidjson/bin/jsonschema/README.md +148 -0
  66. data/ext/rj_schema/rapidjson/bin/jsonschema/bin/jsonschema_suite +283 -0
  67. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json +3 -0
  68. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/integer.json +3 -0
  69. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/subSchemas.json +8 -0
  70. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json +82 -0
  71. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json +88 -0
  72. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/default.json +49 -0
  73. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/dependencies.json +108 -0
  74. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/disallow.json +80 -0
  75. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json +60 -0
  76. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json +71 -0
  77. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/extends.json +94 -0
  78. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/items.json +46 -0
  79. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxItems.json +28 -0
  80. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxLength.json +33 -0
  81. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maximum.json +42 -0
  82. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minItems.json +28 -0
  83. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minLength.json +33 -0
  84. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minimum.json +42 -0
  85. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json +107 -0
  86. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/format.json +222 -0
  87. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json +18 -0
  88. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json +15 -0
  89. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/pattern.json +34 -0
  90. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json +110 -0
  91. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/properties.json +92 -0
  92. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/ref.json +159 -0
  93. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/refRemote.json +74 -0
  94. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/required.json +53 -0
  95. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/type.json +474 -0
  96. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json +79 -0
  97. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json +82 -0
  98. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json +88 -0
  99. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/allOf.json +112 -0
  100. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/anyOf.json +68 -0
  101. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/default.json +49 -0
  102. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/definitions.json +32 -0
  103. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/dependencies.json +113 -0
  104. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json +72 -0
  105. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/items.json +46 -0
  106. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxItems.json +28 -0
  107. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxLength.json +33 -0
  108. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json +28 -0
  109. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maximum.json +42 -0
  110. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minItems.json +28 -0
  111. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minLength.json +33 -0
  112. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minProperties.json +28 -0
  113. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minimum.json +42 -0
  114. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json +60 -0
  115. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/not.json +96 -0
  116. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/oneOf.json +68 -0
  117. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json +107 -0
  118. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/format.json +148 -0
  119. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json +15 -0
  120. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/pattern.json +34 -0
  121. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json +110 -0
  122. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/properties.json +92 -0
  123. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/ref.json +159 -0
  124. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/refRemote.json +74 -0
  125. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/required.json +39 -0
  126. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json +330 -0
  127. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json +79 -0
  128. data/ext/rj_schema/rapidjson/bin/jsonschema/tox.ini +8 -0
  129. data/ext/rj_schema/rapidjson/bin/types/booleans.json +102 -0
  130. data/ext/rj_schema/rapidjson/bin/types/floats.json +102 -0
  131. data/ext/rj_schema/rapidjson/bin/types/guids.json +102 -0
  132. data/ext/rj_schema/rapidjson/bin/types/integers.json +102 -0
  133. data/ext/rj_schema/rapidjson/bin/types/mixed.json +592 -0
  134. data/ext/rj_schema/rapidjson/bin/types/nulls.json +102 -0
  135. data/ext/rj_schema/rapidjson/bin/types/paragraphs.json +102 -0
  136. data/ext/rj_schema/rapidjson/bin/types/readme.txt +1 -0
  137. data/ext/rj_schema/rapidjson/contrib/natvis/LICENSE +45 -0
  138. data/ext/rj_schema/rapidjson/contrib/natvis/README.md +7 -0
  139. data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +38 -0
  140. data/ext/rj_schema/rapidjson/doc/CMakeLists.txt +27 -0
  141. data/ext/rj_schema/rapidjson/doc/Doxyfile.in +2369 -0
  142. data/ext/rj_schema/rapidjson/doc/Doxyfile.zh-cn.in +2369 -0
  143. data/ext/rj_schema/rapidjson/doc/diagram/architecture.dot +50 -0
  144. data/ext/rj_schema/rapidjson/doc/diagram/architecture.png +0 -0
  145. data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.dot +65 -0
  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 +62 -0
  148. data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
  149. data/ext/rj_schema/rapidjson/doc/diagram/makefile +8 -0
  150. data/ext/rj_schema/rapidjson/doc/diagram/move1.dot +47 -0
  151. data/ext/rj_schema/rapidjson/doc/diagram/move1.png +0 -0
  152. data/ext/rj_schema/rapidjson/doc/diagram/move2.dot +62 -0
  153. data/ext/rj_schema/rapidjson/doc/diagram/move2.png +0 -0
  154. data/ext/rj_schema/rapidjson/doc/diagram/move3.dot +60 -0
  155. data/ext/rj_schema/rapidjson/doc/diagram/move3.png +0 -0
  156. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.dot +56 -0
  157. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.png +0 -0
  158. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.dot +54 -0
  159. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.png +0 -0
  160. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.dot +58 -0
  161. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.png +0 -0
  162. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.dot +73 -0
  163. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.png +0 -0
  164. data/ext/rj_schema/rapidjson/doc/dom.md +281 -0
  165. data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +285 -0
  166. data/ext/rj_schema/rapidjson/doc/encoding.md +146 -0
  167. data/ext/rj_schema/rapidjson/doc/encoding.zh-cn.md +152 -0
  168. data/ext/rj_schema/rapidjson/doc/faq.md +289 -0
  169. data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +290 -0
  170. data/ext/rj_schema/rapidjson/doc/features.md +104 -0
  171. data/ext/rj_schema/rapidjson/doc/features.zh-cn.md +103 -0
  172. data/ext/rj_schema/rapidjson/doc/internals.md +368 -0
  173. data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +363 -0
  174. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.png +0 -0
  175. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.svg +119 -0
  176. data/ext/rj_schema/rapidjson/doc/misc/DoxygenLayout.xml +194 -0
  177. data/ext/rj_schema/rapidjson/doc/misc/doxygenextra.css +274 -0
  178. data/ext/rj_schema/rapidjson/doc/misc/footer.html +11 -0
  179. data/ext/rj_schema/rapidjson/doc/misc/header.html +24 -0
  180. data/ext/rj_schema/rapidjson/doc/npm.md +31 -0
  181. data/ext/rj_schema/rapidjson/doc/performance.md +26 -0
  182. data/ext/rj_schema/rapidjson/doc/performance.zh-cn.md +26 -0
  183. data/ext/rj_schema/rapidjson/doc/pointer.md +234 -0
  184. data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +234 -0
  185. data/ext/rj_schema/rapidjson/doc/sax.md +509 -0
  186. data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +487 -0
  187. data/ext/rj_schema/rapidjson/doc/schema.md +505 -0
  188. data/ext/rj_schema/rapidjson/doc/schema.zh-cn.md +237 -0
  189. data/ext/rj_schema/rapidjson/doc/stream.md +429 -0
  190. data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +429 -0
  191. data/ext/rj_schema/rapidjson/doc/tutorial.md +536 -0
  192. data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +535 -0
  193. data/ext/rj_schema/rapidjson/docker/debian/Dockerfile +8 -0
  194. data/ext/rj_schema/rapidjson/example/CMakeLists.txt +46 -0
  195. data/ext/rj_schema/rapidjson/example/archiver/archiver.cpp +292 -0
  196. data/ext/rj_schema/rapidjson/example/archiver/archiver.h +145 -0
  197. data/ext/rj_schema/rapidjson/example/archiver/archivertest.cpp +287 -0
  198. data/ext/rj_schema/rapidjson/example/capitalize/capitalize.cpp +67 -0
  199. data/ext/rj_schema/rapidjson/example/condense/condense.cpp +32 -0
  200. data/ext/rj_schema/rapidjson/example/filterkey/filterkey.cpp +135 -0
  201. data/ext/rj_schema/rapidjson/example/filterkeydom/filterkeydom.cpp +170 -0
  202. data/ext/rj_schema/rapidjson/example/jsonx/jsonx.cpp +207 -0
  203. data/ext/rj_schema/rapidjson/example/lookaheadparser/lookaheadparser.cpp +350 -0
  204. data/ext/rj_schema/rapidjson/example/messagereader/messagereader.cpp +105 -0
  205. data/ext/rj_schema/rapidjson/example/parsebyparts/parsebyparts.cpp +176 -0
  206. data/ext/rj_schema/rapidjson/example/pretty/pretty.cpp +30 -0
  207. data/ext/rj_schema/rapidjson/example/prettyauto/prettyauto.cpp +56 -0
  208. data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +78 -0
  209. data/ext/rj_schema/rapidjson/example/serialize/serialize.cpp +173 -0
  210. data/ext/rj_schema/rapidjson/example/simpledom/simpledom.cpp +29 -0
  211. data/ext/rj_schema/rapidjson/example/simplepullreader/simplepullreader.cpp +53 -0
  212. data/ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp +42 -0
  213. data/ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp +36 -0
  214. data/ext/rj_schema/rapidjson/example/sortkeys/sortkeys.cpp +62 -0
  215. data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +151 -0
  216. data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +284 -0
  217. data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +78 -0
  218. data/ext/rj_schema/rapidjson/include/rapidjson/document.h +2732 -0
  219. data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +299 -0
  220. data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +716 -0
  221. data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +74 -0
  222. data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +161 -0
  223. data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +99 -0
  224. data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +104 -0
  225. data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +151 -0
  226. data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +290 -0
  227. data/ext/rj_schema/rapidjson/include/rapidjson/internal/clzll.h +71 -0
  228. data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +257 -0
  229. data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +245 -0
  230. data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +78 -0
  231. data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +308 -0
  232. data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +186 -0
  233. data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +55 -0
  234. data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +739 -0
  235. data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +232 -0
  236. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +69 -0
  237. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +290 -0
  238. data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +46 -0
  239. data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +128 -0
  240. data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +70 -0
  241. data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +71 -0
  242. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/inttypes.h +316 -0
  243. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/stdint.h +300 -0
  244. data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +81 -0
  245. data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +1415 -0
  246. data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +277 -0
  247. data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +676 -0
  248. data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +2236 -0
  249. data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +2496 -0
  250. data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +223 -0
  251. data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +121 -0
  252. data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +710 -0
  253. data/ext/rj_schema/rapidjson/include_dirs.js +2 -0
  254. data/ext/rj_schema/rapidjson/library.json +15 -0
  255. data/ext/rj_schema/rapidjson/license.txt +57 -0
  256. data/ext/rj_schema/rapidjson/package.json +24 -0
  257. data/ext/rj_schema/rapidjson/rapidjson.autopkg +77 -0
  258. data/ext/rj_schema/rapidjson/readme.md +210 -0
  259. data/ext/rj_schema/rapidjson/readme.zh-cn.md +152 -0
  260. data/ext/rj_schema/rapidjson/test/CMakeLists.txt +20 -0
  261. data/ext/rj_schema/rapidjson/test/perftest/CMakeLists.txt +28 -0
  262. data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +974 -0
  263. data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +24 -0
  264. data/ext/rj_schema/rapidjson/test/perftest/perftest.h +185 -0
  265. data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +166 -0
  266. data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +546 -0
  267. data/ext/rj_schema/rapidjson/test/perftest/schematest.cpp +223 -0
  268. data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +92 -0
  269. data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +100 -0
  270. data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +138 -0
  271. data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +115 -0
  272. data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +672 -0
  273. data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +98 -0
  274. data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +313 -0
  275. data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +451 -0
  276. data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +155 -0
  277. data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +230 -0
  278. data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +181 -0
  279. data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +160 -0
  280. data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +143 -0
  281. data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +70 -0
  282. data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +92 -0
  283. data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +1638 -0
  284. data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +373 -0
  285. data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +2225 -0
  286. data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +639 -0
  287. data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +2072 -0
  288. data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +219 -0
  289. data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +30 -0
  290. data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +192 -0
  291. data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +132 -0
  292. data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +51 -0
  293. data/ext/rj_schema/rapidjson/test/unittest/unittest.h +143 -0
  294. data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +1851 -0
  295. data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +598 -0
  296. data/ext/rj_schema/rapidjson/test/valgrind.supp +17 -0
  297. data/ext/rj_schema/rapidjson/thirdparty/gtest/BUILD.bazel +175 -0
  298. data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +33 -0
  299. data/ext/rj_schema/rapidjson/thirdparty/gtest/CONTRIBUTING.md +160 -0
  300. data/ext/rj_schema/rapidjson/thirdparty/gtest/LICENSE +28 -0
  301. data/ext/rj_schema/rapidjson/thirdparty/gtest/Makefile.am +14 -0
  302. data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +122 -0
  303. data/ext/rj_schema/rapidjson/thirdparty/gtest/WORKSPACE +8 -0
  304. data/ext/rj_schema/rapidjson/thirdparty/gtest/appveyor.yml +104 -0
  305. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-autotools.sh +44 -0
  306. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-bazel.sh +36 -0
  307. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-linux.sh +41 -0
  308. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-osx.sh +40 -0
  309. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/get-nprocessors.sh +48 -0
  310. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-linux.sh +49 -0
  311. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-osx.sh +39 -0
  312. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/log-config.sh +51 -0
  313. data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/travis.sh +44 -0
  314. data/ext/rj_schema/rapidjson/thirdparty/gtest/configure.ac +16 -0
  315. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +126 -0
  316. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +242 -0
  317. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +40 -0
  318. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +28 -0
  319. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +224 -0
  320. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +344 -0
  321. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock.pc.in +9 -0
  322. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock_main.pc.in +9 -0
  323. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +146 -0
  324. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +564 -0
  325. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +3660 -0
  326. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +280 -0
  327. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +15 -0
  328. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +447 -0
  329. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +627 -0
  330. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +19 -0
  331. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +1262 -0
  332. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +147 -0
  333. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +2571 -0
  334. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +833 -0
  335. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +1379 -0
  336. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +347 -0
  337. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +2258 -0
  338. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +675 -0
  339. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +458 -0
  340. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +178 -0
  341. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +5255 -0
  342. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +246 -0
  343. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +91 -0
  344. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +1918 -0
  345. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +95 -0
  346. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +8 -0
  347. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +10 -0
  348. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +38 -0
  349. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +46 -0
  350. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +286 -0
  351. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +136 -0
  352. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +574 -0
  353. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +87 -0
  354. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +101 -0
  355. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +32 -0
  356. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +191 -0
  357. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +15 -0
  358. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +187 -0
  359. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +201 -0
  360. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +46 -0
  361. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +145 -0
  362. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +19 -0
  363. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +151 -0
  364. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +176 -0
  365. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +46 -0
  366. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +145 -0
  367. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +19 -0
  368. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +151 -0
  369. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +176 -0
  370. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +240 -0
  371. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +203 -0
  372. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +34 -0
  373. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +115 -0
  374. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  375. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +1733 -0
  376. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +227 -0
  377. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +448 -0
  378. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +59 -0
  379. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +287 -0
  380. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +41 -0
  381. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +31 -0
  382. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +303 -0
  383. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +640 -0
  384. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +1387 -0
  385. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +78 -0
  386. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +47 -0
  387. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +156 -0
  388. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +204 -0
  389. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +573 -0
  390. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +883 -0
  391. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +205 -0
  392. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +54 -0
  393. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/BUILD.bazel +123 -0
  394. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +1575 -0
  395. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +428 -0
  396. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +1230 -0
  397. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +647 -0
  398. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +129 -0
  399. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +1341 -0
  400. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +718 -0
  401. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +6767 -0
  402. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +710 -0
  403. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +511 -0
  404. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +43 -0
  405. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +2771 -0
  406. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +51 -0
  407. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +81 -0
  408. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +108 -0
  409. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +100 -0
  410. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +40 -0
  411. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +40 -0
  412. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +691 -0
  413. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +183 -0
  414. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +310 -0
  415. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +317 -0
  416. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +323 -0
  417. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +262 -0
  418. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +110 -0
  419. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +157 -0
  420. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +312 -0
  421. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +37 -0
  422. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +28 -0
  423. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +339 -0
  424. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +341 -0
  425. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest.pc.in +9 -0
  426. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest_main.pc.in +10 -0
  427. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +280 -0
  428. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +138 -0
  429. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +54 -0
  430. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +38 -0
  431. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +40 -0
  432. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +82 -0
  433. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +88 -0
  434. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +68 -0
  435. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Pkgconfig.md +146 -0
  436. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +177 -0
  437. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +93 -0
  438. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/advanced.md +2416 -0
  439. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/faq.md +1092 -0
  440. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/primer.md +536 -0
  441. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/samples.md +14 -0
  442. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +342 -0
  443. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +249 -0
  444. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +1438 -0
  445. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +501 -0
  446. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +1082 -0
  447. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +231 -0
  448. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +179 -0
  449. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +264 -0
  450. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +2332 -0
  451. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +357 -0
  452. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +61 -0
  453. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +70 -0
  454. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
  455. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +45 -0
  456. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +275 -0
  457. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +205 -0
  458. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +1277 -0
  459. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +243 -0
  460. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +5139 -0
  461. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +279 -0
  462. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +723 -0
  463. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +100 -0
  464. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +2687 -0
  465. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +167 -0
  466. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +1020 -0
  467. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +347 -0
  468. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +3347 -0
  469. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +313 -0
  470. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +363 -0
  471. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +74 -0
  472. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +82 -0
  473. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.sln +55 -0
  474. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj +149 -0
  475. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj.filters +18 -0
  476. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.sln +55 -0
  477. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj +149 -0
  478. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj.filters +18 -0
  479. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj +154 -0
  480. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj.filters +18 -0
  481. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj +162 -0
  482. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj.filters +18 -0
  483. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj +199 -0
  484. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters +26 -0
  485. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj +191 -0
  486. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters +26 -0
  487. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj +188 -0
  488. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters +18 -0
  489. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj +180 -0
  490. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj.filters +18 -0
  491. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +127 -0
  492. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +68 -0
  493. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +43 -0
  494. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +140 -0
  495. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +154 -0
  496. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +56 -0
  497. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +85 -0
  498. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +110 -0
  499. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +172 -0
  500. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +152 -0
  501. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +46 -0
  502. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +53 -0
  503. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +49 -0
  504. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +199 -0
  505. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +225 -0
  506. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +118 -0
  507. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +174 -0
  508. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +157 -0
  509. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +83 -0
  510. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +253 -0
  511. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +730 -0
  512. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +274 -0
  513. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +855 -0
  514. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +158 -0
  515. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +59 -0
  516. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1387 -0
  517. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +78 -0
  518. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +48 -0
  519. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +1536 -0
  520. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +385 -0
  521. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +1175 -0
  522. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +1277 -0
  523. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +458 -0
  524. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +102 -0
  525. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +119 -0
  526. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +5846 -0
  527. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +38 -0
  528. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/BUILD.bazel +396 -0
  529. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +93 -0
  530. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +1424 -0
  531. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +652 -0
  532. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +154 -0
  533. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +311 -0
  534. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +159 -0
  535. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +213 -0
  536. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +61 -0
  537. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +1110 -0
  538. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +53 -0
  539. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +1303 -0
  540. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +1737 -0
  541. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +208 -0
  542. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +320 -0
  543. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +45 -0
  544. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +380 -0
  545. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +66 -0
  546. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +341 -0
  547. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +47 -0
  548. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_assert_by_exception_test.cc +119 -0
  549. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +210 -0
  550. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +87 -0
  551. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +235 -0
  552. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +311 -0
  553. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +129 -0
  554. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +63 -0
  555. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +119 -0
  556. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +124 -0
  557. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +189 -0
  558. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +638 -0
  559. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +138 -0
  560. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +172 -0
  561. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +46 -0
  562. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_outfiles_test.py +162 -0
  563. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_output_unittest.py +611 -0
  564. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_test_utils.py +60 -0
  565. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +207 -0
  566. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +157 -0
  567. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +45 -0
  568. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +56 -0
  569. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +344 -0
  570. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +1067 -0
  571. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +781 -0
  572. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +2427 -0
  573. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +127 -0
  574. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +57 -0
  575. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +236 -0
  576. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +325 -0
  577. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +103 -0
  578. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +57 -0
  579. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +250 -0
  580. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +318 -0
  581. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test.py +65 -0
  582. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test_.cc +44 -0
  583. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +92 -0
  584. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +171 -0
  585. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +72 -0
  586. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +69 -0
  587. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +43 -0
  588. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +7797 -0
  589. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +48 -0
  590. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +48 -0
  591. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +140 -0
  592. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +378 -0
  593. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +179 -0
  594. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +196 -0
  595. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +36 -0
  596. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +55 -0
  597. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +30 -0
  598. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +17 -0
  599. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +41 -0
  600. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +32 -0
  601. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +18 -0
  602. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +8 -0
  603. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +30 -0
  604. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +28 -0
  605. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +457 -0
  606. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +62 -0
  607. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +63 -0
  608. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +59 -0
  609. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +68 -0
  610. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +65 -0
  611. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +100 -0
  612. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +1182 -0
  613. data/ext/rj_schema/rapidjson/travis-doxygen.sh +128 -0
  614. metadata +613 -1
@@ -0,0 +1,347 @@
1
+ $$ -*- mode: c++; -*-
2
+ $$ This is a Pump source file. Please use Pump to convert
3
+ $$ it to gmock-generated-function-mockers.h.
4
+ $$
5
+ $var n = 10 $$ The maximum arity we support.
6
+ // Copyright 2007, Google Inc.
7
+ // All rights reserved.
8
+ //
9
+ // Redistribution and use in source and binary forms, with or without
10
+ // modification, are permitted provided that the following conditions are
11
+ // met:
12
+ //
13
+ // * Redistributions of source code must retain the above copyright
14
+ // notice, this list of conditions and the following disclaimer.
15
+ // * Redistributions in binary form must reproduce the above
16
+ // copyright notice, this list of conditions and the following disclaimer
17
+ // in the documentation and/or other materials provided with the
18
+ // distribution.
19
+ // * Neither the name of Google Inc. nor the names of its
20
+ // contributors may be used to endorse or promote products derived from
21
+ // this software without specific prior written permission.
22
+ //
23
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ //
35
+ // Author: wan@google.com (Zhanyong Wan)
36
+
37
+ // Google Mock - a framework for writing C++ mock classes.
38
+ //
39
+ // This file implements function mockers of various arities.
40
+
41
+ #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
42
+ #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
43
+
44
+ #include "gmock/gmock-spec-builders.h"
45
+ #include "gmock/internal/gmock-internal-utils.h"
46
+
47
+ #if GTEST_HAS_STD_FUNCTION_
48
+ # include <functional>
49
+ #endif
50
+
51
+ namespace testing {
52
+ namespace internal {
53
+
54
+ template <typename F>
55
+ class FunctionMockerBase;
56
+
57
+ // Note: class FunctionMocker really belongs to the ::testing
58
+ // namespace. However if we define it in ::testing, MSVC will
59
+ // complain when classes in ::testing::internal declare it as a
60
+ // friend class template. To workaround this compiler bug, we define
61
+ // FunctionMocker in ::testing::internal and import it into ::testing.
62
+ template <typename F>
63
+ class FunctionMocker;
64
+
65
+
66
+ $range i 0..n
67
+ $for i [[
68
+ $range j 1..i
69
+ $var typename_As = [[$for j [[, typename A$j]]]]
70
+ $var As = [[$for j, [[A$j]]]]
71
+ $var as = [[$for j, [[internal::forward<A$j>(a$j)]]]]
72
+ $var Aas = [[$for j, [[A$j a$j]]]]
73
+ $var ms = [[$for j, [[m$j]]]]
74
+ $var matchers = [[$for j, [[const Matcher<A$j>& m$j]]]]
75
+ template <typename R$typename_As>
76
+ class FunctionMocker<R($As)> : public
77
+ internal::FunctionMockerBase<R($As)> {
78
+ public:
79
+ typedef R F($As);
80
+ typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
81
+
82
+ MockSpec<F> With($matchers) {
83
+ return MockSpec<F>(this, ::testing::make_tuple($ms));
84
+ }
85
+
86
+ R Invoke($Aas) {
87
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
88
+ // by the C++ standard [14.6.4] here, as the base class type is
89
+ // dependent on the template argument (and thus shouldn't be
90
+ // looked into when resolving InvokeWith).
91
+ return this->InvokeWith(ArgumentTuple($as));
92
+ }
93
+ };
94
+
95
+
96
+ ]]
97
+ // Removes the given pointer; this is a helper for the expectation setter method
98
+ // for parameterless matchers.
99
+ //
100
+ // We want to make sure that the user cannot set a parameterless expectation on
101
+ // overloaded methods, including methods which are overloaded on const. Example:
102
+ //
103
+ // class MockClass {
104
+ // MOCK_METHOD0(GetName, string&());
105
+ // MOCK_CONST_METHOD0(GetName, const string&());
106
+ // };
107
+ //
108
+ // TEST() {
109
+ // // This should be an error, as it's not clear which overload is expected.
110
+ // EXPECT_CALL(mock, GetName).WillOnce(ReturnRef(value));
111
+ // }
112
+ //
113
+ // Here are the generated expectation-setter methods:
114
+ //
115
+ // class MockClass {
116
+ // // Overload 1
117
+ // MockSpec<string&()> gmock_GetName() { … }
118
+ // // Overload 2. Declared const so that the compiler will generate an
119
+ // // error when trying to resolve between this and overload 4 in
120
+ // // 'gmock_GetName(WithoutMatchers(), nullptr)'.
121
+ // MockSpec<string&()> gmock_GetName(
122
+ // const WithoutMatchers&, const Function<string&()>*) const {
123
+ // // Removes const from this, calls overload 1
124
+ // return AdjustConstness_(this)->gmock_GetName();
125
+ // }
126
+ //
127
+ // // Overload 3
128
+ // const string& gmock_GetName() const { … }
129
+ // // Overload 4
130
+ // MockSpec<const string&()> gmock_GetName(
131
+ // const WithoutMatchers&, const Function<const string&()>*) const {
132
+ // // Does not remove const, calls overload 3
133
+ // return AdjustConstness_const(this)->gmock_GetName();
134
+ // }
135
+ // }
136
+ //
137
+ template <typename MockType>
138
+ const MockType* AdjustConstness_const(const MockType* mock) {
139
+ return mock;
140
+ }
141
+
142
+ // Removes const from and returns the given pointer; this is a helper for the
143
+ // expectation setter method for parameterless matchers.
144
+ template <typename MockType>
145
+ MockType* AdjustConstness_(const MockType* mock) {
146
+ return const_cast<MockType*>(mock);
147
+ }
148
+
149
+ } // namespace internal
150
+
151
+ // The style guide prohibits "using" statements in a namespace scope
152
+ // inside a header file. However, the FunctionMocker class template
153
+ // is meant to be defined in the ::testing namespace. The following
154
+ // line is just a trick for working around a bug in MSVC 8.0, which
155
+ // cannot handle it if we define FunctionMocker in ::testing.
156
+ using internal::FunctionMocker;
157
+
158
+ // GMOCK_RESULT_(tn, F) expands to the result type of function type F.
159
+ // We define this as a variadic macro in case F contains unprotected
160
+ // commas (the same reason that we use variadic macros in other places
161
+ // in this file).
162
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
163
+ #define GMOCK_RESULT_(tn, ...) \
164
+ tn ::testing::internal::Function<__VA_ARGS__>::Result
165
+
166
+ // The type of argument N of the given function type.
167
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
168
+ #define GMOCK_ARG_(tn, N, ...) \
169
+ tn ::testing::internal::Function<__VA_ARGS__>::Argument##N
170
+
171
+ // The matcher type for argument N of the given function type.
172
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
173
+ #define GMOCK_MATCHER_(tn, N, ...) \
174
+ const ::testing::Matcher<GMOCK_ARG_(tn, N, __VA_ARGS__)>&
175
+
176
+ // The variable for mocking the given method.
177
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
178
+ #define GMOCK_MOCKER_(arity, constness, Method) \
179
+ GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
180
+
181
+
182
+ $for i [[
183
+ $range j 1..i
184
+ $var arg_as = [[$for j, [[GMOCK_ARG_(tn, $j, __VA_ARGS__) gmock_a$j]]]]
185
+ $var as = [[$for j, \
186
+ [[::testing::internal::forward<GMOCK_ARG_(tn, $j, __VA_ARGS__)>(gmock_a$j)]]]]
187
+ $var matcher_arg_as = [[$for j, \
188
+ [[GMOCK_MATCHER_(tn, $j, __VA_ARGS__) gmock_a$j]]]]
189
+ $var matcher_as = [[$for j, [[gmock_a$j]]]]
190
+ $var anything_matchers = [[$for j, \
191
+ [[::testing::A<GMOCK_ARG_(tn, $j, __VA_ARGS__)>()]]]]
192
+ // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
193
+ #define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, ...) \
194
+ GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
195
+ $arg_as) constness { \
196
+ GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
197
+ tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == $i), \
198
+ this_method_does_not_take_$i[[]]_argument[[$if i != 1 [[s]]]]); \
199
+ GMOCK_MOCKER_($i, constness, Method).SetOwnerAndName(this, #Method); \
200
+ return GMOCK_MOCKER_($i, constness, Method).Invoke($as); \
201
+ } \
202
+ ::testing::MockSpec<__VA_ARGS__> \
203
+ gmock_##Method($matcher_arg_as) constness { \
204
+ GMOCK_MOCKER_($i, constness, Method).RegisterOwner(this); \
205
+ return GMOCK_MOCKER_($i, constness, Method).With($matcher_as); \
206
+ } \
207
+ ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
208
+ const ::testing::internal::WithoutMatchers&, \
209
+ constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
210
+ return ::testing::internal::AdjustConstness_##constness(this)-> \
211
+ gmock_##Method($anything_matchers); \
212
+ } \
213
+ mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_($i, constness, Method)
214
+
215
+
216
+ ]]
217
+ $for i [[
218
+ #define MOCK_METHOD$i(m, ...) GMOCK_METHOD$i[[]]_(, , , m, __VA_ARGS__)
219
+
220
+ ]]
221
+
222
+
223
+ $for i [[
224
+ #define MOCK_CONST_METHOD$i(m, ...) GMOCK_METHOD$i[[]]_(, const, , m, __VA_ARGS__)
225
+
226
+ ]]
227
+
228
+
229
+ $for i [[
230
+ #define MOCK_METHOD$i[[]]_T(m, ...) GMOCK_METHOD$i[[]]_(typename, , , m, __VA_ARGS__)
231
+
232
+ ]]
233
+
234
+
235
+ $for i [[
236
+ #define MOCK_CONST_METHOD$i[[]]_T(m, ...) \
237
+ GMOCK_METHOD$i[[]]_(typename, const, , m, __VA_ARGS__)
238
+
239
+ ]]
240
+
241
+
242
+ $for i [[
243
+ #define MOCK_METHOD$i[[]]_WITH_CALLTYPE(ct, m, ...) \
244
+ GMOCK_METHOD$i[[]]_(, , ct, m, __VA_ARGS__)
245
+
246
+ ]]
247
+
248
+
249
+ $for i [[
250
+ #define MOCK_CONST_METHOD$i[[]]_WITH_CALLTYPE(ct, m, ...) \
251
+ GMOCK_METHOD$i[[]]_(, const, ct, m, __VA_ARGS__)
252
+
253
+ ]]
254
+
255
+
256
+ $for i [[
257
+ #define MOCK_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, ...) \
258
+ GMOCK_METHOD$i[[]]_(typename, , ct, m, __VA_ARGS__)
259
+
260
+ ]]
261
+
262
+
263
+ $for i [[
264
+ #define MOCK_CONST_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, ...) \
265
+ GMOCK_METHOD$i[[]]_(typename, const, ct, m, __VA_ARGS__)
266
+
267
+ ]]
268
+
269
+ // A MockFunction<F> class has one mock method whose type is F. It is
270
+ // useful when you just want your test code to emit some messages and
271
+ // have Google Mock verify the right messages are sent (and perhaps at
272
+ // the right times). For example, if you are exercising code:
273
+ //
274
+ // Foo(1);
275
+ // Foo(2);
276
+ // Foo(3);
277
+ //
278
+ // and want to verify that Foo(1) and Foo(3) both invoke
279
+ // mock.Bar("a"), but Foo(2) doesn't invoke anything, you can write:
280
+ //
281
+ // TEST(FooTest, InvokesBarCorrectly) {
282
+ // MyMock mock;
283
+ // MockFunction<void(string check_point_name)> check;
284
+ // {
285
+ // InSequence s;
286
+ //
287
+ // EXPECT_CALL(mock, Bar("a"));
288
+ // EXPECT_CALL(check, Call("1"));
289
+ // EXPECT_CALL(check, Call("2"));
290
+ // EXPECT_CALL(mock, Bar("a"));
291
+ // }
292
+ // Foo(1);
293
+ // check.Call("1");
294
+ // Foo(2);
295
+ // check.Call("2");
296
+ // Foo(3);
297
+ // }
298
+ //
299
+ // The expectation spec says that the first Bar("a") must happen
300
+ // before check point "1", the second Bar("a") must happen after check
301
+ // point "2", and nothing should happen between the two check
302
+ // points. The explicit check points make it easy to tell which
303
+ // Bar("a") is called by which call to Foo().
304
+ //
305
+ // MockFunction<F> can also be used to exercise code that accepts
306
+ // std::function<F> callbacks. To do so, use AsStdFunction() method
307
+ // to create std::function proxy forwarding to original object's Call.
308
+ // Example:
309
+ //
310
+ // TEST(FooTest, RunsCallbackWithBarArgument) {
311
+ // MockFunction<int(string)> callback;
312
+ // EXPECT_CALL(callback, Call("bar")).WillOnce(Return(1));
313
+ // Foo(callback.AsStdFunction());
314
+ // }
315
+ template <typename F>
316
+ class MockFunction;
317
+
318
+
319
+ $for i [[
320
+ $range j 0..i-1
321
+ $var ArgTypes = [[$for j, [[A$j]]]]
322
+ $var ArgValues = [[$for j, [[::std::move(a$j)]]]]
323
+ $var ArgDecls = [[$for j, [[A$j a$j]]]]
324
+ template <typename R$for j [[, typename A$j]]>
325
+ class MockFunction<R($ArgTypes)> {
326
+ public:
327
+ MockFunction() {}
328
+
329
+ MOCK_METHOD$i[[]]_T(Call, R($ArgTypes));
330
+
331
+ #if GTEST_HAS_STD_FUNCTION_
332
+ ::std::function<R($ArgTypes)> AsStdFunction() {
333
+ return [this]($ArgDecls) -> R {
334
+ return this->Call($ArgValues);
335
+ };
336
+ }
337
+ #endif // GTEST_HAS_STD_FUNCTION_
338
+
339
+ private:
340
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
341
+ };
342
+
343
+
344
+ ]]
345
+ } // namespace testing
346
+
347
+ #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
@@ -0,0 +1,2258 @@
1
+ // This file was GENERATED by command:
2
+ // pump.py gmock-generated-matchers.h.pump
3
+ // DO NOT EDIT BY HAND!!!
4
+
5
+ // Copyright 2008, Google Inc.
6
+ // All rights reserved.
7
+ //
8
+ // Redistribution and use in source and binary forms, with or without
9
+ // modification, are permitted provided that the following conditions are
10
+ // met:
11
+ //
12
+ // * Redistributions of source code must retain the above copyright
13
+ // notice, this list of conditions and the following disclaimer.
14
+ // * Redistributions in binary form must reproduce the above
15
+ // copyright notice, this list of conditions and the following disclaimer
16
+ // in the documentation and/or other materials provided with the
17
+ // distribution.
18
+ // * Neither the name of Google Inc. nor the names of its
19
+ // contributors may be used to endorse or promote products derived from
20
+ // this software without specific prior written permission.
21
+ //
22
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
+
34
+ // Google Mock - a framework for writing C++ mock classes.
35
+ //
36
+ // This file implements some commonly used variadic matchers.
37
+
38
+ #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
39
+ #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
40
+
41
+ #include <iterator>
42
+ #include <sstream>
43
+ #include <string>
44
+ #include <vector>
45
+ #include "gmock/gmock-matchers.h"
46
+
47
+ namespace testing {
48
+ namespace internal {
49
+
50
+ // The type of the i-th (0-based) field of Tuple.
51
+ #define GMOCK_FIELD_TYPE_(Tuple, i) \
52
+ typename ::testing::tuple_element<i, Tuple>::type
53
+
54
+ // TupleFields<Tuple, k0, ..., kn> is for selecting fields from a
55
+ // tuple of type Tuple. It has two members:
56
+ //
57
+ // type: a tuple type whose i-th field is the ki-th field of Tuple.
58
+ // GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple.
59
+ //
60
+ // For example, in class TupleFields<tuple<bool, char, int>, 2, 0>, we have:
61
+ //
62
+ // type is tuple<int, bool>, and
63
+ // GetSelectedFields(make_tuple(true, 'a', 42)) is (42, true).
64
+
65
+ template <class Tuple, int k0 = -1, int k1 = -1, int k2 = -1, int k3 = -1,
66
+ int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
67
+ int k9 = -1>
68
+ class TupleFields;
69
+
70
+ // This generic version is used when there are 10 selectors.
71
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
72
+ int k7, int k8, int k9>
73
+ class TupleFields {
74
+ public:
75
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
76
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
77
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
78
+ GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
79
+ GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8),
80
+ GMOCK_FIELD_TYPE_(Tuple, k9)> type;
81
+ static type GetSelectedFields(const Tuple& t) {
82
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
83
+ get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t), get<k9>(t));
84
+ }
85
+ };
86
+
87
+ // The following specialization is used for 0 ~ 9 selectors.
88
+
89
+ template <class Tuple>
90
+ class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
91
+ public:
92
+ typedef ::testing::tuple<> type;
93
+ static type GetSelectedFields(const Tuple& /* t */) {
94
+ return type();
95
+ }
96
+ };
97
+
98
+ template <class Tuple, int k0>
99
+ class TupleFields<Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
100
+ public:
101
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0)> type;
102
+ static type GetSelectedFields(const Tuple& t) {
103
+ return type(get<k0>(t));
104
+ }
105
+ };
106
+
107
+ template <class Tuple, int k0, int k1>
108
+ class TupleFields<Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1> {
109
+ public:
110
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
111
+ GMOCK_FIELD_TYPE_(Tuple, k1)> type;
112
+ static type GetSelectedFields(const Tuple& t) {
113
+ return type(get<k0>(t), get<k1>(t));
114
+ }
115
+ };
116
+
117
+ template <class Tuple, int k0, int k1, int k2>
118
+ class TupleFields<Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1> {
119
+ public:
120
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
121
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2)> type;
122
+ static type GetSelectedFields(const Tuple& t) {
123
+ return type(get<k0>(t), get<k1>(t), get<k2>(t));
124
+ }
125
+ };
126
+
127
+ template <class Tuple, int k0, int k1, int k2, int k3>
128
+ class TupleFields<Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1> {
129
+ public:
130
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
131
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
132
+ GMOCK_FIELD_TYPE_(Tuple, k3)> type;
133
+ static type GetSelectedFields(const Tuple& t) {
134
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t));
135
+ }
136
+ };
137
+
138
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4>
139
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1> {
140
+ public:
141
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
142
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
143
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4)> type;
144
+ static type GetSelectedFields(const Tuple& t) {
145
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t));
146
+ }
147
+ };
148
+
149
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5>
150
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1> {
151
+ public:
152
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
153
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
154
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
155
+ GMOCK_FIELD_TYPE_(Tuple, k5)> type;
156
+ static type GetSelectedFields(const Tuple& t) {
157
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
158
+ get<k5>(t));
159
+ }
160
+ };
161
+
162
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6>
163
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1> {
164
+ public:
165
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
166
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
167
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
168
+ GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6)> type;
169
+ static type GetSelectedFields(const Tuple& t) {
170
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
171
+ get<k5>(t), get<k6>(t));
172
+ }
173
+ };
174
+
175
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
176
+ int k7>
177
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1> {
178
+ public:
179
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
180
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
181
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
182
+ GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
183
+ GMOCK_FIELD_TYPE_(Tuple, k7)> type;
184
+ static type GetSelectedFields(const Tuple& t) {
185
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
186
+ get<k5>(t), get<k6>(t), get<k7>(t));
187
+ }
188
+ };
189
+
190
+ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
191
+ int k7, int k8>
192
+ class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1> {
193
+ public:
194
+ typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
195
+ GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
196
+ GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
197
+ GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
198
+ GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8)> type;
199
+ static type GetSelectedFields(const Tuple& t) {
200
+ return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
201
+ get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t));
202
+ }
203
+ };
204
+
205
+ #undef GMOCK_FIELD_TYPE_
206
+
207
+ // Implements the Args() matcher.
208
+ template <class ArgsTuple, int k0 = -1, int k1 = -1, int k2 = -1, int k3 = -1,
209
+ int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
210
+ int k9 = -1>
211
+ class ArgsMatcherImpl : public MatcherInterface<ArgsTuple> {
212
+ public:
213
+ // ArgsTuple may have top-level const or reference modifiers.
214
+ typedef GTEST_REMOVE_REFERENCE_AND_CONST_(ArgsTuple) RawArgsTuple;
215
+ typedef typename internal::TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5,
216
+ k6, k7, k8, k9>::type SelectedArgs;
217
+ typedef Matcher<const SelectedArgs&> MonomorphicInnerMatcher;
218
+
219
+ template <typename InnerMatcher>
220
+ explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher)
221
+ : inner_matcher_(SafeMatcherCast<const SelectedArgs&>(inner_matcher)) {}
222
+
223
+ virtual bool MatchAndExplain(ArgsTuple args,
224
+ MatchResultListener* listener) const {
225
+ const SelectedArgs& selected_args = GetSelectedArgs(args);
226
+ if (!listener->IsInterested())
227
+ return inner_matcher_.Matches(selected_args);
228
+
229
+ PrintIndices(listener->stream());
230
+ *listener << "are " << PrintToString(selected_args);
231
+
232
+ StringMatchResultListener inner_listener;
233
+ const bool match = inner_matcher_.MatchAndExplain(selected_args,
234
+ &inner_listener);
235
+ PrintIfNotEmpty(inner_listener.str(), listener->stream());
236
+ return match;
237
+ }
238
+
239
+ virtual void DescribeTo(::std::ostream* os) const {
240
+ *os << "are a tuple ";
241
+ PrintIndices(os);
242
+ inner_matcher_.DescribeTo(os);
243
+ }
244
+
245
+ virtual void DescribeNegationTo(::std::ostream* os) const {
246
+ *os << "are a tuple ";
247
+ PrintIndices(os);
248
+ inner_matcher_.DescribeNegationTo(os);
249
+ }
250
+
251
+ private:
252
+ static SelectedArgs GetSelectedArgs(ArgsTuple args) {
253
+ return TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5, k6, k7, k8,
254
+ k9>::GetSelectedFields(args);
255
+ }
256
+
257
+ // Prints the indices of the selected fields.
258
+ static void PrintIndices(::std::ostream* os) {
259
+ *os << "whose fields (";
260
+ const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 };
261
+ for (int i = 0; i < 10; i++) {
262
+ if (indices[i] < 0)
263
+ break;
264
+
265
+ if (i >= 1)
266
+ *os << ", ";
267
+
268
+ *os << "#" << indices[i];
269
+ }
270
+ *os << ") ";
271
+ }
272
+
273
+ const MonomorphicInnerMatcher inner_matcher_;
274
+
275
+ GTEST_DISALLOW_ASSIGN_(ArgsMatcherImpl);
276
+ };
277
+
278
+ template <class InnerMatcher, int k0 = -1, int k1 = -1, int k2 = -1,
279
+ int k3 = -1, int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1,
280
+ int k8 = -1, int k9 = -1>
281
+ class ArgsMatcher {
282
+ public:
283
+ explicit ArgsMatcher(const InnerMatcher& inner_matcher)
284
+ : inner_matcher_(inner_matcher) {}
285
+
286
+ template <typename ArgsTuple>
287
+ operator Matcher<ArgsTuple>() const {
288
+ return MakeMatcher(new ArgsMatcherImpl<ArgsTuple, k0, k1, k2, k3, k4, k5,
289
+ k6, k7, k8, k9>(inner_matcher_));
290
+ }
291
+
292
+ private:
293
+ const InnerMatcher inner_matcher_;
294
+
295
+ GTEST_DISALLOW_ASSIGN_(ArgsMatcher);
296
+ };
297
+
298
+ // A set of metafunctions for computing the result type of AllOf.
299
+ // AllOf(m1, ..., mN) returns
300
+ // AllOfResultN<decltype(m1), ..., decltype(mN)>::type.
301
+
302
+ // Although AllOf isn't defined for one argument, AllOfResult1 is defined
303
+ // to simplify the implementation.
304
+ template <typename M1>
305
+ struct AllOfResult1 {
306
+ typedef M1 type;
307
+ };
308
+
309
+ template <typename M1, typename M2>
310
+ struct AllOfResult2 {
311
+ typedef BothOfMatcher<
312
+ typename AllOfResult1<M1>::type,
313
+ typename AllOfResult1<M2>::type
314
+ > type;
315
+ };
316
+
317
+ template <typename M1, typename M2, typename M3>
318
+ struct AllOfResult3 {
319
+ typedef BothOfMatcher<
320
+ typename AllOfResult1<M1>::type,
321
+ typename AllOfResult2<M2, M3>::type
322
+ > type;
323
+ };
324
+
325
+ template <typename M1, typename M2, typename M3, typename M4>
326
+ struct AllOfResult4 {
327
+ typedef BothOfMatcher<
328
+ typename AllOfResult2<M1, M2>::type,
329
+ typename AllOfResult2<M3, M4>::type
330
+ > type;
331
+ };
332
+
333
+ template <typename M1, typename M2, typename M3, typename M4, typename M5>
334
+ struct AllOfResult5 {
335
+ typedef BothOfMatcher<
336
+ typename AllOfResult2<M1, M2>::type,
337
+ typename AllOfResult3<M3, M4, M5>::type
338
+ > type;
339
+ };
340
+
341
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
342
+ typename M6>
343
+ struct AllOfResult6 {
344
+ typedef BothOfMatcher<
345
+ typename AllOfResult3<M1, M2, M3>::type,
346
+ typename AllOfResult3<M4, M5, M6>::type
347
+ > type;
348
+ };
349
+
350
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
351
+ typename M6, typename M7>
352
+ struct AllOfResult7 {
353
+ typedef BothOfMatcher<
354
+ typename AllOfResult3<M1, M2, M3>::type,
355
+ typename AllOfResult4<M4, M5, M6, M7>::type
356
+ > type;
357
+ };
358
+
359
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
360
+ typename M6, typename M7, typename M8>
361
+ struct AllOfResult8 {
362
+ typedef BothOfMatcher<
363
+ typename AllOfResult4<M1, M2, M3, M4>::type,
364
+ typename AllOfResult4<M5, M6, M7, M8>::type
365
+ > type;
366
+ };
367
+
368
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
369
+ typename M6, typename M7, typename M8, typename M9>
370
+ struct AllOfResult9 {
371
+ typedef BothOfMatcher<
372
+ typename AllOfResult4<M1, M2, M3, M4>::type,
373
+ typename AllOfResult5<M5, M6, M7, M8, M9>::type
374
+ > type;
375
+ };
376
+
377
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
378
+ typename M6, typename M7, typename M8, typename M9, typename M10>
379
+ struct AllOfResult10 {
380
+ typedef BothOfMatcher<
381
+ typename AllOfResult5<M1, M2, M3, M4, M5>::type,
382
+ typename AllOfResult5<M6, M7, M8, M9, M10>::type
383
+ > type;
384
+ };
385
+
386
+ // A set of metafunctions for computing the result type of AnyOf.
387
+ // AnyOf(m1, ..., mN) returns
388
+ // AnyOfResultN<decltype(m1), ..., decltype(mN)>::type.
389
+
390
+ // Although AnyOf isn't defined for one argument, AnyOfResult1 is defined
391
+ // to simplify the implementation.
392
+ template <typename M1>
393
+ struct AnyOfResult1 {
394
+ typedef M1 type;
395
+ };
396
+
397
+ template <typename M1, typename M2>
398
+ struct AnyOfResult2 {
399
+ typedef EitherOfMatcher<
400
+ typename AnyOfResult1<M1>::type,
401
+ typename AnyOfResult1<M2>::type
402
+ > type;
403
+ };
404
+
405
+ template <typename M1, typename M2, typename M3>
406
+ struct AnyOfResult3 {
407
+ typedef EitherOfMatcher<
408
+ typename AnyOfResult1<M1>::type,
409
+ typename AnyOfResult2<M2, M3>::type
410
+ > type;
411
+ };
412
+
413
+ template <typename M1, typename M2, typename M3, typename M4>
414
+ struct AnyOfResult4 {
415
+ typedef EitherOfMatcher<
416
+ typename AnyOfResult2<M1, M2>::type,
417
+ typename AnyOfResult2<M3, M4>::type
418
+ > type;
419
+ };
420
+
421
+ template <typename M1, typename M2, typename M3, typename M4, typename M5>
422
+ struct AnyOfResult5 {
423
+ typedef EitherOfMatcher<
424
+ typename AnyOfResult2<M1, M2>::type,
425
+ typename AnyOfResult3<M3, M4, M5>::type
426
+ > type;
427
+ };
428
+
429
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
430
+ typename M6>
431
+ struct AnyOfResult6 {
432
+ typedef EitherOfMatcher<
433
+ typename AnyOfResult3<M1, M2, M3>::type,
434
+ typename AnyOfResult3<M4, M5, M6>::type
435
+ > type;
436
+ };
437
+
438
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
439
+ typename M6, typename M7>
440
+ struct AnyOfResult7 {
441
+ typedef EitherOfMatcher<
442
+ typename AnyOfResult3<M1, M2, M3>::type,
443
+ typename AnyOfResult4<M4, M5, M6, M7>::type
444
+ > type;
445
+ };
446
+
447
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
448
+ typename M6, typename M7, typename M8>
449
+ struct AnyOfResult8 {
450
+ typedef EitherOfMatcher<
451
+ typename AnyOfResult4<M1, M2, M3, M4>::type,
452
+ typename AnyOfResult4<M5, M6, M7, M8>::type
453
+ > type;
454
+ };
455
+
456
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
457
+ typename M6, typename M7, typename M8, typename M9>
458
+ struct AnyOfResult9 {
459
+ typedef EitherOfMatcher<
460
+ typename AnyOfResult4<M1, M2, M3, M4>::type,
461
+ typename AnyOfResult5<M5, M6, M7, M8, M9>::type
462
+ > type;
463
+ };
464
+
465
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
466
+ typename M6, typename M7, typename M8, typename M9, typename M10>
467
+ struct AnyOfResult10 {
468
+ typedef EitherOfMatcher<
469
+ typename AnyOfResult5<M1, M2, M3, M4, M5>::type,
470
+ typename AnyOfResult5<M6, M7, M8, M9, M10>::type
471
+ > type;
472
+ };
473
+
474
+ } // namespace internal
475
+
476
+ // Args<N1, N2, ..., Nk>(a_matcher) matches a tuple if the selected
477
+ // fields of it matches a_matcher. C++ doesn't support default
478
+ // arguments for function templates, so we have to overload it.
479
+ template <typename InnerMatcher>
480
+ inline internal::ArgsMatcher<InnerMatcher>
481
+ Args(const InnerMatcher& matcher) {
482
+ return internal::ArgsMatcher<InnerMatcher>(matcher);
483
+ }
484
+
485
+ template <int k1, typename InnerMatcher>
486
+ inline internal::ArgsMatcher<InnerMatcher, k1>
487
+ Args(const InnerMatcher& matcher) {
488
+ return internal::ArgsMatcher<InnerMatcher, k1>(matcher);
489
+ }
490
+
491
+ template <int k1, int k2, typename InnerMatcher>
492
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2>
493
+ Args(const InnerMatcher& matcher) {
494
+ return internal::ArgsMatcher<InnerMatcher, k1, k2>(matcher);
495
+ }
496
+
497
+ template <int k1, int k2, int k3, typename InnerMatcher>
498
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3>
499
+ Args(const InnerMatcher& matcher) {
500
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3>(matcher);
501
+ }
502
+
503
+ template <int k1, int k2, int k3, int k4, typename InnerMatcher>
504
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4>
505
+ Args(const InnerMatcher& matcher) {
506
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4>(matcher);
507
+ }
508
+
509
+ template <int k1, int k2, int k3, int k4, int k5, typename InnerMatcher>
510
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5>
511
+ Args(const InnerMatcher& matcher) {
512
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5>(matcher);
513
+ }
514
+
515
+ template <int k1, int k2, int k3, int k4, int k5, int k6, typename InnerMatcher>
516
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6>
517
+ Args(const InnerMatcher& matcher) {
518
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6>(matcher);
519
+ }
520
+
521
+ template <int k1, int k2, int k3, int k4, int k5, int k6, int k7,
522
+ typename InnerMatcher>
523
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7>
524
+ Args(const InnerMatcher& matcher) {
525
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6,
526
+ k7>(matcher);
527
+ }
528
+
529
+ template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
530
+ typename InnerMatcher>
531
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8>
532
+ Args(const InnerMatcher& matcher) {
533
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7,
534
+ k8>(matcher);
535
+ }
536
+
537
+ template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
538
+ int k9, typename InnerMatcher>
539
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9>
540
+ Args(const InnerMatcher& matcher) {
541
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8,
542
+ k9>(matcher);
543
+ }
544
+
545
+ template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
546
+ int k9, int k10, typename InnerMatcher>
547
+ inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9,
548
+ k10>
549
+ Args(const InnerMatcher& matcher) {
550
+ return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8,
551
+ k9, k10>(matcher);
552
+ }
553
+
554
+ // ElementsAre(e_1, e_2, ... e_n) matches an STL-style container with
555
+ // n elements, where the i-th element in the container must
556
+ // match the i-th argument in the list. Each argument of
557
+ // ElementsAre() can be either a value or a matcher. We support up to
558
+ // 10 arguments.
559
+ //
560
+ // The use of DecayArray in the implementation allows ElementsAre()
561
+ // to accept string literals, whose type is const char[N], but we
562
+ // want to treat them as const char*.
563
+ //
564
+ // NOTE: Since ElementsAre() cares about the order of the elements, it
565
+ // must not be used with containers whose elements's order is
566
+ // undefined (e.g. hash_map).
567
+
568
+ inline internal::ElementsAreMatcher<
569
+ ::testing::tuple<> >
570
+ ElementsAre() {
571
+ typedef ::testing::tuple<> Args;
572
+ return internal::ElementsAreMatcher<Args>(Args());
573
+ }
574
+
575
+ template <typename T1>
576
+ inline internal::ElementsAreMatcher<
577
+ ::testing::tuple<
578
+ typename internal::DecayArray<T1>::type> >
579
+ ElementsAre(const T1& e1) {
580
+ typedef ::testing::tuple<
581
+ typename internal::DecayArray<T1>::type> Args;
582
+ return internal::ElementsAreMatcher<Args>(Args(e1));
583
+ }
584
+
585
+ template <typename T1, typename T2>
586
+ inline internal::ElementsAreMatcher<
587
+ ::testing::tuple<
588
+ typename internal::DecayArray<T1>::type,
589
+ typename internal::DecayArray<T2>::type> >
590
+ ElementsAre(const T1& e1, const T2& e2) {
591
+ typedef ::testing::tuple<
592
+ typename internal::DecayArray<T1>::type,
593
+ typename internal::DecayArray<T2>::type> Args;
594
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2));
595
+ }
596
+
597
+ template <typename T1, typename T2, typename T3>
598
+ inline internal::ElementsAreMatcher<
599
+ ::testing::tuple<
600
+ typename internal::DecayArray<T1>::type,
601
+ typename internal::DecayArray<T2>::type,
602
+ typename internal::DecayArray<T3>::type> >
603
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3) {
604
+ typedef ::testing::tuple<
605
+ typename internal::DecayArray<T1>::type,
606
+ typename internal::DecayArray<T2>::type,
607
+ typename internal::DecayArray<T3>::type> Args;
608
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3));
609
+ }
610
+
611
+ template <typename T1, typename T2, typename T3, typename T4>
612
+ inline internal::ElementsAreMatcher<
613
+ ::testing::tuple<
614
+ typename internal::DecayArray<T1>::type,
615
+ typename internal::DecayArray<T2>::type,
616
+ typename internal::DecayArray<T3>::type,
617
+ typename internal::DecayArray<T4>::type> >
618
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
619
+ typedef ::testing::tuple<
620
+ typename internal::DecayArray<T1>::type,
621
+ typename internal::DecayArray<T2>::type,
622
+ typename internal::DecayArray<T3>::type,
623
+ typename internal::DecayArray<T4>::type> Args;
624
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4));
625
+ }
626
+
627
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
628
+ inline internal::ElementsAreMatcher<
629
+ ::testing::tuple<
630
+ typename internal::DecayArray<T1>::type,
631
+ typename internal::DecayArray<T2>::type,
632
+ typename internal::DecayArray<T3>::type,
633
+ typename internal::DecayArray<T4>::type,
634
+ typename internal::DecayArray<T5>::type> >
635
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
636
+ const T5& e5) {
637
+ typedef ::testing::tuple<
638
+ typename internal::DecayArray<T1>::type,
639
+ typename internal::DecayArray<T2>::type,
640
+ typename internal::DecayArray<T3>::type,
641
+ typename internal::DecayArray<T4>::type,
642
+ typename internal::DecayArray<T5>::type> Args;
643
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5));
644
+ }
645
+
646
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
647
+ typename T6>
648
+ inline internal::ElementsAreMatcher<
649
+ ::testing::tuple<
650
+ typename internal::DecayArray<T1>::type,
651
+ typename internal::DecayArray<T2>::type,
652
+ typename internal::DecayArray<T3>::type,
653
+ typename internal::DecayArray<T4>::type,
654
+ typename internal::DecayArray<T5>::type,
655
+ typename internal::DecayArray<T6>::type> >
656
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
657
+ const T5& e5, const T6& e6) {
658
+ typedef ::testing::tuple<
659
+ typename internal::DecayArray<T1>::type,
660
+ typename internal::DecayArray<T2>::type,
661
+ typename internal::DecayArray<T3>::type,
662
+ typename internal::DecayArray<T4>::type,
663
+ typename internal::DecayArray<T5>::type,
664
+ typename internal::DecayArray<T6>::type> Args;
665
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6));
666
+ }
667
+
668
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
669
+ typename T6, typename T7>
670
+ inline internal::ElementsAreMatcher<
671
+ ::testing::tuple<
672
+ typename internal::DecayArray<T1>::type,
673
+ typename internal::DecayArray<T2>::type,
674
+ typename internal::DecayArray<T3>::type,
675
+ typename internal::DecayArray<T4>::type,
676
+ typename internal::DecayArray<T5>::type,
677
+ typename internal::DecayArray<T6>::type,
678
+ typename internal::DecayArray<T7>::type> >
679
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
680
+ const T5& e5, const T6& e6, const T7& e7) {
681
+ typedef ::testing::tuple<
682
+ typename internal::DecayArray<T1>::type,
683
+ typename internal::DecayArray<T2>::type,
684
+ typename internal::DecayArray<T3>::type,
685
+ typename internal::DecayArray<T4>::type,
686
+ typename internal::DecayArray<T5>::type,
687
+ typename internal::DecayArray<T6>::type,
688
+ typename internal::DecayArray<T7>::type> Args;
689
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6, e7));
690
+ }
691
+
692
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
693
+ typename T6, typename T7, typename T8>
694
+ inline internal::ElementsAreMatcher<
695
+ ::testing::tuple<
696
+ typename internal::DecayArray<T1>::type,
697
+ typename internal::DecayArray<T2>::type,
698
+ typename internal::DecayArray<T3>::type,
699
+ typename internal::DecayArray<T4>::type,
700
+ typename internal::DecayArray<T5>::type,
701
+ typename internal::DecayArray<T6>::type,
702
+ typename internal::DecayArray<T7>::type,
703
+ typename internal::DecayArray<T8>::type> >
704
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
705
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
706
+ typedef ::testing::tuple<
707
+ typename internal::DecayArray<T1>::type,
708
+ typename internal::DecayArray<T2>::type,
709
+ typename internal::DecayArray<T3>::type,
710
+ typename internal::DecayArray<T4>::type,
711
+ typename internal::DecayArray<T5>::type,
712
+ typename internal::DecayArray<T6>::type,
713
+ typename internal::DecayArray<T7>::type,
714
+ typename internal::DecayArray<T8>::type> Args;
715
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6, e7,
716
+ e8));
717
+ }
718
+
719
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
720
+ typename T6, typename T7, typename T8, typename T9>
721
+ inline internal::ElementsAreMatcher<
722
+ ::testing::tuple<
723
+ typename internal::DecayArray<T1>::type,
724
+ typename internal::DecayArray<T2>::type,
725
+ typename internal::DecayArray<T3>::type,
726
+ typename internal::DecayArray<T4>::type,
727
+ typename internal::DecayArray<T5>::type,
728
+ typename internal::DecayArray<T6>::type,
729
+ typename internal::DecayArray<T7>::type,
730
+ typename internal::DecayArray<T8>::type,
731
+ typename internal::DecayArray<T9>::type> >
732
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
733
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
734
+ typedef ::testing::tuple<
735
+ typename internal::DecayArray<T1>::type,
736
+ typename internal::DecayArray<T2>::type,
737
+ typename internal::DecayArray<T3>::type,
738
+ typename internal::DecayArray<T4>::type,
739
+ typename internal::DecayArray<T5>::type,
740
+ typename internal::DecayArray<T6>::type,
741
+ typename internal::DecayArray<T7>::type,
742
+ typename internal::DecayArray<T8>::type,
743
+ typename internal::DecayArray<T9>::type> Args;
744
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6, e7,
745
+ e8, e9));
746
+ }
747
+
748
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
749
+ typename T6, typename T7, typename T8, typename T9, typename T10>
750
+ inline internal::ElementsAreMatcher<
751
+ ::testing::tuple<
752
+ typename internal::DecayArray<T1>::type,
753
+ typename internal::DecayArray<T2>::type,
754
+ typename internal::DecayArray<T3>::type,
755
+ typename internal::DecayArray<T4>::type,
756
+ typename internal::DecayArray<T5>::type,
757
+ typename internal::DecayArray<T6>::type,
758
+ typename internal::DecayArray<T7>::type,
759
+ typename internal::DecayArray<T8>::type,
760
+ typename internal::DecayArray<T9>::type,
761
+ typename internal::DecayArray<T10>::type> >
762
+ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
763
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
764
+ const T10& e10) {
765
+ typedef ::testing::tuple<
766
+ typename internal::DecayArray<T1>::type,
767
+ typename internal::DecayArray<T2>::type,
768
+ typename internal::DecayArray<T3>::type,
769
+ typename internal::DecayArray<T4>::type,
770
+ typename internal::DecayArray<T5>::type,
771
+ typename internal::DecayArray<T6>::type,
772
+ typename internal::DecayArray<T7>::type,
773
+ typename internal::DecayArray<T8>::type,
774
+ typename internal::DecayArray<T9>::type,
775
+ typename internal::DecayArray<T10>::type> Args;
776
+ return internal::ElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5, e6, e7,
777
+ e8, e9, e10));
778
+ }
779
+
780
+ // UnorderedElementsAre(e_1, e_2, ..., e_n) is an ElementsAre extension
781
+ // that matches n elements in any order. We support up to n=10 arguments.
782
+ //
783
+ // If you have >10 elements, consider UnorderedElementsAreArray() or
784
+ // UnorderedPointwise() instead.
785
+
786
+ inline internal::UnorderedElementsAreMatcher<
787
+ ::testing::tuple<> >
788
+ UnorderedElementsAre() {
789
+ typedef ::testing::tuple<> Args;
790
+ return internal::UnorderedElementsAreMatcher<Args>(Args());
791
+ }
792
+
793
+ template <typename T1>
794
+ inline internal::UnorderedElementsAreMatcher<
795
+ ::testing::tuple<
796
+ typename internal::DecayArray<T1>::type> >
797
+ UnorderedElementsAre(const T1& e1) {
798
+ typedef ::testing::tuple<
799
+ typename internal::DecayArray<T1>::type> Args;
800
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1));
801
+ }
802
+
803
+ template <typename T1, typename T2>
804
+ inline internal::UnorderedElementsAreMatcher<
805
+ ::testing::tuple<
806
+ typename internal::DecayArray<T1>::type,
807
+ typename internal::DecayArray<T2>::type> >
808
+ UnorderedElementsAre(const T1& e1, const T2& e2) {
809
+ typedef ::testing::tuple<
810
+ typename internal::DecayArray<T1>::type,
811
+ typename internal::DecayArray<T2>::type> Args;
812
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2));
813
+ }
814
+
815
+ template <typename T1, typename T2, typename T3>
816
+ inline internal::UnorderedElementsAreMatcher<
817
+ ::testing::tuple<
818
+ typename internal::DecayArray<T1>::type,
819
+ typename internal::DecayArray<T2>::type,
820
+ typename internal::DecayArray<T3>::type> >
821
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3) {
822
+ typedef ::testing::tuple<
823
+ typename internal::DecayArray<T1>::type,
824
+ typename internal::DecayArray<T2>::type,
825
+ typename internal::DecayArray<T3>::type> Args;
826
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3));
827
+ }
828
+
829
+ template <typename T1, typename T2, typename T3, typename T4>
830
+ inline internal::UnorderedElementsAreMatcher<
831
+ ::testing::tuple<
832
+ typename internal::DecayArray<T1>::type,
833
+ typename internal::DecayArray<T2>::type,
834
+ typename internal::DecayArray<T3>::type,
835
+ typename internal::DecayArray<T4>::type> >
836
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
837
+ typedef ::testing::tuple<
838
+ typename internal::DecayArray<T1>::type,
839
+ typename internal::DecayArray<T2>::type,
840
+ typename internal::DecayArray<T3>::type,
841
+ typename internal::DecayArray<T4>::type> Args;
842
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4));
843
+ }
844
+
845
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
846
+ inline internal::UnorderedElementsAreMatcher<
847
+ ::testing::tuple<
848
+ typename internal::DecayArray<T1>::type,
849
+ typename internal::DecayArray<T2>::type,
850
+ typename internal::DecayArray<T3>::type,
851
+ typename internal::DecayArray<T4>::type,
852
+ typename internal::DecayArray<T5>::type> >
853
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
854
+ const T5& e5) {
855
+ typedef ::testing::tuple<
856
+ typename internal::DecayArray<T1>::type,
857
+ typename internal::DecayArray<T2>::type,
858
+ typename internal::DecayArray<T3>::type,
859
+ typename internal::DecayArray<T4>::type,
860
+ typename internal::DecayArray<T5>::type> Args;
861
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5));
862
+ }
863
+
864
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
865
+ typename T6>
866
+ inline internal::UnorderedElementsAreMatcher<
867
+ ::testing::tuple<
868
+ typename internal::DecayArray<T1>::type,
869
+ typename internal::DecayArray<T2>::type,
870
+ typename internal::DecayArray<T3>::type,
871
+ typename internal::DecayArray<T4>::type,
872
+ typename internal::DecayArray<T5>::type,
873
+ typename internal::DecayArray<T6>::type> >
874
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
875
+ const T5& e5, const T6& e6) {
876
+ typedef ::testing::tuple<
877
+ typename internal::DecayArray<T1>::type,
878
+ typename internal::DecayArray<T2>::type,
879
+ typename internal::DecayArray<T3>::type,
880
+ typename internal::DecayArray<T4>::type,
881
+ typename internal::DecayArray<T5>::type,
882
+ typename internal::DecayArray<T6>::type> Args;
883
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
884
+ e6));
885
+ }
886
+
887
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
888
+ typename T6, typename T7>
889
+ inline internal::UnorderedElementsAreMatcher<
890
+ ::testing::tuple<
891
+ typename internal::DecayArray<T1>::type,
892
+ typename internal::DecayArray<T2>::type,
893
+ typename internal::DecayArray<T3>::type,
894
+ typename internal::DecayArray<T4>::type,
895
+ typename internal::DecayArray<T5>::type,
896
+ typename internal::DecayArray<T6>::type,
897
+ typename internal::DecayArray<T7>::type> >
898
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
899
+ const T5& e5, const T6& e6, const T7& e7) {
900
+ typedef ::testing::tuple<
901
+ typename internal::DecayArray<T1>::type,
902
+ typename internal::DecayArray<T2>::type,
903
+ typename internal::DecayArray<T3>::type,
904
+ typename internal::DecayArray<T4>::type,
905
+ typename internal::DecayArray<T5>::type,
906
+ typename internal::DecayArray<T6>::type,
907
+ typename internal::DecayArray<T7>::type> Args;
908
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
909
+ e6, e7));
910
+ }
911
+
912
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
913
+ typename T6, typename T7, typename T8>
914
+ inline internal::UnorderedElementsAreMatcher<
915
+ ::testing::tuple<
916
+ typename internal::DecayArray<T1>::type,
917
+ typename internal::DecayArray<T2>::type,
918
+ typename internal::DecayArray<T3>::type,
919
+ typename internal::DecayArray<T4>::type,
920
+ typename internal::DecayArray<T5>::type,
921
+ typename internal::DecayArray<T6>::type,
922
+ typename internal::DecayArray<T7>::type,
923
+ typename internal::DecayArray<T8>::type> >
924
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
925
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
926
+ typedef ::testing::tuple<
927
+ typename internal::DecayArray<T1>::type,
928
+ typename internal::DecayArray<T2>::type,
929
+ typename internal::DecayArray<T3>::type,
930
+ typename internal::DecayArray<T4>::type,
931
+ typename internal::DecayArray<T5>::type,
932
+ typename internal::DecayArray<T6>::type,
933
+ typename internal::DecayArray<T7>::type,
934
+ typename internal::DecayArray<T8>::type> Args;
935
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
936
+ e6, e7, e8));
937
+ }
938
+
939
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
940
+ typename T6, typename T7, typename T8, typename T9>
941
+ inline internal::UnorderedElementsAreMatcher<
942
+ ::testing::tuple<
943
+ typename internal::DecayArray<T1>::type,
944
+ typename internal::DecayArray<T2>::type,
945
+ typename internal::DecayArray<T3>::type,
946
+ typename internal::DecayArray<T4>::type,
947
+ typename internal::DecayArray<T5>::type,
948
+ typename internal::DecayArray<T6>::type,
949
+ typename internal::DecayArray<T7>::type,
950
+ typename internal::DecayArray<T8>::type,
951
+ typename internal::DecayArray<T9>::type> >
952
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
953
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
954
+ typedef ::testing::tuple<
955
+ typename internal::DecayArray<T1>::type,
956
+ typename internal::DecayArray<T2>::type,
957
+ typename internal::DecayArray<T3>::type,
958
+ typename internal::DecayArray<T4>::type,
959
+ typename internal::DecayArray<T5>::type,
960
+ typename internal::DecayArray<T6>::type,
961
+ typename internal::DecayArray<T7>::type,
962
+ typename internal::DecayArray<T8>::type,
963
+ typename internal::DecayArray<T9>::type> Args;
964
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
965
+ e6, e7, e8, e9));
966
+ }
967
+
968
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
969
+ typename T6, typename T7, typename T8, typename T9, typename T10>
970
+ inline internal::UnorderedElementsAreMatcher<
971
+ ::testing::tuple<
972
+ typename internal::DecayArray<T1>::type,
973
+ typename internal::DecayArray<T2>::type,
974
+ typename internal::DecayArray<T3>::type,
975
+ typename internal::DecayArray<T4>::type,
976
+ typename internal::DecayArray<T5>::type,
977
+ typename internal::DecayArray<T6>::type,
978
+ typename internal::DecayArray<T7>::type,
979
+ typename internal::DecayArray<T8>::type,
980
+ typename internal::DecayArray<T9>::type,
981
+ typename internal::DecayArray<T10>::type> >
982
+ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
983
+ const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
984
+ const T10& e10) {
985
+ typedef ::testing::tuple<
986
+ typename internal::DecayArray<T1>::type,
987
+ typename internal::DecayArray<T2>::type,
988
+ typename internal::DecayArray<T3>::type,
989
+ typename internal::DecayArray<T4>::type,
990
+ typename internal::DecayArray<T5>::type,
991
+ typename internal::DecayArray<T6>::type,
992
+ typename internal::DecayArray<T7>::type,
993
+ typename internal::DecayArray<T8>::type,
994
+ typename internal::DecayArray<T9>::type,
995
+ typename internal::DecayArray<T10>::type> Args;
996
+ return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2, e3, e4, e5,
997
+ e6, e7, e8, e9, e10));
998
+ }
999
+
1000
+ // AllOf(m1, m2, ..., mk) matches any value that matches all of the given
1001
+ // sub-matchers. AllOf is called fully qualified to prevent ADL from firing.
1002
+
1003
+ template <typename M1, typename M2>
1004
+ inline typename internal::AllOfResult2<M1, M2>::type
1005
+ AllOf(M1 m1, M2 m2) {
1006
+ return typename internal::AllOfResult2<M1, M2>::type(
1007
+ m1,
1008
+ m2);
1009
+ }
1010
+
1011
+ template <typename M1, typename M2, typename M3>
1012
+ inline typename internal::AllOfResult3<M1, M2, M3>::type
1013
+ AllOf(M1 m1, M2 m2, M3 m3) {
1014
+ return typename internal::AllOfResult3<M1, M2, M3>::type(
1015
+ m1,
1016
+ ::testing::AllOf(m2, m3));
1017
+ }
1018
+
1019
+ template <typename M1, typename M2, typename M3, typename M4>
1020
+ inline typename internal::AllOfResult4<M1, M2, M3, M4>::type
1021
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4) {
1022
+ return typename internal::AllOfResult4<M1, M2, M3, M4>::type(
1023
+ ::testing::AllOf(m1, m2),
1024
+ ::testing::AllOf(m3, m4));
1025
+ }
1026
+
1027
+ template <typename M1, typename M2, typename M3, typename M4, typename M5>
1028
+ inline typename internal::AllOfResult5<M1, M2, M3, M4, M5>::type
1029
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5) {
1030
+ return typename internal::AllOfResult5<M1, M2, M3, M4, M5>::type(
1031
+ ::testing::AllOf(m1, m2),
1032
+ ::testing::AllOf(m3, m4, m5));
1033
+ }
1034
+
1035
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1036
+ typename M6>
1037
+ inline typename internal::AllOfResult6<M1, M2, M3, M4, M5, M6>::type
1038
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6) {
1039
+ return typename internal::AllOfResult6<M1, M2, M3, M4, M5, M6>::type(
1040
+ ::testing::AllOf(m1, m2, m3),
1041
+ ::testing::AllOf(m4, m5, m6));
1042
+ }
1043
+
1044
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1045
+ typename M6, typename M7>
1046
+ inline typename internal::AllOfResult7<M1, M2, M3, M4, M5, M6, M7>::type
1047
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7) {
1048
+ return typename internal::AllOfResult7<M1, M2, M3, M4, M5, M6, M7>::type(
1049
+ ::testing::AllOf(m1, m2, m3),
1050
+ ::testing::AllOf(m4, m5, m6, m7));
1051
+ }
1052
+
1053
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1054
+ typename M6, typename M7, typename M8>
1055
+ inline typename internal::AllOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type
1056
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8) {
1057
+ return typename internal::AllOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type(
1058
+ ::testing::AllOf(m1, m2, m3, m4),
1059
+ ::testing::AllOf(m5, m6, m7, m8));
1060
+ }
1061
+
1062
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1063
+ typename M6, typename M7, typename M8, typename M9>
1064
+ inline typename internal::AllOfResult9<M1, M2, M3, M4, M5, M6, M7, M8, M9>::type
1065
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9) {
1066
+ return typename internal::AllOfResult9<M1, M2, M3, M4, M5, M6, M7, M8,
1067
+ M9>::type(
1068
+ ::testing::AllOf(m1, m2, m3, m4),
1069
+ ::testing::AllOf(m5, m6, m7, m8, m9));
1070
+ }
1071
+
1072
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1073
+ typename M6, typename M7, typename M8, typename M9, typename M10>
1074
+ inline typename internal::AllOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1075
+ M10>::type
1076
+ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1077
+ return typename internal::AllOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1078
+ M10>::type(
1079
+ ::testing::AllOf(m1, m2, m3, m4, m5),
1080
+ ::testing::AllOf(m6, m7, m8, m9, m10));
1081
+ }
1082
+
1083
+ // AnyOf(m1, m2, ..., mk) matches any value that matches any of the given
1084
+ // sub-matchers. AnyOf is called fully qualified to prevent ADL from firing.
1085
+
1086
+ template <typename M1, typename M2>
1087
+ inline typename internal::AnyOfResult2<M1, M2>::type
1088
+ AnyOf(M1 m1, M2 m2) {
1089
+ return typename internal::AnyOfResult2<M1, M2>::type(
1090
+ m1,
1091
+ m2);
1092
+ }
1093
+
1094
+ template <typename M1, typename M2, typename M3>
1095
+ inline typename internal::AnyOfResult3<M1, M2, M3>::type
1096
+ AnyOf(M1 m1, M2 m2, M3 m3) {
1097
+ return typename internal::AnyOfResult3<M1, M2, M3>::type(
1098
+ m1,
1099
+ ::testing::AnyOf(m2, m3));
1100
+ }
1101
+
1102
+ template <typename M1, typename M2, typename M3, typename M4>
1103
+ inline typename internal::AnyOfResult4<M1, M2, M3, M4>::type
1104
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4) {
1105
+ return typename internal::AnyOfResult4<M1, M2, M3, M4>::type(
1106
+ ::testing::AnyOf(m1, m2),
1107
+ ::testing::AnyOf(m3, m4));
1108
+ }
1109
+
1110
+ template <typename M1, typename M2, typename M3, typename M4, typename M5>
1111
+ inline typename internal::AnyOfResult5<M1, M2, M3, M4, M5>::type
1112
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5) {
1113
+ return typename internal::AnyOfResult5<M1, M2, M3, M4, M5>::type(
1114
+ ::testing::AnyOf(m1, m2),
1115
+ ::testing::AnyOf(m3, m4, m5));
1116
+ }
1117
+
1118
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1119
+ typename M6>
1120
+ inline typename internal::AnyOfResult6<M1, M2, M3, M4, M5, M6>::type
1121
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6) {
1122
+ return typename internal::AnyOfResult6<M1, M2, M3, M4, M5, M6>::type(
1123
+ ::testing::AnyOf(m1, m2, m3),
1124
+ ::testing::AnyOf(m4, m5, m6));
1125
+ }
1126
+
1127
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1128
+ typename M6, typename M7>
1129
+ inline typename internal::AnyOfResult7<M1, M2, M3, M4, M5, M6, M7>::type
1130
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7) {
1131
+ return typename internal::AnyOfResult7<M1, M2, M3, M4, M5, M6, M7>::type(
1132
+ ::testing::AnyOf(m1, m2, m3),
1133
+ ::testing::AnyOf(m4, m5, m6, m7));
1134
+ }
1135
+
1136
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1137
+ typename M6, typename M7, typename M8>
1138
+ inline typename internal::AnyOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type
1139
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8) {
1140
+ return typename internal::AnyOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type(
1141
+ ::testing::AnyOf(m1, m2, m3, m4),
1142
+ ::testing::AnyOf(m5, m6, m7, m8));
1143
+ }
1144
+
1145
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1146
+ typename M6, typename M7, typename M8, typename M9>
1147
+ inline typename internal::AnyOfResult9<M1, M2, M3, M4, M5, M6, M7, M8, M9>::type
1148
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9) {
1149
+ return typename internal::AnyOfResult9<M1, M2, M3, M4, M5, M6, M7, M8,
1150
+ M9>::type(
1151
+ ::testing::AnyOf(m1, m2, m3, m4),
1152
+ ::testing::AnyOf(m5, m6, m7, m8, m9));
1153
+ }
1154
+
1155
+ template <typename M1, typename M2, typename M3, typename M4, typename M5,
1156
+ typename M6, typename M7, typename M8, typename M9, typename M10>
1157
+ inline typename internal::AnyOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1158
+ M10>::type
1159
+ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1160
+ return typename internal::AnyOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1161
+ M10>::type(
1162
+ ::testing::AnyOf(m1, m2, m3, m4, m5),
1163
+ ::testing::AnyOf(m6, m7, m8, m9, m10));
1164
+ }
1165
+
1166
+ } // namespace testing
1167
+
1168
+
1169
+ // The MATCHER* family of macros can be used in a namespace scope to
1170
+ // define custom matchers easily.
1171
+ //
1172
+ // Basic Usage
1173
+ // ===========
1174
+ //
1175
+ // The syntax
1176
+ //
1177
+ // MATCHER(name, description_string) { statements; }
1178
+ //
1179
+ // defines a matcher with the given name that executes the statements,
1180
+ // which must return a bool to indicate if the match succeeds. Inside
1181
+ // the statements, you can refer to the value being matched by 'arg',
1182
+ // and refer to its type by 'arg_type'.
1183
+ //
1184
+ // The description string documents what the matcher does, and is used
1185
+ // to generate the failure message when the match fails. Since a
1186
+ // MATCHER() is usually defined in a header file shared by multiple
1187
+ // C++ source files, we require the description to be a C-string
1188
+ // literal to avoid possible side effects. It can be empty, in which
1189
+ // case we'll use the sequence of words in the matcher name as the
1190
+ // description.
1191
+ //
1192
+ // For example:
1193
+ //
1194
+ // MATCHER(IsEven, "") { return (arg % 2) == 0; }
1195
+ //
1196
+ // allows you to write
1197
+ //
1198
+ // // Expects mock_foo.Bar(n) to be called where n is even.
1199
+ // EXPECT_CALL(mock_foo, Bar(IsEven()));
1200
+ //
1201
+ // or,
1202
+ //
1203
+ // // Verifies that the value of some_expression is even.
1204
+ // EXPECT_THAT(some_expression, IsEven());
1205
+ //
1206
+ // If the above assertion fails, it will print something like:
1207
+ //
1208
+ // Value of: some_expression
1209
+ // Expected: is even
1210
+ // Actual: 7
1211
+ //
1212
+ // where the description "is even" is automatically calculated from the
1213
+ // matcher name IsEven.
1214
+ //
1215
+ // Argument Type
1216
+ // =============
1217
+ //
1218
+ // Note that the type of the value being matched (arg_type) is
1219
+ // determined by the context in which you use the matcher and is
1220
+ // supplied to you by the compiler, so you don't need to worry about
1221
+ // declaring it (nor can you). This allows the matcher to be
1222
+ // polymorphic. For example, IsEven() can be used to match any type
1223
+ // where the value of "(arg % 2) == 0" can be implicitly converted to
1224
+ // a bool. In the "Bar(IsEven())" example above, if method Bar()
1225
+ // takes an int, 'arg_type' will be int; if it takes an unsigned long,
1226
+ // 'arg_type' will be unsigned long; and so on.
1227
+ //
1228
+ // Parameterizing Matchers
1229
+ // =======================
1230
+ //
1231
+ // Sometimes you'll want to parameterize the matcher. For that you
1232
+ // can use another macro:
1233
+ //
1234
+ // MATCHER_P(name, param_name, description_string) { statements; }
1235
+ //
1236
+ // For example:
1237
+ //
1238
+ // MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; }
1239
+ //
1240
+ // will allow you to write:
1241
+ //
1242
+ // EXPECT_THAT(Blah("a"), HasAbsoluteValue(n));
1243
+ //
1244
+ // which may lead to this message (assuming n is 10):
1245
+ //
1246
+ // Value of: Blah("a")
1247
+ // Expected: has absolute value 10
1248
+ // Actual: -9
1249
+ //
1250
+ // Note that both the matcher description and its parameter are
1251
+ // printed, making the message human-friendly.
1252
+ //
1253
+ // In the matcher definition body, you can write 'foo_type' to
1254
+ // reference the type of a parameter named 'foo'. For example, in the
1255
+ // body of MATCHER_P(HasAbsoluteValue, value) above, you can write
1256
+ // 'value_type' to refer to the type of 'value'.
1257
+ //
1258
+ // We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P10 to
1259
+ // support multi-parameter matchers.
1260
+ //
1261
+ // Describing Parameterized Matchers
1262
+ // =================================
1263
+ //
1264
+ // The last argument to MATCHER*() is a string-typed expression. The
1265
+ // expression can reference all of the matcher's parameters and a
1266
+ // special bool-typed variable named 'negation'. When 'negation' is
1267
+ // false, the expression should evaluate to the matcher's description;
1268
+ // otherwise it should evaluate to the description of the negation of
1269
+ // the matcher. For example,
1270
+ //
1271
+ // using testing::PrintToString;
1272
+ //
1273
+ // MATCHER_P2(InClosedRange, low, hi,
1274
+ // std::string(negation ? "is not" : "is") + " in range [" +
1275
+ // PrintToString(low) + ", " + PrintToString(hi) + "]") {
1276
+ // return low <= arg && arg <= hi;
1277
+ // }
1278
+ // ...
1279
+ // EXPECT_THAT(3, InClosedRange(4, 6));
1280
+ // EXPECT_THAT(3, Not(InClosedRange(2, 4)));
1281
+ //
1282
+ // would generate two failures that contain the text:
1283
+ //
1284
+ // Expected: is in range [4, 6]
1285
+ // ...
1286
+ // Expected: is not in range [2, 4]
1287
+ //
1288
+ // If you specify "" as the description, the failure message will
1289
+ // contain the sequence of words in the matcher name followed by the
1290
+ // parameter values printed as a tuple. For example,
1291
+ //
1292
+ // MATCHER_P2(InClosedRange, low, hi, "") { ... }
1293
+ // ...
1294
+ // EXPECT_THAT(3, InClosedRange(4, 6));
1295
+ // EXPECT_THAT(3, Not(InClosedRange(2, 4)));
1296
+ //
1297
+ // would generate two failures that contain the text:
1298
+ //
1299
+ // Expected: in closed range (4, 6)
1300
+ // ...
1301
+ // Expected: not (in closed range (2, 4))
1302
+ //
1303
+ // Types of Matcher Parameters
1304
+ // ===========================
1305
+ //
1306
+ // For the purpose of typing, you can view
1307
+ //
1308
+ // MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... }
1309
+ //
1310
+ // as shorthand for
1311
+ //
1312
+ // template <typename p1_type, ..., typename pk_type>
1313
+ // FooMatcherPk<p1_type, ..., pk_type>
1314
+ // Foo(p1_type p1, ..., pk_type pk) { ... }
1315
+ //
1316
+ // When you write Foo(v1, ..., vk), the compiler infers the types of
1317
+ // the parameters v1, ..., and vk for you. If you are not happy with
1318
+ // the result of the type inference, you can specify the types by
1319
+ // explicitly instantiating the template, as in Foo<long, bool>(5,
1320
+ // false). As said earlier, you don't get to (or need to) specify
1321
+ // 'arg_type' as that's determined by the context in which the matcher
1322
+ // is used. You can assign the result of expression Foo(p1, ..., pk)
1323
+ // to a variable of type FooMatcherPk<p1_type, ..., pk_type>. This
1324
+ // can be useful when composing matchers.
1325
+ //
1326
+ // While you can instantiate a matcher template with reference types,
1327
+ // passing the parameters by pointer usually makes your code more
1328
+ // readable. If, however, you still want to pass a parameter by
1329
+ // reference, be aware that in the failure message generated by the
1330
+ // matcher you will see the value of the referenced object but not its
1331
+ // address.
1332
+ //
1333
+ // Explaining Match Results
1334
+ // ========================
1335
+ //
1336
+ // Sometimes the matcher description alone isn't enough to explain why
1337
+ // the match has failed or succeeded. For example, when expecting a
1338
+ // long string, it can be very helpful to also print the diff between
1339
+ // the expected string and the actual one. To achieve that, you can
1340
+ // optionally stream additional information to a special variable
1341
+ // named result_listener, whose type is a pointer to class
1342
+ // MatchResultListener:
1343
+ //
1344
+ // MATCHER_P(EqualsLongString, str, "") {
1345
+ // if (arg == str) return true;
1346
+ //
1347
+ // *result_listener << "the difference: "
1348
+ /// << DiffStrings(str, arg);
1349
+ // return false;
1350
+ // }
1351
+ //
1352
+ // Overloading Matchers
1353
+ // ====================
1354
+ //
1355
+ // You can overload matchers with different numbers of parameters:
1356
+ //
1357
+ // MATCHER_P(Blah, a, description_string1) { ... }
1358
+ // MATCHER_P2(Blah, a, b, description_string2) { ... }
1359
+ //
1360
+ // Caveats
1361
+ // =======
1362
+ //
1363
+ // When defining a new matcher, you should also consider implementing
1364
+ // MatcherInterface or using MakePolymorphicMatcher(). These
1365
+ // approaches require more work than the MATCHER* macros, but also
1366
+ // give you more control on the types of the value being matched and
1367
+ // the matcher parameters, which may leads to better compiler error
1368
+ // messages when the matcher is used wrong. They also allow
1369
+ // overloading matchers based on parameter types (as opposed to just
1370
+ // based on the number of parameters).
1371
+ //
1372
+ // MATCHER*() can only be used in a namespace scope. The reason is
1373
+ // that C++ doesn't yet allow function-local types to be used to
1374
+ // instantiate templates. The up-coming C++0x standard will fix this.
1375
+ // Once that's done, we'll consider supporting using MATCHER*() inside
1376
+ // a function.
1377
+ //
1378
+ // More Information
1379
+ // ================
1380
+ //
1381
+ // To learn more about using these macros, please search for 'MATCHER'
1382
+ // on https://github.com/google/googletest/blob/master/googlemock/docs/
1383
+ // CookBook.md
1384
+
1385
+ #define MATCHER(name, description)\
1386
+ class name##Matcher {\
1387
+ public:\
1388
+ template <typename arg_type>\
1389
+ class gmock_Impl : public ::testing::MatcherInterface<\
1390
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1391
+ public:\
1392
+ gmock_Impl()\
1393
+ {}\
1394
+ virtual bool MatchAndExplain(\
1395
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1396
+ ::testing::MatchResultListener* result_listener) const;\
1397
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1398
+ *gmock_os << FormatDescription(false);\
1399
+ }\
1400
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1401
+ *gmock_os << FormatDescription(true);\
1402
+ }\
1403
+ private:\
1404
+ ::std::string FormatDescription(bool negation) const {\
1405
+ ::std::string gmock_description = (description);\
1406
+ if (!gmock_description.empty())\
1407
+ return gmock_description;\
1408
+ return ::testing::internal::FormatMatcherDescription(\
1409
+ negation, #name, \
1410
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1411
+ ::testing::tuple<>()));\
1412
+ }\
1413
+ };\
1414
+ template <typename arg_type>\
1415
+ operator ::testing::Matcher<arg_type>() const {\
1416
+ return ::testing::Matcher<arg_type>(\
1417
+ new gmock_Impl<arg_type>());\
1418
+ }\
1419
+ name##Matcher() {\
1420
+ }\
1421
+ private:\
1422
+ };\
1423
+ inline name##Matcher name() {\
1424
+ return name##Matcher();\
1425
+ }\
1426
+ template <typename arg_type>\
1427
+ bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(\
1428
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1429
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1430
+ const
1431
+
1432
+ #define MATCHER_P(name, p0, description)\
1433
+ template <typename p0##_type>\
1434
+ class name##MatcherP {\
1435
+ public:\
1436
+ template <typename arg_type>\
1437
+ class gmock_Impl : public ::testing::MatcherInterface<\
1438
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1439
+ public:\
1440
+ explicit gmock_Impl(p0##_type gmock_p0)\
1441
+ : p0(::testing::internal::move(gmock_p0)) {}\
1442
+ virtual bool MatchAndExplain(\
1443
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1444
+ ::testing::MatchResultListener* result_listener) const;\
1445
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1446
+ *gmock_os << FormatDescription(false);\
1447
+ }\
1448
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1449
+ *gmock_os << FormatDescription(true);\
1450
+ }\
1451
+ p0##_type const p0;\
1452
+ private:\
1453
+ ::std::string FormatDescription(bool negation) const {\
1454
+ ::std::string gmock_description = (description);\
1455
+ if (!gmock_description.empty())\
1456
+ return gmock_description;\
1457
+ return ::testing::internal::FormatMatcherDescription(\
1458
+ negation, #name, \
1459
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1460
+ ::testing::tuple<p0##_type>(p0)));\
1461
+ }\
1462
+ };\
1463
+ template <typename arg_type>\
1464
+ operator ::testing::Matcher<arg_type>() const {\
1465
+ return ::testing::Matcher<arg_type>(\
1466
+ new gmock_Impl<arg_type>(p0));\
1467
+ }\
1468
+ explicit name##MatcherP(p0##_type gmock_p0) : \
1469
+ p0(::testing::internal::move(gmock_p0)) {\
1470
+ }\
1471
+ p0##_type const p0;\
1472
+ private:\
1473
+ };\
1474
+ template <typename p0##_type>\
1475
+ inline name##MatcherP<p0##_type> name(p0##_type p0) {\
1476
+ return name##MatcherP<p0##_type>(p0);\
1477
+ }\
1478
+ template <typename p0##_type>\
1479
+ template <typename arg_type>\
1480
+ bool name##MatcherP<p0##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1481
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1482
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1483
+ const
1484
+
1485
+ #define MATCHER_P2(name, p0, p1, description)\
1486
+ template <typename p0##_type, typename p1##_type>\
1487
+ class name##MatcherP2 {\
1488
+ public:\
1489
+ template <typename arg_type>\
1490
+ class gmock_Impl : public ::testing::MatcherInterface<\
1491
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1492
+ public:\
1493
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\
1494
+ : p0(::testing::internal::move(gmock_p0)), \
1495
+ p1(::testing::internal::move(gmock_p1)) {}\
1496
+ virtual bool MatchAndExplain(\
1497
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1498
+ ::testing::MatchResultListener* result_listener) const;\
1499
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1500
+ *gmock_os << FormatDescription(false);\
1501
+ }\
1502
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1503
+ *gmock_os << FormatDescription(true);\
1504
+ }\
1505
+ p0##_type const p0;\
1506
+ p1##_type const p1;\
1507
+ private:\
1508
+ ::std::string FormatDescription(bool negation) const {\
1509
+ ::std::string gmock_description = (description);\
1510
+ if (!gmock_description.empty())\
1511
+ return gmock_description;\
1512
+ return ::testing::internal::FormatMatcherDescription(\
1513
+ negation, #name, \
1514
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1515
+ ::testing::tuple<p0##_type, p1##_type>(p0, p1)));\
1516
+ }\
1517
+ };\
1518
+ template <typename arg_type>\
1519
+ operator ::testing::Matcher<arg_type>() const {\
1520
+ return ::testing::Matcher<arg_type>(\
1521
+ new gmock_Impl<arg_type>(p0, p1));\
1522
+ }\
1523
+ name##MatcherP2(p0##_type gmock_p0, \
1524
+ p1##_type gmock_p1) : p0(::testing::internal::move(gmock_p0)), \
1525
+ p1(::testing::internal::move(gmock_p1)) {\
1526
+ }\
1527
+ p0##_type const p0;\
1528
+ p1##_type const p1;\
1529
+ private:\
1530
+ };\
1531
+ template <typename p0##_type, typename p1##_type>\
1532
+ inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \
1533
+ p1##_type p1) {\
1534
+ return name##MatcherP2<p0##_type, p1##_type>(p0, p1);\
1535
+ }\
1536
+ template <typename p0##_type, typename p1##_type>\
1537
+ template <typename arg_type>\
1538
+ bool name##MatcherP2<p0##_type, \
1539
+ p1##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1540
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1541
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1542
+ const
1543
+
1544
+ #define MATCHER_P3(name, p0, p1, p2, description)\
1545
+ template <typename p0##_type, typename p1##_type, typename p2##_type>\
1546
+ class name##MatcherP3 {\
1547
+ public:\
1548
+ template <typename arg_type>\
1549
+ class gmock_Impl : public ::testing::MatcherInterface<\
1550
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1551
+ public:\
1552
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\
1553
+ : p0(::testing::internal::move(gmock_p0)), \
1554
+ p1(::testing::internal::move(gmock_p1)), \
1555
+ p2(::testing::internal::move(gmock_p2)) {}\
1556
+ virtual bool MatchAndExplain(\
1557
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1558
+ ::testing::MatchResultListener* result_listener) const;\
1559
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1560
+ *gmock_os << FormatDescription(false);\
1561
+ }\
1562
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1563
+ *gmock_os << FormatDescription(true);\
1564
+ }\
1565
+ p0##_type const p0;\
1566
+ p1##_type const p1;\
1567
+ p2##_type const p2;\
1568
+ private:\
1569
+ ::std::string FormatDescription(bool negation) const {\
1570
+ ::std::string gmock_description = (description);\
1571
+ if (!gmock_description.empty())\
1572
+ return gmock_description;\
1573
+ return ::testing::internal::FormatMatcherDescription(\
1574
+ negation, #name, \
1575
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1576
+ ::testing::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \
1577
+ p2)));\
1578
+ }\
1579
+ };\
1580
+ template <typename arg_type>\
1581
+ operator ::testing::Matcher<arg_type>() const {\
1582
+ return ::testing::Matcher<arg_type>(\
1583
+ new gmock_Impl<arg_type>(p0, p1, p2));\
1584
+ }\
1585
+ name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \
1586
+ p2##_type gmock_p2) : p0(::testing::internal::move(gmock_p0)), \
1587
+ p1(::testing::internal::move(gmock_p1)), \
1588
+ p2(::testing::internal::move(gmock_p2)) {\
1589
+ }\
1590
+ p0##_type const p0;\
1591
+ p1##_type const p1;\
1592
+ p2##_type const p2;\
1593
+ private:\
1594
+ };\
1595
+ template <typename p0##_type, typename p1##_type, typename p2##_type>\
1596
+ inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
1597
+ p1##_type p1, p2##_type p2) {\
1598
+ return name##MatcherP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
1599
+ }\
1600
+ template <typename p0##_type, typename p1##_type, typename p2##_type>\
1601
+ template <typename arg_type>\
1602
+ bool name##MatcherP3<p0##_type, p1##_type, \
1603
+ p2##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1604
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1605
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1606
+ const
1607
+
1608
+ #define MATCHER_P4(name, p0, p1, p2, p3, description)\
1609
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1610
+ typename p3##_type>\
1611
+ class name##MatcherP4 {\
1612
+ public:\
1613
+ template <typename arg_type>\
1614
+ class gmock_Impl : public ::testing::MatcherInterface<\
1615
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1616
+ public:\
1617
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1618
+ p3##_type gmock_p3)\
1619
+ : p0(::testing::internal::move(gmock_p0)), \
1620
+ p1(::testing::internal::move(gmock_p1)), \
1621
+ p2(::testing::internal::move(gmock_p2)), \
1622
+ p3(::testing::internal::move(gmock_p3)) {}\
1623
+ virtual bool MatchAndExplain(\
1624
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1625
+ ::testing::MatchResultListener* result_listener) const;\
1626
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1627
+ *gmock_os << FormatDescription(false);\
1628
+ }\
1629
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1630
+ *gmock_os << FormatDescription(true);\
1631
+ }\
1632
+ p0##_type const p0;\
1633
+ p1##_type const p1;\
1634
+ p2##_type const p2;\
1635
+ p3##_type const p3;\
1636
+ private:\
1637
+ ::std::string FormatDescription(bool negation) const {\
1638
+ ::std::string gmock_description = (description);\
1639
+ if (!gmock_description.empty())\
1640
+ return gmock_description;\
1641
+ return ::testing::internal::FormatMatcherDescription(\
1642
+ negation, #name, \
1643
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1644
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, \
1645
+ p3##_type>(p0, p1, p2, p3)));\
1646
+ }\
1647
+ };\
1648
+ template <typename arg_type>\
1649
+ operator ::testing::Matcher<arg_type>() const {\
1650
+ return ::testing::Matcher<arg_type>(\
1651
+ new gmock_Impl<arg_type>(p0, p1, p2, p3));\
1652
+ }\
1653
+ name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \
1654
+ p2##_type gmock_p2, \
1655
+ p3##_type gmock_p3) : p0(::testing::internal::move(gmock_p0)), \
1656
+ p1(::testing::internal::move(gmock_p1)), \
1657
+ p2(::testing::internal::move(gmock_p2)), \
1658
+ p3(::testing::internal::move(gmock_p3)) {\
1659
+ }\
1660
+ p0##_type const p0;\
1661
+ p1##_type const p1;\
1662
+ p2##_type const p2;\
1663
+ p3##_type const p3;\
1664
+ private:\
1665
+ };\
1666
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1667
+ typename p3##_type>\
1668
+ inline name##MatcherP4<p0##_type, p1##_type, p2##_type, \
1669
+ p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
1670
+ p3##_type p3) {\
1671
+ return name##MatcherP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \
1672
+ p1, p2, p3);\
1673
+ }\
1674
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1675
+ typename p3##_type>\
1676
+ template <typename arg_type>\
1677
+ bool name##MatcherP4<p0##_type, p1##_type, p2##_type, \
1678
+ p3##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1679
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1680
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1681
+ const
1682
+
1683
+ #define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\
1684
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1685
+ typename p3##_type, typename p4##_type>\
1686
+ class name##MatcherP5 {\
1687
+ public:\
1688
+ template <typename arg_type>\
1689
+ class gmock_Impl : public ::testing::MatcherInterface<\
1690
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1691
+ public:\
1692
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1693
+ p3##_type gmock_p3, p4##_type gmock_p4)\
1694
+ : p0(::testing::internal::move(gmock_p0)), \
1695
+ p1(::testing::internal::move(gmock_p1)), \
1696
+ p2(::testing::internal::move(gmock_p2)), \
1697
+ p3(::testing::internal::move(gmock_p3)), \
1698
+ p4(::testing::internal::move(gmock_p4)) {}\
1699
+ virtual bool MatchAndExplain(\
1700
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1701
+ ::testing::MatchResultListener* result_listener) const;\
1702
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1703
+ *gmock_os << FormatDescription(false);\
1704
+ }\
1705
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1706
+ *gmock_os << FormatDescription(true);\
1707
+ }\
1708
+ p0##_type const p0;\
1709
+ p1##_type const p1;\
1710
+ p2##_type const p2;\
1711
+ p3##_type const p3;\
1712
+ p4##_type const p4;\
1713
+ private:\
1714
+ ::std::string FormatDescription(bool negation) const {\
1715
+ ::std::string gmock_description = (description);\
1716
+ if (!gmock_description.empty())\
1717
+ return gmock_description;\
1718
+ return ::testing::internal::FormatMatcherDescription(\
1719
+ negation, #name, \
1720
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1721
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1722
+ p4##_type>(p0, p1, p2, p3, p4)));\
1723
+ }\
1724
+ };\
1725
+ template <typename arg_type>\
1726
+ operator ::testing::Matcher<arg_type>() const {\
1727
+ return ::testing::Matcher<arg_type>(\
1728
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4));\
1729
+ }\
1730
+ name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \
1731
+ p2##_type gmock_p2, p3##_type gmock_p3, \
1732
+ p4##_type gmock_p4) : p0(::testing::internal::move(gmock_p0)), \
1733
+ p1(::testing::internal::move(gmock_p1)), \
1734
+ p2(::testing::internal::move(gmock_p2)), \
1735
+ p3(::testing::internal::move(gmock_p3)), \
1736
+ p4(::testing::internal::move(gmock_p4)) {\
1737
+ }\
1738
+ p0##_type const p0;\
1739
+ p1##_type const p1;\
1740
+ p2##_type const p2;\
1741
+ p3##_type const p3;\
1742
+ p4##_type const p4;\
1743
+ private:\
1744
+ };\
1745
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1746
+ typename p3##_type, typename p4##_type>\
1747
+ inline name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1748
+ p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
1749
+ p4##_type p4) {\
1750
+ return name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1751
+ p4##_type>(p0, p1, p2, p3, p4);\
1752
+ }\
1753
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1754
+ typename p3##_type, typename p4##_type>\
1755
+ template <typename arg_type>\
1756
+ bool name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1757
+ p4##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1758
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1759
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1760
+ const
1761
+
1762
+ #define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\
1763
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1764
+ typename p3##_type, typename p4##_type, typename p5##_type>\
1765
+ class name##MatcherP6 {\
1766
+ public:\
1767
+ template <typename arg_type>\
1768
+ class gmock_Impl : public ::testing::MatcherInterface<\
1769
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1770
+ public:\
1771
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1772
+ p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5)\
1773
+ : p0(::testing::internal::move(gmock_p0)), \
1774
+ p1(::testing::internal::move(gmock_p1)), \
1775
+ p2(::testing::internal::move(gmock_p2)), \
1776
+ p3(::testing::internal::move(gmock_p3)), \
1777
+ p4(::testing::internal::move(gmock_p4)), \
1778
+ p5(::testing::internal::move(gmock_p5)) {}\
1779
+ virtual bool MatchAndExplain(\
1780
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1781
+ ::testing::MatchResultListener* result_listener) const;\
1782
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1783
+ *gmock_os << FormatDescription(false);\
1784
+ }\
1785
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1786
+ *gmock_os << FormatDescription(true);\
1787
+ }\
1788
+ p0##_type const p0;\
1789
+ p1##_type const p1;\
1790
+ p2##_type const p2;\
1791
+ p3##_type const p3;\
1792
+ p4##_type const p4;\
1793
+ p5##_type const p5;\
1794
+ private:\
1795
+ ::std::string FormatDescription(bool negation) const {\
1796
+ ::std::string gmock_description = (description);\
1797
+ if (!gmock_description.empty())\
1798
+ return gmock_description;\
1799
+ return ::testing::internal::FormatMatcherDescription(\
1800
+ negation, #name, \
1801
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1802
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1803
+ p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\
1804
+ }\
1805
+ };\
1806
+ template <typename arg_type>\
1807
+ operator ::testing::Matcher<arg_type>() const {\
1808
+ return ::testing::Matcher<arg_type>(\
1809
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5));\
1810
+ }\
1811
+ name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \
1812
+ p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1813
+ p5##_type gmock_p5) : p0(::testing::internal::move(gmock_p0)), \
1814
+ p1(::testing::internal::move(gmock_p1)), \
1815
+ p2(::testing::internal::move(gmock_p2)), \
1816
+ p3(::testing::internal::move(gmock_p3)), \
1817
+ p4(::testing::internal::move(gmock_p4)), \
1818
+ p5(::testing::internal::move(gmock_p5)) {\
1819
+ }\
1820
+ p0##_type const p0;\
1821
+ p1##_type const p1;\
1822
+ p2##_type const p2;\
1823
+ p3##_type const p3;\
1824
+ p4##_type const p4;\
1825
+ p5##_type const p5;\
1826
+ private:\
1827
+ };\
1828
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1829
+ typename p3##_type, typename p4##_type, typename p5##_type>\
1830
+ inline name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
1831
+ p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
1832
+ p3##_type p3, p4##_type p4, p5##_type p5) {\
1833
+ return name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
1834
+ p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
1835
+ }\
1836
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1837
+ typename p3##_type, typename p4##_type, typename p5##_type>\
1838
+ template <typename arg_type>\
1839
+ bool name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1840
+ p5##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1841
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1842
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1843
+ const
1844
+
1845
+ #define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\
1846
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1847
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1848
+ typename p6##_type>\
1849
+ class name##MatcherP7 {\
1850
+ public:\
1851
+ template <typename arg_type>\
1852
+ class gmock_Impl : public ::testing::MatcherInterface<\
1853
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1854
+ public:\
1855
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1856
+ p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1857
+ p6##_type gmock_p6)\
1858
+ : p0(::testing::internal::move(gmock_p0)), \
1859
+ p1(::testing::internal::move(gmock_p1)), \
1860
+ p2(::testing::internal::move(gmock_p2)), \
1861
+ p3(::testing::internal::move(gmock_p3)), \
1862
+ p4(::testing::internal::move(gmock_p4)), \
1863
+ p5(::testing::internal::move(gmock_p5)), \
1864
+ p6(::testing::internal::move(gmock_p6)) {}\
1865
+ virtual bool MatchAndExplain(\
1866
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1867
+ ::testing::MatchResultListener* result_listener) const;\
1868
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1869
+ *gmock_os << FormatDescription(false);\
1870
+ }\
1871
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1872
+ *gmock_os << FormatDescription(true);\
1873
+ }\
1874
+ p0##_type const p0;\
1875
+ p1##_type const p1;\
1876
+ p2##_type const p2;\
1877
+ p3##_type const p3;\
1878
+ p4##_type const p4;\
1879
+ p5##_type const p5;\
1880
+ p6##_type const p6;\
1881
+ private:\
1882
+ ::std::string FormatDescription(bool negation) const {\
1883
+ ::std::string gmock_description = (description);\
1884
+ if (!gmock_description.empty())\
1885
+ return gmock_description;\
1886
+ return ::testing::internal::FormatMatcherDescription(\
1887
+ negation, #name, \
1888
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1889
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1890
+ p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \
1891
+ p6)));\
1892
+ }\
1893
+ };\
1894
+ template <typename arg_type>\
1895
+ operator ::testing::Matcher<arg_type>() const {\
1896
+ return ::testing::Matcher<arg_type>(\
1897
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6));\
1898
+ }\
1899
+ name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \
1900
+ p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1901
+ p5##_type gmock_p5, \
1902
+ p6##_type gmock_p6) : p0(::testing::internal::move(gmock_p0)), \
1903
+ p1(::testing::internal::move(gmock_p1)), \
1904
+ p2(::testing::internal::move(gmock_p2)), \
1905
+ p3(::testing::internal::move(gmock_p3)), \
1906
+ p4(::testing::internal::move(gmock_p4)), \
1907
+ p5(::testing::internal::move(gmock_p5)), \
1908
+ p6(::testing::internal::move(gmock_p6)) {\
1909
+ }\
1910
+ p0##_type const p0;\
1911
+ p1##_type const p1;\
1912
+ p2##_type const p2;\
1913
+ p3##_type const p3;\
1914
+ p4##_type const p4;\
1915
+ p5##_type const p5;\
1916
+ p6##_type const p6;\
1917
+ private:\
1918
+ };\
1919
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1920
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1921
+ typename p6##_type>\
1922
+ inline name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
1923
+ p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
1924
+ p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
1925
+ p6##_type p6) {\
1926
+ return name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
1927
+ p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
1928
+ }\
1929
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1930
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1931
+ typename p6##_type>\
1932
+ template <typename arg_type>\
1933
+ bool name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1934
+ p5##_type, p6##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1935
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1936
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1937
+ const
1938
+
1939
+ #define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\
1940
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
1941
+ typename p3##_type, typename p4##_type, typename p5##_type, \
1942
+ typename p6##_type, typename p7##_type>\
1943
+ class name##MatcherP8 {\
1944
+ public:\
1945
+ template <typename arg_type>\
1946
+ class gmock_Impl : public ::testing::MatcherInterface<\
1947
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1948
+ public:\
1949
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1950
+ p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1951
+ p6##_type gmock_p6, p7##_type gmock_p7)\
1952
+ : p0(::testing::internal::move(gmock_p0)), \
1953
+ p1(::testing::internal::move(gmock_p1)), \
1954
+ p2(::testing::internal::move(gmock_p2)), \
1955
+ p3(::testing::internal::move(gmock_p3)), \
1956
+ p4(::testing::internal::move(gmock_p4)), \
1957
+ p5(::testing::internal::move(gmock_p5)), \
1958
+ p6(::testing::internal::move(gmock_p6)), \
1959
+ p7(::testing::internal::move(gmock_p7)) {}\
1960
+ virtual bool MatchAndExplain(\
1961
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1962
+ ::testing::MatchResultListener* result_listener) const;\
1963
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
1964
+ *gmock_os << FormatDescription(false);\
1965
+ }\
1966
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1967
+ *gmock_os << FormatDescription(true);\
1968
+ }\
1969
+ p0##_type const p0;\
1970
+ p1##_type const p1;\
1971
+ p2##_type const p2;\
1972
+ p3##_type const p3;\
1973
+ p4##_type const p4;\
1974
+ p5##_type const p5;\
1975
+ p6##_type const p6;\
1976
+ p7##_type const p7;\
1977
+ private:\
1978
+ ::std::string FormatDescription(bool negation) const {\
1979
+ ::std::string gmock_description = (description);\
1980
+ if (!gmock_description.empty())\
1981
+ return gmock_description;\
1982
+ return ::testing::internal::FormatMatcherDescription(\
1983
+ negation, #name, \
1984
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1985
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1986
+ p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \
1987
+ p3, p4, p5, p6, p7)));\
1988
+ }\
1989
+ };\
1990
+ template <typename arg_type>\
1991
+ operator ::testing::Matcher<arg_type>() const {\
1992
+ return ::testing::Matcher<arg_type>(\
1993
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7));\
1994
+ }\
1995
+ name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \
1996
+ p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1997
+ p5##_type gmock_p5, p6##_type gmock_p6, \
1998
+ p7##_type gmock_p7) : p0(::testing::internal::move(gmock_p0)), \
1999
+ p1(::testing::internal::move(gmock_p1)), \
2000
+ p2(::testing::internal::move(gmock_p2)), \
2001
+ p3(::testing::internal::move(gmock_p3)), \
2002
+ p4(::testing::internal::move(gmock_p4)), \
2003
+ p5(::testing::internal::move(gmock_p5)), \
2004
+ p6(::testing::internal::move(gmock_p6)), \
2005
+ p7(::testing::internal::move(gmock_p7)) {\
2006
+ }\
2007
+ p0##_type const p0;\
2008
+ p1##_type const p1;\
2009
+ p2##_type const p2;\
2010
+ p3##_type const p3;\
2011
+ p4##_type const p4;\
2012
+ p5##_type const p5;\
2013
+ p6##_type const p6;\
2014
+ p7##_type const p7;\
2015
+ private:\
2016
+ };\
2017
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2018
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2019
+ typename p6##_type, typename p7##_type>\
2020
+ inline name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
2021
+ p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
2022
+ p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
2023
+ p6##_type p6, p7##_type p7) {\
2024
+ return name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
2025
+ p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
2026
+ p6, p7);\
2027
+ }\
2028
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2029
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2030
+ typename p6##_type, typename p7##_type>\
2031
+ template <typename arg_type>\
2032
+ bool name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
2033
+ p5##_type, p6##_type, \
2034
+ p7##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2035
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2036
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
2037
+ const
2038
+
2039
+ #define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\
2040
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2041
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2042
+ typename p6##_type, typename p7##_type, typename p8##_type>\
2043
+ class name##MatcherP9 {\
2044
+ public:\
2045
+ template <typename arg_type>\
2046
+ class gmock_Impl : public ::testing::MatcherInterface<\
2047
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
2048
+ public:\
2049
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
2050
+ p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
2051
+ p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8)\
2052
+ : p0(::testing::internal::move(gmock_p0)), \
2053
+ p1(::testing::internal::move(gmock_p1)), \
2054
+ p2(::testing::internal::move(gmock_p2)), \
2055
+ p3(::testing::internal::move(gmock_p3)), \
2056
+ p4(::testing::internal::move(gmock_p4)), \
2057
+ p5(::testing::internal::move(gmock_p5)), \
2058
+ p6(::testing::internal::move(gmock_p6)), \
2059
+ p7(::testing::internal::move(gmock_p7)), \
2060
+ p8(::testing::internal::move(gmock_p8)) {}\
2061
+ virtual bool MatchAndExplain(\
2062
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2063
+ ::testing::MatchResultListener* result_listener) const;\
2064
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
2065
+ *gmock_os << FormatDescription(false);\
2066
+ }\
2067
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
2068
+ *gmock_os << FormatDescription(true);\
2069
+ }\
2070
+ p0##_type const p0;\
2071
+ p1##_type const p1;\
2072
+ p2##_type const p2;\
2073
+ p3##_type const p3;\
2074
+ p4##_type const p4;\
2075
+ p5##_type const p5;\
2076
+ p6##_type const p6;\
2077
+ p7##_type const p7;\
2078
+ p8##_type const p8;\
2079
+ private:\
2080
+ ::std::string FormatDescription(bool negation) const {\
2081
+ ::std::string gmock_description = (description);\
2082
+ if (!gmock_description.empty())\
2083
+ return gmock_description;\
2084
+ return ::testing::internal::FormatMatcherDescription(\
2085
+ negation, #name, \
2086
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
2087
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
2088
+ p4##_type, p5##_type, p6##_type, p7##_type, \
2089
+ p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\
2090
+ }\
2091
+ };\
2092
+ template <typename arg_type>\
2093
+ operator ::testing::Matcher<arg_type>() const {\
2094
+ return ::testing::Matcher<arg_type>(\
2095
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8));\
2096
+ }\
2097
+ name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \
2098
+ p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
2099
+ p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
2100
+ p8##_type gmock_p8) : p0(::testing::internal::move(gmock_p0)), \
2101
+ p1(::testing::internal::move(gmock_p1)), \
2102
+ p2(::testing::internal::move(gmock_p2)), \
2103
+ p3(::testing::internal::move(gmock_p3)), \
2104
+ p4(::testing::internal::move(gmock_p4)), \
2105
+ p5(::testing::internal::move(gmock_p5)), \
2106
+ p6(::testing::internal::move(gmock_p6)), \
2107
+ p7(::testing::internal::move(gmock_p7)), \
2108
+ p8(::testing::internal::move(gmock_p8)) {\
2109
+ }\
2110
+ p0##_type const p0;\
2111
+ p1##_type const p1;\
2112
+ p2##_type const p2;\
2113
+ p3##_type const p3;\
2114
+ p4##_type const p4;\
2115
+ p5##_type const p5;\
2116
+ p6##_type const p6;\
2117
+ p7##_type const p7;\
2118
+ p8##_type const p8;\
2119
+ private:\
2120
+ };\
2121
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2122
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2123
+ typename p6##_type, typename p7##_type, typename p8##_type>\
2124
+ inline name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
2125
+ p4##_type, p5##_type, p6##_type, p7##_type, \
2126
+ p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
2127
+ p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
2128
+ p8##_type p8) {\
2129
+ return name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
2130
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
2131
+ p3, p4, p5, p6, p7, p8);\
2132
+ }\
2133
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2134
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2135
+ typename p6##_type, typename p7##_type, typename p8##_type>\
2136
+ template <typename arg_type>\
2137
+ bool name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
2138
+ p5##_type, p6##_type, p7##_type, \
2139
+ p8##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2140
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2141
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
2142
+ const
2143
+
2144
+ #define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\
2145
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2146
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2147
+ typename p6##_type, typename p7##_type, typename p8##_type, \
2148
+ typename p9##_type>\
2149
+ class name##MatcherP10 {\
2150
+ public:\
2151
+ template <typename arg_type>\
2152
+ class gmock_Impl : public ::testing::MatcherInterface<\
2153
+ GTEST_REFERENCE_TO_CONST_(arg_type)> {\
2154
+ public:\
2155
+ gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
2156
+ p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
2157
+ p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
2158
+ p9##_type gmock_p9)\
2159
+ : p0(::testing::internal::move(gmock_p0)), \
2160
+ p1(::testing::internal::move(gmock_p1)), \
2161
+ p2(::testing::internal::move(gmock_p2)), \
2162
+ p3(::testing::internal::move(gmock_p3)), \
2163
+ p4(::testing::internal::move(gmock_p4)), \
2164
+ p5(::testing::internal::move(gmock_p5)), \
2165
+ p6(::testing::internal::move(gmock_p6)), \
2166
+ p7(::testing::internal::move(gmock_p7)), \
2167
+ p8(::testing::internal::move(gmock_p8)), \
2168
+ p9(::testing::internal::move(gmock_p9)) {}\
2169
+ virtual bool MatchAndExplain(\
2170
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2171
+ ::testing::MatchResultListener* result_listener) const;\
2172
+ virtual void DescribeTo(::std::ostream* gmock_os) const {\
2173
+ *gmock_os << FormatDescription(false);\
2174
+ }\
2175
+ virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
2176
+ *gmock_os << FormatDescription(true);\
2177
+ }\
2178
+ p0##_type const p0;\
2179
+ p1##_type const p1;\
2180
+ p2##_type const p2;\
2181
+ p3##_type const p3;\
2182
+ p4##_type const p4;\
2183
+ p5##_type const p5;\
2184
+ p6##_type const p6;\
2185
+ p7##_type const p7;\
2186
+ p8##_type const p8;\
2187
+ p9##_type const p9;\
2188
+ private:\
2189
+ ::std::string FormatDescription(bool negation) const {\
2190
+ ::std::string gmock_description = (description);\
2191
+ if (!gmock_description.empty())\
2192
+ return gmock_description;\
2193
+ return ::testing::internal::FormatMatcherDescription(\
2194
+ negation, #name, \
2195
+ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
2196
+ ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
2197
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2198
+ p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\
2199
+ }\
2200
+ };\
2201
+ template <typename arg_type>\
2202
+ operator ::testing::Matcher<arg_type>() const {\
2203
+ return ::testing::Matcher<arg_type>(\
2204
+ new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\
2205
+ }\
2206
+ name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \
2207
+ p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
2208
+ p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
2209
+ p8##_type gmock_p8, \
2210
+ p9##_type gmock_p9) : p0(::testing::internal::move(gmock_p0)), \
2211
+ p1(::testing::internal::move(gmock_p1)), \
2212
+ p2(::testing::internal::move(gmock_p2)), \
2213
+ p3(::testing::internal::move(gmock_p3)), \
2214
+ p4(::testing::internal::move(gmock_p4)), \
2215
+ p5(::testing::internal::move(gmock_p5)), \
2216
+ p6(::testing::internal::move(gmock_p6)), \
2217
+ p7(::testing::internal::move(gmock_p7)), \
2218
+ p8(::testing::internal::move(gmock_p8)), \
2219
+ p9(::testing::internal::move(gmock_p9)) {\
2220
+ }\
2221
+ p0##_type const p0;\
2222
+ p1##_type const p1;\
2223
+ p2##_type const p2;\
2224
+ p3##_type const p3;\
2225
+ p4##_type const p4;\
2226
+ p5##_type const p5;\
2227
+ p6##_type const p6;\
2228
+ p7##_type const p7;\
2229
+ p8##_type const p8;\
2230
+ p9##_type const p9;\
2231
+ private:\
2232
+ };\
2233
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2234
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2235
+ typename p6##_type, typename p7##_type, typename p8##_type, \
2236
+ typename p9##_type>\
2237
+ inline name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2238
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2239
+ p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
2240
+ p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
2241
+ p9##_type p9) {\
2242
+ return name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2243
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
2244
+ p1, p2, p3, p4, p5, p6, p7, p8, p9);\
2245
+ }\
2246
+ template <typename p0##_type, typename p1##_type, typename p2##_type, \
2247
+ typename p3##_type, typename p4##_type, typename p5##_type, \
2248
+ typename p6##_type, typename p7##_type, typename p8##_type, \
2249
+ typename p9##_type>\
2250
+ template <typename arg_type>\
2251
+ bool name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2252
+ p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2253
+ p9##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2254
+ GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2255
+ ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
2256
+ const
2257
+
2258
+ #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_