rj_schema 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (613) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -615
  3. data/ext/rj_schema/rapidjson/CHANGELOG.md +0 -158
  4. data/ext/rj_schema/rapidjson/CMakeLists.txt +0 -221
  5. data/ext/rj_schema/rapidjson/CMakeModules/FindGTestSrc.cmake +0 -30
  6. data/ext/rj_schema/rapidjson/RapidJSON.pc.in +0 -7
  7. data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +0 -15
  8. data/ext/rj_schema/rapidjson/RapidJSONConfigVersion.cmake.in +0 -10
  9. data/ext/rj_schema/rapidjson/appveyor.yml +0 -41
  10. data/ext/rj_schema/rapidjson/bin/data/glossary.json +0 -22
  11. data/ext/rj_schema/rapidjson/bin/data/menu.json +0 -27
  12. data/ext/rj_schema/rapidjson/bin/data/readme.txt +0 -1
  13. data/ext/rj_schema/rapidjson/bin/data/sample.json +0 -3315
  14. data/ext/rj_schema/rapidjson/bin/data/webapp.json +0 -88
  15. data/ext/rj_schema/rapidjson/bin/data/widget.json +0 -26
  16. data/ext/rj_schema/rapidjson/bin/draft-04/schema +0 -150
  17. data/ext/rj_schema/rapidjson/bin/encodings/utf16be.json +0 -0
  18. data/ext/rj_schema/rapidjson/bin/encodings/utf16bebom.json +0 -0
  19. data/ext/rj_schema/rapidjson/bin/encodings/utf16le.json +0 -0
  20. data/ext/rj_schema/rapidjson/bin/encodings/utf16lebom.json +0 -0
  21. data/ext/rj_schema/rapidjson/bin/encodings/utf32be.json +0 -0
  22. data/ext/rj_schema/rapidjson/bin/encodings/utf32bebom.json +0 -0
  23. data/ext/rj_schema/rapidjson/bin/encodings/utf32le.json +0 -0
  24. data/ext/rj_schema/rapidjson/bin/encodings/utf32lebom.json +0 -0
  25. data/ext/rj_schema/rapidjson/bin/encodings/utf8.json +0 -7
  26. data/ext/rj_schema/rapidjson/bin/encodings/utf8bom.json +0 -7
  27. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail1.json +0 -1
  28. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail10.json +0 -1
  29. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail11.json +0 -1
  30. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail12.json +0 -1
  31. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail13.json +0 -1
  32. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail14.json +0 -1
  33. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail15.json +0 -1
  34. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail16.json +0 -1
  35. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail17.json +0 -1
  36. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail18.json +0 -1
  37. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail19.json +0 -1
  38. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail2.json +0 -1
  39. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail20.json +0 -1
  40. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail21.json +0 -1
  41. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail22.json +0 -1
  42. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail23.json +0 -1
  43. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail24.json +0 -1
  44. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail25.json +0 -1
  45. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail26.json +0 -1
  46. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail27.json +0 -2
  47. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail28.json +0 -2
  48. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail29.json +0 -1
  49. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail3.json +0 -1
  50. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail30.json +0 -1
  51. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail31.json +0 -1
  52. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail32.json +0 -1
  53. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail33.json +0 -1
  54. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail4.json +0 -1
  55. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail5.json +0 -1
  56. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail6.json +0 -1
  57. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail7.json +0 -1
  58. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail8.json +0 -1
  59. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail9.json +0 -1
  60. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass1.json +0 -58
  61. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass2.json +0 -1
  62. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass3.json +0 -6
  63. data/ext/rj_schema/rapidjson/bin/jsonchecker/readme.txt +0 -3
  64. data/ext/rj_schema/rapidjson/bin/jsonschema/LICENSE +0 -19
  65. data/ext/rj_schema/rapidjson/bin/jsonschema/README.md +0 -148
  66. data/ext/rj_schema/rapidjson/bin/jsonschema/bin/jsonschema_suite +0 -283
  67. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json +0 -3
  68. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/integer.json +0 -3
  69. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/subSchemas.json +0 -8
  70. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json +0 -82
  71. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json +0 -88
  72. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/default.json +0 -49
  73. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/dependencies.json +0 -108
  74. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/disallow.json +0 -80
  75. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json +0 -60
  76. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json +0 -71
  77. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/extends.json +0 -94
  78. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/items.json +0 -46
  79. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxItems.json +0 -28
  80. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxLength.json +0 -33
  81. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maximum.json +0 -42
  82. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minItems.json +0 -28
  83. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minLength.json +0 -33
  84. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minimum.json +0 -42
  85. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json +0 -107
  86. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/format.json +0 -222
  87. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json +0 -18
  88. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json +0 -15
  89. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/pattern.json +0 -34
  90. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json +0 -110
  91. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/properties.json +0 -92
  92. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/ref.json +0 -159
  93. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/refRemote.json +0 -74
  94. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/required.json +0 -53
  95. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/type.json +0 -474
  96. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json +0 -79
  97. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json +0 -82
  98. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json +0 -88
  99. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/allOf.json +0 -112
  100. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/anyOf.json +0 -68
  101. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/default.json +0 -49
  102. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/definitions.json +0 -32
  103. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/dependencies.json +0 -113
  104. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json +0 -72
  105. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/items.json +0 -46
  106. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxItems.json +0 -28
  107. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxLength.json +0 -33
  108. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json +0 -28
  109. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maximum.json +0 -42
  110. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minItems.json +0 -28
  111. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minLength.json +0 -33
  112. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minProperties.json +0 -28
  113. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minimum.json +0 -42
  114. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json +0 -60
  115. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/not.json +0 -96
  116. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/oneOf.json +0 -68
  117. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json +0 -107
  118. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/format.json +0 -148
  119. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json +0 -15
  120. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/pattern.json +0 -34
  121. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json +0 -110
  122. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/properties.json +0 -92
  123. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/ref.json +0 -159
  124. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/refRemote.json +0 -74
  125. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/required.json +0 -39
  126. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json +0 -330
  127. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json +0 -79
  128. data/ext/rj_schema/rapidjson/bin/jsonschema/tox.ini +0 -8
  129. data/ext/rj_schema/rapidjson/bin/types/booleans.json +0 -102
  130. data/ext/rj_schema/rapidjson/bin/types/floats.json +0 -102
  131. data/ext/rj_schema/rapidjson/bin/types/guids.json +0 -102
  132. data/ext/rj_schema/rapidjson/bin/types/integers.json +0 -102
  133. data/ext/rj_schema/rapidjson/bin/types/mixed.json +0 -592
  134. data/ext/rj_schema/rapidjson/bin/types/nulls.json +0 -102
  135. data/ext/rj_schema/rapidjson/bin/types/paragraphs.json +0 -102
  136. data/ext/rj_schema/rapidjson/bin/types/readme.txt +0 -1
  137. data/ext/rj_schema/rapidjson/contrib/natvis/LICENSE +0 -45
  138. data/ext/rj_schema/rapidjson/contrib/natvis/README.md +0 -7
  139. data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +0 -38
  140. data/ext/rj_schema/rapidjson/doc/CMakeLists.txt +0 -27
  141. data/ext/rj_schema/rapidjson/doc/Doxyfile.in +0 -2369
  142. data/ext/rj_schema/rapidjson/doc/Doxyfile.zh-cn.in +0 -2369
  143. data/ext/rj_schema/rapidjson/doc/diagram/architecture.dot +0 -50
  144. data/ext/rj_schema/rapidjson/doc/diagram/architecture.png +0 -0
  145. data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.dot +0 -65
  146. data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.png +0 -0
  147. data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +0 -62
  148. data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
  149. data/ext/rj_schema/rapidjson/doc/diagram/makefile +0 -8
  150. data/ext/rj_schema/rapidjson/doc/diagram/move1.dot +0 -47
  151. data/ext/rj_schema/rapidjson/doc/diagram/move1.png +0 -0
  152. data/ext/rj_schema/rapidjson/doc/diagram/move2.dot +0 -62
  153. data/ext/rj_schema/rapidjson/doc/diagram/move2.png +0 -0
  154. data/ext/rj_schema/rapidjson/doc/diagram/move3.dot +0 -60
  155. data/ext/rj_schema/rapidjson/doc/diagram/move3.png +0 -0
  156. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.dot +0 -56
  157. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.png +0 -0
  158. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.dot +0 -54
  159. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.png +0 -0
  160. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.dot +0 -58
  161. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.png +0 -0
  162. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.dot +0 -73
  163. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.png +0 -0
  164. data/ext/rj_schema/rapidjson/doc/dom.md +0 -280
  165. data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +0 -284
  166. data/ext/rj_schema/rapidjson/doc/encoding.md +0 -146
  167. data/ext/rj_schema/rapidjson/doc/encoding.zh-cn.md +0 -152
  168. data/ext/rj_schema/rapidjson/doc/faq.md +0 -289
  169. data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +0 -290
  170. data/ext/rj_schema/rapidjson/doc/features.md +0 -104
  171. data/ext/rj_schema/rapidjson/doc/features.zh-cn.md +0 -103
  172. data/ext/rj_schema/rapidjson/doc/internals.md +0 -368
  173. data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +0 -363
  174. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.png +0 -0
  175. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.svg +0 -119
  176. data/ext/rj_schema/rapidjson/doc/misc/DoxygenLayout.xml +0 -194
  177. data/ext/rj_schema/rapidjson/doc/misc/doxygenextra.css +0 -274
  178. data/ext/rj_schema/rapidjson/doc/misc/footer.html +0 -11
  179. data/ext/rj_schema/rapidjson/doc/misc/header.html +0 -24
  180. data/ext/rj_schema/rapidjson/doc/npm.md +0 -31
  181. data/ext/rj_schema/rapidjson/doc/performance.md +0 -26
  182. data/ext/rj_schema/rapidjson/doc/performance.zh-cn.md +0 -26
  183. data/ext/rj_schema/rapidjson/doc/pointer.md +0 -234
  184. data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +0 -234
  185. data/ext/rj_schema/rapidjson/doc/sax.md +0 -509
  186. data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +0 -487
  187. data/ext/rj_schema/rapidjson/doc/schema.md +0 -505
  188. data/ext/rj_schema/rapidjson/doc/schema.zh-cn.md +0 -237
  189. data/ext/rj_schema/rapidjson/doc/stream.md +0 -429
  190. data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +0 -429
  191. data/ext/rj_schema/rapidjson/doc/tutorial.md +0 -536
  192. data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +0 -534
  193. data/ext/rj_schema/rapidjson/docker/debian/Dockerfile +0 -8
  194. data/ext/rj_schema/rapidjson/example/CMakeLists.txt +0 -45
  195. data/ext/rj_schema/rapidjson/example/archiver/archiver.cpp +0 -292
  196. data/ext/rj_schema/rapidjson/example/archiver/archiver.h +0 -145
  197. data/ext/rj_schema/rapidjson/example/archiver/archivertest.cpp +0 -287
  198. data/ext/rj_schema/rapidjson/example/capitalize/capitalize.cpp +0 -67
  199. data/ext/rj_schema/rapidjson/example/condense/condense.cpp +0 -32
  200. data/ext/rj_schema/rapidjson/example/filterkey/filterkey.cpp +0 -135
  201. data/ext/rj_schema/rapidjson/example/filterkeydom/filterkeydom.cpp +0 -170
  202. data/ext/rj_schema/rapidjson/example/jsonx/jsonx.cpp +0 -207
  203. data/ext/rj_schema/rapidjson/example/lookaheadparser/lookaheadparser.cpp +0 -350
  204. data/ext/rj_schema/rapidjson/example/messagereader/messagereader.cpp +0 -105
  205. data/ext/rj_schema/rapidjson/example/parsebyparts/parsebyparts.cpp +0 -176
  206. data/ext/rj_schema/rapidjson/example/pretty/pretty.cpp +0 -30
  207. data/ext/rj_schema/rapidjson/example/prettyauto/prettyauto.cpp +0 -56
  208. data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +0 -78
  209. data/ext/rj_schema/rapidjson/example/serialize/serialize.cpp +0 -173
  210. data/ext/rj_schema/rapidjson/example/simpledom/simpledom.cpp +0 -29
  211. data/ext/rj_schema/rapidjson/example/simplepullreader/simplepullreader.cpp +0 -53
  212. data/ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp +0 -42
  213. data/ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp +0 -36
  214. data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +0 -151
  215. data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +0 -284
  216. data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -78
  217. data/ext/rj_schema/rapidjson/include/rapidjson/document.h +0 -2648
  218. data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +0 -299
  219. data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +0 -716
  220. data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +0 -74
  221. data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +0 -161
  222. data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +0 -99
  223. data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +0 -104
  224. data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +0 -151
  225. data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +0 -290
  226. data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +0 -271
  227. data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +0 -245
  228. data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +0 -78
  229. data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +0 -308
  230. data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +0 -186
  231. data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +0 -55
  232. data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +0 -732
  233. data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +0 -231
  234. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +0 -69
  235. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +0 -290
  236. data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +0 -46
  237. data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +0 -113
  238. data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +0 -70
  239. data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +0 -71
  240. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -316
  241. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -300
  242. data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +0 -81
  243. data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +0 -1357
  244. data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +0 -277
  245. data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +0 -630
  246. data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +0 -2230
  247. data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +0 -2494
  248. data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +0 -223
  249. data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +0 -121
  250. data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +0 -710
  251. data/ext/rj_schema/rapidjson/include_dirs.js +0 -2
  252. data/ext/rj_schema/rapidjson/library.json +0 -15
  253. data/ext/rj_schema/rapidjson/license.txt +0 -57
  254. data/ext/rj_schema/rapidjson/package.json +0 -24
  255. data/ext/rj_schema/rapidjson/rapidjson.autopkg +0 -77
  256. data/ext/rj_schema/rapidjson/readme.md +0 -160
  257. data/ext/rj_schema/rapidjson/readme.zh-cn.md +0 -152
  258. data/ext/rj_schema/rapidjson/test/CMakeLists.txt +0 -20
  259. data/ext/rj_schema/rapidjson/test/perftest/CMakeLists.txt +0 -28
  260. data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +0 -974
  261. data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +0 -24
  262. data/ext/rj_schema/rapidjson/test/perftest/perftest.h +0 -185
  263. data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +0 -166
  264. data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +0 -472
  265. data/ext/rj_schema/rapidjson/test/perftest/schematest.cpp +0 -223
  266. data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +0 -92
  267. data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +0 -100
  268. data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +0 -138
  269. data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +0 -115
  270. data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +0 -672
  271. data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +0 -98
  272. data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +0 -313
  273. data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +0 -451
  274. data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +0 -112
  275. data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +0 -230
  276. data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +0 -181
  277. data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +0 -160
  278. data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +0 -143
  279. data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +0 -70
  280. data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +0 -92
  281. data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +0 -1529
  282. data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +0 -373
  283. data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +0 -2190
  284. data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +0 -638
  285. data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +0 -2072
  286. data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +0 -219
  287. data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +0 -30
  288. data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +0 -192
  289. data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +0 -132
  290. data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +0 -51
  291. data/ext/rj_schema/rapidjson/test/unittest/unittest.h +0 -140
  292. data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +0 -1851
  293. data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +0 -598
  294. data/ext/rj_schema/rapidjson/test/valgrind.supp +0 -17
  295. data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +0 -16
  296. data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +0 -141
  297. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +0 -126
  298. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +0 -202
  299. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +0 -40
  300. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +0 -28
  301. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +0 -224
  302. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +0 -333
  303. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +0 -146
  304. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +0 -562
  305. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +0 -3675
  306. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +0 -280
  307. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
  308. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +0 -12
  309. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +0 -439
  310. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +0 -628
  311. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +0 -19
  312. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +0 -525
  313. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +0 -3250
  314. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +0 -11
  315. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +0 -439
  316. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +0 -624
  317. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +0 -534
  318. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +0 -3342
  319. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +0 -12
  320. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +0 -439
  321. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +0 -628
  322. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +0 -556
  323. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +0 -3432
  324. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +0 -12
  325. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +0 -439
  326. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +0 -628
  327. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +0 -1205
  328. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +0 -147
  329. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +0 -2377
  330. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +0 -794
  331. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +0 -1095
  332. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +0 -291
  333. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +0 -2179
  334. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +0 -672
  335. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +0 -397
  336. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +0 -161
  337. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +0 -4399
  338. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +0 -246
  339. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +0 -58
  340. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +0 -1847
  341. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +0 -94
  342. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +0 -8
  343. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +0 -10
  344. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +0 -39
  345. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +0 -46
  346. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +0 -279
  347. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +0 -136
  348. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +0 -511
  349. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +0 -91
  350. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +0 -101
  351. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +0 -32
  352. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +0 -191
  353. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +0 -15
  354. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +0 -187
  355. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +0 -201
  356. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +0 -32
  357. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +0 -82
  358. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +0 -19
  359. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +0 -88
  360. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +0 -101
  361. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +0 -32
  362. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +0 -84
  363. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +0 -19
  364. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +0 -90
  365. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +0 -103
  366. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +0 -240
  367. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +0 -203
  368. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +0 -35
  369. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +0 -115
  370. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  371. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +0 -1733
  372. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +0 -227
  373. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +0 -448
  374. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +0 -59
  375. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +0 -287
  376. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +0 -41
  377. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +0 -31
  378. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +0 -303
  379. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +0 -640
  380. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +0 -1387
  381. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +0 -78
  382. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +0 -47
  383. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +0 -156
  384. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +0 -174
  385. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +0 -498
  386. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +0 -823
  387. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +0 -183
  388. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +0 -54
  389. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +0 -1411
  390. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +0 -428
  391. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +0 -1228
  392. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +0 -622
  393. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +0 -127
  394. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +0 -1286
  395. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +0 -699
  396. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +0 -5648
  397. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +0 -708
  398. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +0 -424
  399. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +0 -43
  400. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +0 -2644
  401. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +0 -51
  402. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +0 -81
  403. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +0 -108
  404. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +0 -100
  405. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +0 -40
  406. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +0 -40
  407. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +0 -669
  408. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +0 -180
  409. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +0 -291
  410. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +0 -310
  411. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +0 -322
  412. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +0 -220
  413. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +0 -112
  414. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +0 -157
  415. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +0 -286
  416. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +0 -37
  417. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +0 -28
  418. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +0 -310
  419. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +0 -280
  420. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +0 -242
  421. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +0 -138
  422. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +0 -54
  423. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +0 -38
  424. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +0 -40
  425. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +0 -82
  426. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +0 -88
  427. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +0 -68
  428. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +0 -2182
  429. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +0 -126
  430. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +0 -14
  431. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/FAQ.md +0 -1087
  432. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +0 -502
  433. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +0 -177
  434. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.md +0 -14
  435. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +0 -2096
  436. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +0 -12
  437. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +0 -886
  438. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +0 -497
  439. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +0 -177
  440. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +0 -93
  441. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +0 -2178
  442. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +0 -14
  443. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +0 -1038
  444. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +0 -501
  445. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +0 -177
  446. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +0 -14
  447. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +0 -93
  448. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +0 -2181
  449. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +0 -14
  450. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +0 -1082
  451. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +0 -501
  452. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +0 -177
  453. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +0 -14
  454. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +0 -93
  455. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +0 -93
  456. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +0 -294
  457. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +0 -250
  458. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +0 -1444
  459. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +0 -510
  460. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +0 -993
  461. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +0 -232
  462. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +0 -179
  463. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +0 -263
  464. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +0 -2236
  465. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +0 -358
  466. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +0 -58
  467. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +0 -69
  468. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
  469. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +0 -41
  470. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -319
  471. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +0 -206
  472. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +0 -1238
  473. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
  474. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5146
  475. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -286
  476. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +0 -731
  477. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +0 -93
  478. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +0 -2554
  479. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +0 -167
  480. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
  481. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
  482. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +0 -3331
  483. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -297
  484. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +0 -363
  485. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +0 -74
  486. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +0 -82
  487. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +0 -45
  488. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +0 -126
  489. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +0 -45
  490. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +0 -126
  491. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +0 -129
  492. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +0 -129
  493. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +0 -164
  494. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +0 -164
  495. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +0 -147
  496. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +0 -147
  497. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +0 -123
  498. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +0 -68
  499. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +0 -43
  500. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -144
  501. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +0 -153
  502. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +0 -56
  503. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +0 -85
  504. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +0 -109
  505. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +0 -172
  506. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +0 -151
  507. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +0 -46
  508. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +0 -53
  509. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +0 -45
  510. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +0 -199
  511. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +0 -224
  512. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +0 -130
  513. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +0 -173
  514. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -160
  515. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +0 -83
  516. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +0 -253
  517. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +0 -730
  518. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +0 -274
  519. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +0 -855
  520. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +0 -158
  521. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +0 -59
  522. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +0 -1387
  523. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +0 -78
  524. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +0 -48
  525. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +0 -1342
  526. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +0 -387
  527. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +0 -1183
  528. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +0 -1259
  529. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +0 -373
  530. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +0 -110
  531. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +0 -118
  532. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +0 -5388
  533. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +0 -38
  534. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +0 -93
  535. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +0 -1427
  536. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +0 -662
  537. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +0 -154
  538. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +0 -311
  539. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +0 -159
  540. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +0 -215
  541. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +0 -65
  542. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +0 -1055
  543. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +0 -57
  544. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +0 -1304
  545. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +0 -1635
  546. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +0 -208
  547. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +0 -320
  548. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +0 -45
  549. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +0 -380
  550. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +0 -66
  551. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +0 -341
  552. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +0 -47
  553. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +0 -212
  554. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +0 -88
  555. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -237
  556. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +0 -311
  557. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +0 -130
  558. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -71
  559. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +0 -117
  560. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -126
  561. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -192
  562. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +0 -636
  563. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -140
  564. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +0 -172
  565. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +0 -46
  566. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +0 -207
  567. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +0 -157
  568. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +0 -45
  569. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +0 -56
  570. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +0 -340
  571. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +0 -1062
  572. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +0 -743
  573. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +0 -2427
  574. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +0 -127
  575. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +0 -57
  576. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +0 -253
  577. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +0 -325
  578. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +0 -103
  579. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +0 -57
  580. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -256
  581. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +0 -320
  582. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +0 -92
  583. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +0 -171
  584. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +0 -72
  585. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +0 -70
  586. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +0 -43
  587. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +0 -7706
  588. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -49
  589. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -49
  590. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +0 -132
  591. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +0 -308
  592. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -181
  593. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +0 -194
  594. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +0 -36
  595. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +0 -55
  596. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +0 -30
  597. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +0 -17
  598. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +0 -41
  599. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +0 -32
  600. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +0 -18
  601. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +0 -8
  602. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +0 -30
  603. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +0 -28
  604. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +0 -457
  605. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +0 -62
  606. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +0 -63
  607. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +0 -59
  608. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +0 -68
  609. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +0 -65
  610. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +0 -100
  611. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +0 -1135
  612. data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
  613. data/ext/rj_schema/rapidjson/travis-doxygen.sh +0 -121
@@ -1,147 +0,0 @@
1
- // Copyright 2007, Google Inc.
2
- // All rights reserved.
3
- //
4
- // Redistribution and use in source and binary forms, with or without
5
- // modification, are permitted provided that the following conditions are
6
- // met:
7
- //
8
- // * Redistributions of source code must retain the above copyright
9
- // notice, this list of conditions and the following disclaimer.
10
- // * Redistributions in binary form must reproduce the above
11
- // copyright notice, this list of conditions and the following disclaimer
12
- // in the documentation and/or other materials provided with the
13
- // distribution.
14
- // * Neither the name of Google Inc. nor the names of its
15
- // contributors may be used to endorse or promote products derived from
16
- // this software without specific prior written permission.
17
- //
18
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
- //
30
- // Author: wan@google.com (Zhanyong Wan)
31
-
32
- // Google Mock - a framework for writing C++ mock classes.
33
- //
34
- // This file implements some commonly used cardinalities. More
35
- // cardinalities can be defined by the user implementing the
36
- // CardinalityInterface interface if necessary.
37
-
38
- #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
39
- #define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
40
-
41
- #include <limits.h>
42
- #include <ostream> // NOLINT
43
- #include "gmock/internal/gmock-port.h"
44
- #include "gtest/gtest.h"
45
-
46
- namespace testing {
47
-
48
- // To implement a cardinality Foo, define:
49
- // 1. a class FooCardinality that implements the
50
- // CardinalityInterface interface, and
51
- // 2. a factory function that creates a Cardinality object from a
52
- // const FooCardinality*.
53
- //
54
- // The two-level delegation design follows that of Matcher, providing
55
- // consistency for extension developers. It also eases ownership
56
- // management as Cardinality objects can now be copied like plain values.
57
-
58
- // The implementation of a cardinality.
59
- class CardinalityInterface {
60
- public:
61
- virtual ~CardinalityInterface() {}
62
-
63
- // Conservative estimate on the lower/upper bound of the number of
64
- // calls allowed.
65
- virtual int ConservativeLowerBound() const { return 0; }
66
- virtual int ConservativeUpperBound() const { return INT_MAX; }
67
-
68
- // Returns true iff call_count calls will satisfy this cardinality.
69
- virtual bool IsSatisfiedByCallCount(int call_count) const = 0;
70
-
71
- // Returns true iff call_count calls will saturate this cardinality.
72
- virtual bool IsSaturatedByCallCount(int call_count) const = 0;
73
-
74
- // Describes self to an ostream.
75
- virtual void DescribeTo(::std::ostream* os) const = 0;
76
- };
77
-
78
- // A Cardinality is a copyable and IMMUTABLE (except by assignment)
79
- // object that specifies how many times a mock function is expected to
80
- // be called. The implementation of Cardinality is just a linked_ptr
81
- // to const CardinalityInterface, so copying is fairly cheap.
82
- // Don't inherit from Cardinality!
83
- class GTEST_API_ Cardinality {
84
- public:
85
- // Constructs a null cardinality. Needed for storing Cardinality
86
- // objects in STL containers.
87
- Cardinality() {}
88
-
89
- // Constructs a Cardinality from its implementation.
90
- explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {}
91
-
92
- // Conservative estimate on the lower/upper bound of the number of
93
- // calls allowed.
94
- int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); }
95
- int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); }
96
-
97
- // Returns true iff call_count calls will satisfy this cardinality.
98
- bool IsSatisfiedByCallCount(int call_count) const {
99
- return impl_->IsSatisfiedByCallCount(call_count);
100
- }
101
-
102
- // Returns true iff call_count calls will saturate this cardinality.
103
- bool IsSaturatedByCallCount(int call_count) const {
104
- return impl_->IsSaturatedByCallCount(call_count);
105
- }
106
-
107
- // Returns true iff call_count calls will over-saturate this
108
- // cardinality, i.e. exceed the maximum number of allowed calls.
109
- bool IsOverSaturatedByCallCount(int call_count) const {
110
- return impl_->IsSaturatedByCallCount(call_count) &&
111
- !impl_->IsSatisfiedByCallCount(call_count);
112
- }
113
-
114
- // Describes self to an ostream
115
- void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }
116
-
117
- // Describes the given actual call count to an ostream.
118
- static void DescribeActualCallCountTo(int actual_call_count,
119
- ::std::ostream* os);
120
-
121
- private:
122
- internal::linked_ptr<const CardinalityInterface> impl_;
123
- };
124
-
125
- // Creates a cardinality that allows at least n calls.
126
- GTEST_API_ Cardinality AtLeast(int n);
127
-
128
- // Creates a cardinality that allows at most n calls.
129
- GTEST_API_ Cardinality AtMost(int n);
130
-
131
- // Creates a cardinality that allows any number of calls.
132
- GTEST_API_ Cardinality AnyNumber();
133
-
134
- // Creates a cardinality that allows between min and max calls.
135
- GTEST_API_ Cardinality Between(int min, int max);
136
-
137
- // Creates a cardinality that allows exactly n calls.
138
- GTEST_API_ Cardinality Exactly(int n);
139
-
140
- // Creates a cardinality from its implementation.
141
- inline Cardinality MakeCardinality(const CardinalityInterface* c) {
142
- return Cardinality(c);
143
- }
144
-
145
- } // namespace testing
146
-
147
- #endif // GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
@@ -1,2377 +0,0 @@
1
- // This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
2
-
3
- // Copyright 2007, Google Inc.
4
- // All rights reserved.
5
- //
6
- // Redistribution and use in source and binary forms, with or without
7
- // modification, are permitted provided that the following conditions are
8
- // met:
9
- //
10
- // * Redistributions of source code must retain the above copyright
11
- // notice, this list of conditions and the following disclaimer.
12
- // * Redistributions in binary form must reproduce the above
13
- // copyright notice, this list of conditions and the following disclaimer
14
- // in the documentation and/or other materials provided with the
15
- // distribution.
16
- // * Neither the name of Google Inc. nor the names of its
17
- // contributors may be used to endorse or promote products derived from
18
- // this software without specific prior written permission.
19
- //
20
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
- //
32
- // Author: wan@google.com (Zhanyong Wan)
33
-
34
- // Google Mock - a framework for writing C++ mock classes.
35
- //
36
- // This file implements some commonly used variadic actions.
37
-
38
- #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
39
- #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
40
-
41
- #include "gmock/gmock-actions.h"
42
- #include "gmock/internal/gmock-port.h"
43
-
44
- namespace testing {
45
- namespace internal {
46
-
47
- // InvokeHelper<F> knows how to unpack an N-tuple and invoke an N-ary
48
- // function or method with the unpacked values, where F is a function
49
- // type that takes N arguments.
50
- template <typename Result, typename ArgumentTuple>
51
- class InvokeHelper;
52
-
53
- template <typename R>
54
- class InvokeHelper<R, ::testing::tuple<> > {
55
- public:
56
- template <typename Function>
57
- static R Invoke(Function function, const ::testing::tuple<>&) {
58
- return function();
59
- }
60
-
61
- template <class Class, typename MethodPtr>
62
- static R InvokeMethod(Class* obj_ptr,
63
- MethodPtr method_ptr,
64
- const ::testing::tuple<>&) {
65
- return (obj_ptr->*method_ptr)();
66
- }
67
- };
68
-
69
- template <typename R, typename A1>
70
- class InvokeHelper<R, ::testing::tuple<A1> > {
71
- public:
72
- template <typename Function>
73
- static R Invoke(Function function, const ::testing::tuple<A1>& args) {
74
- return function(get<0>(args));
75
- }
76
-
77
- template <class Class, typename MethodPtr>
78
- static R InvokeMethod(Class* obj_ptr,
79
- MethodPtr method_ptr,
80
- const ::testing::tuple<A1>& args) {
81
- return (obj_ptr->*method_ptr)(get<0>(args));
82
- }
83
- };
84
-
85
- template <typename R, typename A1, typename A2>
86
- class InvokeHelper<R, ::testing::tuple<A1, A2> > {
87
- public:
88
- template <typename Function>
89
- static R Invoke(Function function, const ::testing::tuple<A1, A2>& args) {
90
- return function(get<0>(args), get<1>(args));
91
- }
92
-
93
- template <class Class, typename MethodPtr>
94
- static R InvokeMethod(Class* obj_ptr,
95
- MethodPtr method_ptr,
96
- const ::testing::tuple<A1, A2>& args) {
97
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args));
98
- }
99
- };
100
-
101
- template <typename R, typename A1, typename A2, typename A3>
102
- class InvokeHelper<R, ::testing::tuple<A1, A2, A3> > {
103
- public:
104
- template <typename Function>
105
- static R Invoke(Function function, const ::testing::tuple<A1, A2, A3>& args) {
106
- return function(get<0>(args), get<1>(args), get<2>(args));
107
- }
108
-
109
- template <class Class, typename MethodPtr>
110
- static R InvokeMethod(Class* obj_ptr,
111
- MethodPtr method_ptr,
112
- const ::testing::tuple<A1, A2, A3>& args) {
113
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
114
- get<2>(args));
115
- }
116
- };
117
-
118
- template <typename R, typename A1, typename A2, typename A3, typename A4>
119
- class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4> > {
120
- public:
121
- template <typename Function>
122
- static R Invoke(Function function, const ::testing::tuple<A1, A2, A3,
123
- A4>& args) {
124
- return function(get<0>(args), get<1>(args), get<2>(args),
125
- get<3>(args));
126
- }
127
-
128
- template <class Class, typename MethodPtr>
129
- static R InvokeMethod(Class* obj_ptr,
130
- MethodPtr method_ptr,
131
- const ::testing::tuple<A1, A2, A3, A4>& args) {
132
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
133
- get<2>(args), get<3>(args));
134
- }
135
- };
136
-
137
- template <typename R, typename A1, typename A2, typename A3, typename A4,
138
- typename A5>
139
- class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5> > {
140
- public:
141
- template <typename Function>
142
- static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4,
143
- A5>& args) {
144
- return function(get<0>(args), get<1>(args), get<2>(args),
145
- get<3>(args), get<4>(args));
146
- }
147
-
148
- template <class Class, typename MethodPtr>
149
- static R InvokeMethod(Class* obj_ptr,
150
- MethodPtr method_ptr,
151
- const ::testing::tuple<A1, A2, A3, A4, A5>& args) {
152
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
153
- get<2>(args), get<3>(args), get<4>(args));
154
- }
155
- };
156
-
157
- template <typename R, typename A1, typename A2, typename A3, typename A4,
158
- typename A5, typename A6>
159
- class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6> > {
160
- public:
161
- template <typename Function>
162
- static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
163
- A6>& args) {
164
- return function(get<0>(args), get<1>(args), get<2>(args),
165
- get<3>(args), get<4>(args), get<5>(args));
166
- }
167
-
168
- template <class Class, typename MethodPtr>
169
- static R InvokeMethod(Class* obj_ptr,
170
- MethodPtr method_ptr,
171
- const ::testing::tuple<A1, A2, A3, A4, A5, A6>& args) {
172
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
173
- get<2>(args), get<3>(args), get<4>(args), get<5>(args));
174
- }
175
- };
176
-
177
- template <typename R, typename A1, typename A2, typename A3, typename A4,
178
- typename A5, typename A6, typename A7>
179
- class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> > {
180
- public:
181
- template <typename Function>
182
- static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
183
- A6, A7>& args) {
184
- return function(get<0>(args), get<1>(args), get<2>(args),
185
- get<3>(args), get<4>(args), get<5>(args), get<6>(args));
186
- }
187
-
188
- template <class Class, typename MethodPtr>
189
- static R InvokeMethod(Class* obj_ptr,
190
- MethodPtr method_ptr,
191
- const ::testing::tuple<A1, A2, A3, A4, A5, A6,
192
- A7>& args) {
193
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
194
- get<2>(args), get<3>(args), get<4>(args), get<5>(args),
195
- get<6>(args));
196
- }
197
- };
198
-
199
- template <typename R, typename A1, typename A2, typename A3, typename A4,
200
- typename A5, typename A6, typename A7, typename A8>
201
- class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
202
- public:
203
- template <typename Function>
204
- static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
205
- A6, A7, A8>& args) {
206
- return function(get<0>(args), get<1>(args), get<2>(args),
207
- get<3>(args), get<4>(args), get<5>(args), get<6>(args),
208
- get<7>(args));
209
- }
210
-
211
- template <class Class, typename MethodPtr>
212
- static R InvokeMethod(Class* obj_ptr,
213
- MethodPtr method_ptr,
214
- const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7,
215
- A8>& args) {
216
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
217
- get<2>(args), get<3>(args), get<4>(args), get<5>(args),
218
- get<6>(args), get<7>(args));
219
- }
220
- };
221
-
222
- template <typename R, typename A1, typename A2, typename A3, typename A4,
223
- typename A5, typename A6, typename A7, typename A8, typename A9>
224
- class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
225
- public:
226
- template <typename Function>
227
- static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
228
- A6, A7, A8, A9>& args) {
229
- return function(get<0>(args), get<1>(args), get<2>(args),
230
- get<3>(args), get<4>(args), get<5>(args), get<6>(args),
231
- get<7>(args), get<8>(args));
232
- }
233
-
234
- template <class Class, typename MethodPtr>
235
- static R InvokeMethod(Class* obj_ptr,
236
- MethodPtr method_ptr,
237
- const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
238
- A9>& args) {
239
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
240
- get<2>(args), get<3>(args), get<4>(args), get<5>(args),
241
- get<6>(args), get<7>(args), get<8>(args));
242
- }
243
- };
244
-
245
- template <typename R, typename A1, typename A2, typename A3, typename A4,
246
- typename A5, typename A6, typename A7, typename A8, typename A9,
247
- typename A10>
248
- class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
249
- A10> > {
250
- public:
251
- template <typename Function>
252
- static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
253
- A6, A7, A8, A9, A10>& args) {
254
- return function(get<0>(args), get<1>(args), get<2>(args),
255
- get<3>(args), get<4>(args), get<5>(args), get<6>(args),
256
- get<7>(args), get<8>(args), get<9>(args));
257
- }
258
-
259
- template <class Class, typename MethodPtr>
260
- static R InvokeMethod(Class* obj_ptr,
261
- MethodPtr method_ptr,
262
- const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
263
- A9, A10>& args) {
264
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
265
- get<2>(args), get<3>(args), get<4>(args), get<5>(args),
266
- get<6>(args), get<7>(args), get<8>(args), get<9>(args));
267
- }
268
- };
269
-
270
- // An INTERNAL macro for extracting the type of a tuple field. It's
271
- // subject to change without notice - DO NOT USE IN USER CODE!
272
- #define GMOCK_FIELD_(Tuple, N) \
273
- typename ::testing::tuple_element<N, Tuple>::type
274
-
275
- // SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::type is the
276
- // type of an n-ary function whose i-th (1-based) argument type is the
277
- // k{i}-th (0-based) field of ArgumentTuple, which must be a tuple
278
- // type, and whose return type is Result. For example,
279
- // SelectArgs<int, ::testing::tuple<bool, char, double, long>, 0, 3>::type
280
- // is int(bool, long).
281
- //
282
- // SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::Select(args)
283
- // returns the selected fields (k1, k2, ..., k_n) of args as a tuple.
284
- // For example,
285
- // SelectArgs<int, tuple<bool, char, double>, 2, 0>::Select(
286
- // ::testing::make_tuple(true, 'a', 2.5))
287
- // returns tuple (2.5, true).
288
- //
289
- // The numbers in list k1, k2, ..., k_n must be >= 0, where n can be
290
- // in the range [0, 10]. Duplicates are allowed and they don't have
291
- // to be in an ascending or descending order.
292
-
293
- template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
294
- int k4, int k5, int k6, int k7, int k8, int k9, int k10>
295
- class SelectArgs {
296
- public:
297
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
298
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
299
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
300
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
301
- GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9),
302
- GMOCK_FIELD_(ArgumentTuple, k10));
303
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
304
- static SelectedArgs Select(const ArgumentTuple& args) {
305
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
306
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
307
- get<k8>(args), get<k9>(args), get<k10>(args));
308
- }
309
- };
310
-
311
- template <typename Result, typename ArgumentTuple>
312
- class SelectArgs<Result, ArgumentTuple,
313
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
314
- public:
315
- typedef Result type();
316
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
317
- static SelectedArgs Select(const ArgumentTuple& /* args */) {
318
- return SelectedArgs();
319
- }
320
- };
321
-
322
- template <typename Result, typename ArgumentTuple, int k1>
323
- class SelectArgs<Result, ArgumentTuple,
324
- k1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
325
- public:
326
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1));
327
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
328
- static SelectedArgs Select(const ArgumentTuple& args) {
329
- return SelectedArgs(get<k1>(args));
330
- }
331
- };
332
-
333
- template <typename Result, typename ArgumentTuple, int k1, int k2>
334
- class SelectArgs<Result, ArgumentTuple,
335
- k1, k2, -1, -1, -1, -1, -1, -1, -1, -1> {
336
- public:
337
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
338
- GMOCK_FIELD_(ArgumentTuple, k2));
339
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
340
- static SelectedArgs Select(const ArgumentTuple& args) {
341
- return SelectedArgs(get<k1>(args), get<k2>(args));
342
- }
343
- };
344
-
345
- template <typename Result, typename ArgumentTuple, int k1, int k2, int k3>
346
- class SelectArgs<Result, ArgumentTuple,
347
- k1, k2, k3, -1, -1, -1, -1, -1, -1, -1> {
348
- public:
349
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
350
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3));
351
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
352
- static SelectedArgs Select(const ArgumentTuple& args) {
353
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args));
354
- }
355
- };
356
-
357
- template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
358
- int k4>
359
- class SelectArgs<Result, ArgumentTuple,
360
- k1, k2, k3, k4, -1, -1, -1, -1, -1, -1> {
361
- public:
362
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
363
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
364
- GMOCK_FIELD_(ArgumentTuple, k4));
365
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
366
- static SelectedArgs Select(const ArgumentTuple& args) {
367
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
368
- get<k4>(args));
369
- }
370
- };
371
-
372
- template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
373
- int k4, int k5>
374
- class SelectArgs<Result, ArgumentTuple,
375
- k1, k2, k3, k4, k5, -1, -1, -1, -1, -1> {
376
- public:
377
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
378
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
379
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5));
380
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
381
- static SelectedArgs Select(const ArgumentTuple& args) {
382
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
383
- get<k4>(args), get<k5>(args));
384
- }
385
- };
386
-
387
- template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
388
- int k4, int k5, int k6>
389
- class SelectArgs<Result, ArgumentTuple,
390
- k1, k2, k3, k4, k5, k6, -1, -1, -1, -1> {
391
- public:
392
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
393
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
394
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
395
- GMOCK_FIELD_(ArgumentTuple, k6));
396
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
397
- static SelectedArgs Select(const ArgumentTuple& args) {
398
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
399
- get<k4>(args), get<k5>(args), get<k6>(args));
400
- }
401
- };
402
-
403
- template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
404
- int k4, int k5, int k6, int k7>
405
- class SelectArgs<Result, ArgumentTuple,
406
- k1, k2, k3, k4, k5, k6, k7, -1, -1, -1> {
407
- public:
408
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
409
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
410
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
411
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7));
412
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
413
- static SelectedArgs Select(const ArgumentTuple& args) {
414
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
415
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args));
416
- }
417
- };
418
-
419
- template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
420
- int k4, int k5, int k6, int k7, int k8>
421
- class SelectArgs<Result, ArgumentTuple,
422
- k1, k2, k3, k4, k5, k6, k7, k8, -1, -1> {
423
- public:
424
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
425
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
426
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
427
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
428
- GMOCK_FIELD_(ArgumentTuple, k8));
429
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
430
- static SelectedArgs Select(const ArgumentTuple& args) {
431
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
432
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
433
- get<k8>(args));
434
- }
435
- };
436
-
437
- template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
438
- int k4, int k5, int k6, int k7, int k8, int k9>
439
- class SelectArgs<Result, ArgumentTuple,
440
- k1, k2, k3, k4, k5, k6, k7, k8, k9, -1> {
441
- public:
442
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
443
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
444
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
445
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
446
- GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9));
447
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
448
- static SelectedArgs Select(const ArgumentTuple& args) {
449
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
450
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
451
- get<k8>(args), get<k9>(args));
452
- }
453
- };
454
-
455
- #undef GMOCK_FIELD_
456
-
457
- // Implements the WithArgs action.
458
- template <typename InnerAction, int k1 = -1, int k2 = -1, int k3 = -1,
459
- int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
460
- int k9 = -1, int k10 = -1>
461
- class WithArgsAction {
462
- public:
463
- explicit WithArgsAction(const InnerAction& action) : action_(action) {}
464
-
465
- template <typename F>
466
- operator Action<F>() const { return MakeAction(new Impl<F>(action_)); }
467
-
468
- private:
469
- template <typename F>
470
- class Impl : public ActionInterface<F> {
471
- public:
472
- typedef typename Function<F>::Result Result;
473
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
474
-
475
- explicit Impl(const InnerAction& action) : action_(action) {}
476
-
477
- virtual Result Perform(const ArgumentTuple& args) {
478
- return action_.Perform(SelectArgs<Result, ArgumentTuple, k1, k2, k3, k4,
479
- k5, k6, k7, k8, k9, k10>::Select(args));
480
- }
481
-
482
- private:
483
- typedef typename SelectArgs<Result, ArgumentTuple,
484
- k1, k2, k3, k4, k5, k6, k7, k8, k9, k10>::type InnerFunctionType;
485
-
486
- Action<InnerFunctionType> action_;
487
- };
488
-
489
- const InnerAction action_;
490
-
491
- GTEST_DISALLOW_ASSIGN_(WithArgsAction);
492
- };
493
-
494
- // A macro from the ACTION* family (defined later in this file)
495
- // defines an action that can be used in a mock function. Typically,
496
- // these actions only care about a subset of the arguments of the mock
497
- // function. For example, if such an action only uses the second
498
- // argument, it can be used in any mock function that takes >= 2
499
- // arguments where the type of the second argument is compatible.
500
- //
501
- // Therefore, the action implementation must be prepared to take more
502
- // arguments than it needs. The ExcessiveArg type is used to
503
- // represent those excessive arguments. In order to keep the compiler
504
- // error messages tractable, we define it in the testing namespace
505
- // instead of testing::internal. However, this is an INTERNAL TYPE
506
- // and subject to change without notice, so a user MUST NOT USE THIS
507
- // TYPE DIRECTLY.
508
- struct ExcessiveArg {};
509
-
510
- // A helper class needed for implementing the ACTION* macros.
511
- template <typename Result, class Impl>
512
- class ActionHelper {
513
- public:
514
- static Result Perform(Impl* impl, const ::testing::tuple<>& args) {
515
- return impl->template gmock_PerformImpl<>(args, ExcessiveArg(),
516
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
517
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
518
- ExcessiveArg());
519
- }
520
-
521
- template <typename A0>
522
- static Result Perform(Impl* impl, const ::testing::tuple<A0>& args) {
523
- return impl->template gmock_PerformImpl<A0>(args, get<0>(args),
524
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
525
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
526
- ExcessiveArg());
527
- }
528
-
529
- template <typename A0, typename A1>
530
- static Result Perform(Impl* impl, const ::testing::tuple<A0, A1>& args) {
531
- return impl->template gmock_PerformImpl<A0, A1>(args, get<0>(args),
532
- get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
533
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
534
- ExcessiveArg());
535
- }
536
-
537
- template <typename A0, typename A1, typename A2>
538
- static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2>& args) {
539
- return impl->template gmock_PerformImpl<A0, A1, A2>(args, get<0>(args),
540
- get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(),
541
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
542
- ExcessiveArg());
543
- }
544
-
545
- template <typename A0, typename A1, typename A2, typename A3>
546
- static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2,
547
- A3>& args) {
548
- return impl->template gmock_PerformImpl<A0, A1, A2, A3>(args, get<0>(args),
549
- get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(),
550
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
551
- ExcessiveArg());
552
- }
553
-
554
- template <typename A0, typename A1, typename A2, typename A3, typename A4>
555
- static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3,
556
- A4>& args) {
557
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4>(args,
558
- get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
559
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
560
- ExcessiveArg());
561
- }
562
-
563
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
564
- typename A5>
565
- static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
566
- A5>& args) {
567
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5>(args,
568
- get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
569
- get<5>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
570
- ExcessiveArg());
571
- }
572
-
573
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
574
- typename A5, typename A6>
575
- static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
576
- A5, A6>& args) {
577
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6>(args,
578
- get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
579
- get<5>(args), get<6>(args), ExcessiveArg(), ExcessiveArg(),
580
- ExcessiveArg());
581
- }
582
-
583
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
584
- typename A5, typename A6, typename A7>
585
- static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
586
- A5, A6, A7>& args) {
587
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6,
588
- A7>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
589
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(),
590
- ExcessiveArg());
591
- }
592
-
593
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
594
- typename A5, typename A6, typename A7, typename A8>
595
- static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
596
- A5, A6, A7, A8>& args) {
597
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7,
598
- A8>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
599
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
600
- ExcessiveArg());
601
- }
602
-
603
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
604
- typename A5, typename A6, typename A7, typename A8, typename A9>
605
- static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
606
- A5, A6, A7, A8, A9>& args) {
607
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7, A8,
608
- A9>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
609
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
610
- get<9>(args));
611
- }
612
- };
613
-
614
- } // namespace internal
615
-
616
- // Various overloads for Invoke().
617
-
618
- // WithArgs<N1, N2, ..., Nk>(an_action) creates an action that passes
619
- // the selected arguments of the mock function to an_action and
620
- // performs it. It serves as an adaptor between actions with
621
- // different argument lists. C++ doesn't support default arguments for
622
- // function templates, so we have to overload it.
623
- template <int k1, typename InnerAction>
624
- inline internal::WithArgsAction<InnerAction, k1>
625
- WithArgs(const InnerAction& action) {
626
- return internal::WithArgsAction<InnerAction, k1>(action);
627
- }
628
-
629
- template <int k1, int k2, typename InnerAction>
630
- inline internal::WithArgsAction<InnerAction, k1, k2>
631
- WithArgs(const InnerAction& action) {
632
- return internal::WithArgsAction<InnerAction, k1, k2>(action);
633
- }
634
-
635
- template <int k1, int k2, int k3, typename InnerAction>
636
- inline internal::WithArgsAction<InnerAction, k1, k2, k3>
637
- WithArgs(const InnerAction& action) {
638
- return internal::WithArgsAction<InnerAction, k1, k2, k3>(action);
639
- }
640
-
641
- template <int k1, int k2, int k3, int k4, typename InnerAction>
642
- inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4>
643
- WithArgs(const InnerAction& action) {
644
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4>(action);
645
- }
646
-
647
- template <int k1, int k2, int k3, int k4, int k5, typename InnerAction>
648
- inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5>
649
- WithArgs(const InnerAction& action) {
650
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5>(action);
651
- }
652
-
653
- template <int k1, int k2, int k3, int k4, int k5, int k6, typename InnerAction>
654
- inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6>
655
- WithArgs(const InnerAction& action) {
656
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6>(action);
657
- }
658
-
659
- template <int k1, int k2, int k3, int k4, int k5, int k6, int k7,
660
- typename InnerAction>
661
- inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7>
662
- WithArgs(const InnerAction& action) {
663
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6,
664
- k7>(action);
665
- }
666
-
667
- template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
668
- typename InnerAction>
669
- inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8>
670
- WithArgs(const InnerAction& action) {
671
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7,
672
- k8>(action);
673
- }
674
-
675
- template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
676
- int k9, typename InnerAction>
677
- inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8, k9>
678
- WithArgs(const InnerAction& action) {
679
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
680
- k9>(action);
681
- }
682
-
683
- template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
684
- int k9, int k10, typename InnerAction>
685
- inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
686
- k9, k10>
687
- WithArgs(const InnerAction& action) {
688
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
689
- k9, k10>(action);
690
- }
691
-
692
- // Creates an action that does actions a1, a2, ..., sequentially in
693
- // each invocation.
694
- template <typename Action1, typename Action2>
695
- inline internal::DoBothAction<Action1, Action2>
696
- DoAll(Action1 a1, Action2 a2) {
697
- return internal::DoBothAction<Action1, Action2>(a1, a2);
698
- }
699
-
700
- template <typename Action1, typename Action2, typename Action3>
701
- inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
702
- Action3> >
703
- DoAll(Action1 a1, Action2 a2, Action3 a3) {
704
- return DoAll(a1, DoAll(a2, a3));
705
- }
706
-
707
- template <typename Action1, typename Action2, typename Action3,
708
- typename Action4>
709
- inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
710
- internal::DoBothAction<Action3, Action4> > >
711
- DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4) {
712
- return DoAll(a1, DoAll(a2, a3, a4));
713
- }
714
-
715
- template <typename Action1, typename Action2, typename Action3,
716
- typename Action4, typename Action5>
717
- inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
718
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
719
- Action5> > > >
720
- DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5) {
721
- return DoAll(a1, DoAll(a2, a3, a4, a5));
722
- }
723
-
724
- template <typename Action1, typename Action2, typename Action3,
725
- typename Action4, typename Action5, typename Action6>
726
- inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
727
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
728
- internal::DoBothAction<Action5, Action6> > > > >
729
- DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6) {
730
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6));
731
- }
732
-
733
- template <typename Action1, typename Action2, typename Action3,
734
- typename Action4, typename Action5, typename Action6, typename Action7>
735
- inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
736
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
737
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
738
- Action7> > > > > >
739
- DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
740
- Action7 a7) {
741
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7));
742
- }
743
-
744
- template <typename Action1, typename Action2, typename Action3,
745
- typename Action4, typename Action5, typename Action6, typename Action7,
746
- typename Action8>
747
- inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
748
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
749
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
750
- internal::DoBothAction<Action7, Action8> > > > > > >
751
- DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
752
- Action7 a7, Action8 a8) {
753
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8));
754
- }
755
-
756
- template <typename Action1, typename Action2, typename Action3,
757
- typename Action4, typename Action5, typename Action6, typename Action7,
758
- typename Action8, typename Action9>
759
- inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
760
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
761
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
762
- internal::DoBothAction<Action7, internal::DoBothAction<Action8,
763
- Action9> > > > > > > >
764
- DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
765
- Action7 a7, Action8 a8, Action9 a9) {
766
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9));
767
- }
768
-
769
- template <typename Action1, typename Action2, typename Action3,
770
- typename Action4, typename Action5, typename Action6, typename Action7,
771
- typename Action8, typename Action9, typename Action10>
772
- inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
773
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
774
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
775
- internal::DoBothAction<Action7, internal::DoBothAction<Action8,
776
- internal::DoBothAction<Action9, Action10> > > > > > > > >
777
- DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
778
- Action7 a7, Action8 a8, Action9 a9, Action10 a10) {
779
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10));
780
- }
781
-
782
- } // namespace testing
783
-
784
- // The ACTION* family of macros can be used in a namespace scope to
785
- // define custom actions easily. The syntax:
786
- //
787
- // ACTION(name) { statements; }
788
- //
789
- // will define an action with the given name that executes the
790
- // statements. The value returned by the statements will be used as
791
- // the return value of the action. Inside the statements, you can
792
- // refer to the K-th (0-based) argument of the mock function by
793
- // 'argK', and refer to its type by 'argK_type'. For example:
794
- //
795
- // ACTION(IncrementArg1) {
796
- // arg1_type temp = arg1;
797
- // return ++(*temp);
798
- // }
799
- //
800
- // allows you to write
801
- //
802
- // ...WillOnce(IncrementArg1());
803
- //
804
- // You can also refer to the entire argument tuple and its type by
805
- // 'args' and 'args_type', and refer to the mock function type and its
806
- // return type by 'function_type' and 'return_type'.
807
- //
808
- // Note that you don't need to specify the types of the mock function
809
- // arguments. However rest assured that your code is still type-safe:
810
- // you'll get a compiler error if *arg1 doesn't support the ++
811
- // operator, or if the type of ++(*arg1) isn't compatible with the
812
- // mock function's return type, for example.
813
- //
814
- // Sometimes you'll want to parameterize the action. For that you can use
815
- // another macro:
816
- //
817
- // ACTION_P(name, param_name) { statements; }
818
- //
819
- // For example:
820
- //
821
- // ACTION_P(Add, n) { return arg0 + n; }
822
- //
823
- // will allow you to write:
824
- //
825
- // ...WillOnce(Add(5));
826
- //
827
- // Note that you don't need to provide the type of the parameter
828
- // either. If you need to reference the type of a parameter named
829
- // 'foo', you can write 'foo_type'. For example, in the body of
830
- // ACTION_P(Add, n) above, you can write 'n_type' to refer to the type
831
- // of 'n'.
832
- //
833
- // We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support
834
- // multi-parameter actions.
835
- //
836
- // For the purpose of typing, you can view
837
- //
838
- // ACTION_Pk(Foo, p1, ..., pk) { ... }
839
- //
840
- // as shorthand for
841
- //
842
- // template <typename p1_type, ..., typename pk_type>
843
- // FooActionPk<p1_type, ..., pk_type> Foo(p1_type p1, ..., pk_type pk) { ... }
844
- //
845
- // In particular, you can provide the template type arguments
846
- // explicitly when invoking Foo(), as in Foo<long, bool>(5, false);
847
- // although usually you can rely on the compiler to infer the types
848
- // for you automatically. You can assign the result of expression
849
- // Foo(p1, ..., pk) to a variable of type FooActionPk<p1_type, ...,
850
- // pk_type>. This can be useful when composing actions.
851
- //
852
- // You can also overload actions with different numbers of parameters:
853
- //
854
- // ACTION_P(Plus, a) { ... }
855
- // ACTION_P2(Plus, a, b) { ... }
856
- //
857
- // While it's tempting to always use the ACTION* macros when defining
858
- // a new action, you should also consider implementing ActionInterface
859
- // or using MakePolymorphicAction() instead, especially if you need to
860
- // use the action a lot. While these approaches require more work,
861
- // they give you more control on the types of the mock function
862
- // arguments and the action parameters, which in general leads to
863
- // better compiler error messages that pay off in the long run. They
864
- // also allow overloading actions based on parameter types (as opposed
865
- // to just based on the number of parameters).
866
- //
867
- // CAVEAT:
868
- //
869
- // ACTION*() can only be used in a namespace scope. The reason is
870
- // that C++ doesn't yet allow function-local types to be used to
871
- // instantiate templates. The up-coming C++0x standard will fix this.
872
- // Once that's done, we'll consider supporting using ACTION*() inside
873
- // a function.
874
- //
875
- // MORE INFORMATION:
876
- //
877
- // To learn more about using these macros, please search for 'ACTION'
878
- // on http://code.google.com/p/googlemock/wiki/CookBook.
879
-
880
- // An internal macro needed for implementing ACTION*().
881
- #define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\
882
- const args_type& args GTEST_ATTRIBUTE_UNUSED_, \
883
- arg0_type arg0 GTEST_ATTRIBUTE_UNUSED_, \
884
- arg1_type arg1 GTEST_ATTRIBUTE_UNUSED_, \
885
- arg2_type arg2 GTEST_ATTRIBUTE_UNUSED_, \
886
- arg3_type arg3 GTEST_ATTRIBUTE_UNUSED_, \
887
- arg4_type arg4 GTEST_ATTRIBUTE_UNUSED_, \
888
- arg5_type arg5 GTEST_ATTRIBUTE_UNUSED_, \
889
- arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_, \
890
- arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_, \
891
- arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_, \
892
- arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_
893
-
894
- // Sometimes you want to give an action explicit template parameters
895
- // that cannot be inferred from its value parameters. ACTION() and
896
- // ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that
897
- // and can be viewed as an extension to ACTION() and ACTION_P*().
898
- //
899
- // The syntax:
900
- //
901
- // ACTION_TEMPLATE(ActionName,
902
- // HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m),
903
- // AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; }
904
- //
905
- // defines an action template that takes m explicit template
906
- // parameters and n value parameters. name_i is the name of the i-th
907
- // template parameter, and kind_i specifies whether it's a typename,
908
- // an integral constant, or a template. p_i is the name of the i-th
909
- // value parameter.
910
- //
911
- // Example:
912
- //
913
- // // DuplicateArg<k, T>(output) converts the k-th argument of the mock
914
- // // function to type T and copies it to *output.
915
- // ACTION_TEMPLATE(DuplicateArg,
916
- // HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
917
- // AND_1_VALUE_PARAMS(output)) {
918
- // *output = T(::testing::get<k>(args));
919
- // }
920
- // ...
921
- // int n;
922
- // EXPECT_CALL(mock, Foo(_, _))
923
- // .WillOnce(DuplicateArg<1, unsigned char>(&n));
924
- //
925
- // To create an instance of an action template, write:
926
- //
927
- // ActionName<t1, ..., t_m>(v1, ..., v_n)
928
- //
929
- // where the ts are the template arguments and the vs are the value
930
- // arguments. The value argument types are inferred by the compiler.
931
- // If you want to explicitly specify the value argument types, you can
932
- // provide additional template arguments:
933
- //
934
- // ActionName<t1, ..., t_m, u1, ..., u_k>(v1, ..., v_n)
935
- //
936
- // where u_i is the desired type of v_i.
937
- //
938
- // ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the
939
- // number of value parameters, but not on the number of template
940
- // parameters. Without the restriction, the meaning of the following
941
- // is unclear:
942
- //
943
- // OverloadedAction<int, bool>(x);
944
- //
945
- // Are we using a single-template-parameter action where 'bool' refers
946
- // to the type of x, or are we using a two-template-parameter action
947
- // where the compiler is asked to infer the type of x?
948
- //
949
- // Implementation notes:
950
- //
951
- // GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and
952
- // GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for
953
- // implementing ACTION_TEMPLATE. The main trick we use is to create
954
- // new macro invocations when expanding a macro. For example, we have
955
- //
956
- // #define ACTION_TEMPLATE(name, template_params, value_params)
957
- // ... GMOCK_INTERNAL_DECL_##template_params ...
958
- //
959
- // which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...)
960
- // to expand to
961
- //
962
- // ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ...
963
- //
964
- // Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the
965
- // preprocessor will continue to expand it to
966
- //
967
- // ... typename T ...
968
- //
969
- // This technique conforms to the C++ standard and is portable. It
970
- // allows us to implement action templates using O(N) code, where N is
971
- // the maximum number of template/value parameters supported. Without
972
- // using it, we'd have to devote O(N^2) amount of code to implement all
973
- // combinations of m and n.
974
-
975
- // Declares the template parameters.
976
- #define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0
977
- #define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
978
- name1) kind0 name0, kind1 name1
979
- #define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
980
- kind2, name2) kind0 name0, kind1 name1, kind2 name2
981
- #define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
982
- kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \
983
- kind3 name3
984
- #define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
985
- kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \
986
- kind2 name2, kind3 name3, kind4 name4
987
- #define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
988
- kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \
989
- kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5
990
- #define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
991
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
992
- name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
993
- kind5 name5, kind6 name6
994
- #define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
995
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
996
- kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \
997
- kind4 name4, kind5 name5, kind6 name6, kind7 name7
998
- #define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
999
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
1000
- kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \
1001
- kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \
1002
- kind8 name8
1003
- #define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
1004
- name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
1005
- name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \
1006
- kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \
1007
- kind6 name6, kind7 name7, kind8 name8, kind9 name9
1008
-
1009
- // Lists the template parameters.
1010
- #define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0
1011
- #define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
1012
- name1) name0, name1
1013
- #define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
1014
- kind2, name2) name0, name1, name2
1015
- #define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
1016
- kind2, name2, kind3, name3) name0, name1, name2, name3
1017
- #define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
1018
- kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \
1019
- name4
1020
- #define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
1021
- kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \
1022
- name2, name3, name4, name5
1023
- #define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
1024
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
1025
- name6) name0, name1, name2, name3, name4, name5, name6
1026
- #define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
1027
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
1028
- kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7
1029
- #define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
1030
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
1031
- kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \
1032
- name6, name7, name8
1033
- #define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
1034
- name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
1035
- name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \
1036
- name3, name4, name5, name6, name7, name8, name9
1037
-
1038
- // Declares the types of value parameters.
1039
- #define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS()
1040
- #define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type
1041
- #define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \
1042
- typename p0##_type, typename p1##_type
1043
- #define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \
1044
- typename p0##_type, typename p1##_type, typename p2##_type
1045
- #define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
1046
- typename p0##_type, typename p1##_type, typename p2##_type, \
1047
- typename p3##_type
1048
- #define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
1049
- typename p0##_type, typename p1##_type, typename p2##_type, \
1050
- typename p3##_type, typename p4##_type
1051
- #define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
1052
- typename p0##_type, typename p1##_type, typename p2##_type, \
1053
- typename p3##_type, typename p4##_type, typename p5##_type
1054
- #define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1055
- p6) , typename p0##_type, typename p1##_type, typename p2##_type, \
1056
- typename p3##_type, typename p4##_type, typename p5##_type, \
1057
- typename p6##_type
1058
- #define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1059
- p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \
1060
- typename p3##_type, typename p4##_type, typename p5##_type, \
1061
- typename p6##_type, typename p7##_type
1062
- #define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1063
- p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \
1064
- typename p3##_type, typename p4##_type, typename p5##_type, \
1065
- typename p6##_type, typename p7##_type, typename p8##_type
1066
- #define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1067
- p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \
1068
- typename p2##_type, typename p3##_type, typename p4##_type, \
1069
- typename p5##_type, typename p6##_type, typename p7##_type, \
1070
- typename p8##_type, typename p9##_type
1071
-
1072
- // Initializes the value parameters.
1073
- #define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\
1074
- ()
1075
- #define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\
1076
- (p0##_type gmock_p0) : p0(gmock_p0)
1077
- #define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\
1078
- (p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), p1(gmock_p1)
1079
- #define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\
1080
- (p0##_type gmock_p0, p1##_type gmock_p1, \
1081
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2)
1082
- #define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\
1083
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1084
- p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1085
- p3(gmock_p3)
1086
- #define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\
1087
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1088
- p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), \
1089
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4)
1090
- #define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\
1091
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1092
- p3##_type gmock_p3, p4##_type gmock_p4, \
1093
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1094
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5)
1095
- #define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\
1096
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1097
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1098
- p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1099
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6)
1100
- #define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\
1101
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1102
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1103
- p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), \
1104
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
1105
- p7(gmock_p7)
1106
- #define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1107
- p7, p8)\
1108
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1109
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1110
- p6##_type gmock_p6, p7##_type gmock_p7, \
1111
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1112
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
1113
- p8(gmock_p8)
1114
- #define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1115
- p7, p8, p9)\
1116
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1117
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1118
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
1119
- p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1120
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
1121
- p8(gmock_p8), p9(gmock_p9)
1122
-
1123
- // Declares the fields for storing the value parameters.
1124
- #define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS()
1125
- #define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0;
1126
- #define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \
1127
- p1##_type p1;
1128
- #define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \
1129
- p1##_type p1; p2##_type p2;
1130
- #define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \
1131
- p1##_type p1; p2##_type p2; p3##_type p3;
1132
- #define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
1133
- p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4;
1134
- #define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
1135
- p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
1136
- p5##_type p5;
1137
- #define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1138
- p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
1139
- p5##_type p5; p6##_type p6;
1140
- #define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1141
- p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
1142
- p5##_type p5; p6##_type p6; p7##_type p7;
1143
- #define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1144
- p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
1145
- p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8;
1146
- #define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1147
- p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
1148
- p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \
1149
- p9##_type p9;
1150
-
1151
- // Lists the value parameters.
1152
- #define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS()
1153
- #define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0
1154
- #define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1
1155
- #define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2
1156
- #define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3
1157
- #define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \
1158
- p2, p3, p4
1159
- #define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \
1160
- p1, p2, p3, p4, p5
1161
- #define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1162
- p6) p0, p1, p2, p3, p4, p5, p6
1163
- #define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1164
- p7) p0, p1, p2, p3, p4, p5, p6, p7
1165
- #define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1166
- p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8
1167
- #define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1168
- p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9
1169
-
1170
- // Lists the value parameter types.
1171
- #define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS()
1172
- #define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type
1173
- #define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \
1174
- p1##_type
1175
- #define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \
1176
- p1##_type, p2##_type
1177
- #define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
1178
- p0##_type, p1##_type, p2##_type, p3##_type
1179
- #define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
1180
- p0##_type, p1##_type, p2##_type, p3##_type, p4##_type
1181
- #define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
1182
- p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type
1183
- #define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1184
- p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
1185
- p6##_type
1186
- #define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1187
- p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1188
- p5##_type, p6##_type, p7##_type
1189
- #define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1190
- p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1191
- p5##_type, p6##_type, p7##_type, p8##_type
1192
- #define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1193
- p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1194
- p5##_type, p6##_type, p7##_type, p8##_type, p9##_type
1195
-
1196
- // Declares the value parameters.
1197
- #define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS()
1198
- #define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0
1199
- #define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \
1200
- p1##_type p1
1201
- #define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \
1202
- p1##_type p1, p2##_type p2
1203
- #define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \
1204
- p1##_type p1, p2##_type p2, p3##_type p3
1205
- #define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
1206
- p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4
1207
- #define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
1208
- p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
1209
- p5##_type p5
1210
- #define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
1211
- p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
1212
- p5##_type p5, p6##_type p6
1213
- #define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1214
- p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
1215
- p5##_type p5, p6##_type p6, p7##_type p7
1216
- #define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1217
- p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
1218
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8
1219
- #define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1220
- p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
1221
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
1222
- p9##_type p9
1223
-
1224
- // The suffix of the class template implementing the action template.
1225
- #define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS()
1226
- #define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P
1227
- #define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2
1228
- #define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3
1229
- #define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4
1230
- #define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5
1231
- #define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6
1232
- #define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7
1233
- #define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1234
- p7) P8
1235
- #define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1236
- p7, p8) P9
1237
- #define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
1238
- p7, p8, p9) P10
1239
-
1240
- // The name of the class template implementing the action template.
1241
- #define GMOCK_ACTION_CLASS_(name, value_params)\
1242
- GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
1243
-
1244
- #define ACTION_TEMPLATE(name, template_params, value_params)\
1245
- template <GMOCK_INTERNAL_DECL_##template_params\
1246
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
1247
- class GMOCK_ACTION_CLASS_(name, value_params) {\
1248
- public:\
1249
- explicit GMOCK_ACTION_CLASS_(name, value_params)\
1250
- GMOCK_INTERNAL_INIT_##value_params {}\
1251
- template <typename F>\
1252
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1253
- public:\
1254
- typedef F function_type;\
1255
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1256
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1257
- args_type;\
1258
- explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\
1259
- virtual return_type Perform(const args_type& args) {\
1260
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1261
- Perform(this, args);\
1262
- }\
1263
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1264
- typename arg3_type, typename arg4_type, typename arg5_type, \
1265
- typename arg6_type, typename arg7_type, typename arg8_type, \
1266
- typename arg9_type>\
1267
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1268
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1269
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1270
- arg9_type arg9) const;\
1271
- GMOCK_INTERNAL_DEFN_##value_params\
1272
- private:\
1273
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1274
- };\
1275
- template <typename F> operator ::testing::Action<F>() const {\
1276
- return ::testing::Action<F>(\
1277
- new gmock_Impl<F>(GMOCK_INTERNAL_LIST_##value_params));\
1278
- }\
1279
- GMOCK_INTERNAL_DEFN_##value_params\
1280
- private:\
1281
- GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\
1282
- };\
1283
- template <GMOCK_INTERNAL_DECL_##template_params\
1284
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
1285
- inline GMOCK_ACTION_CLASS_(name, value_params)<\
1286
- GMOCK_INTERNAL_LIST_##template_params\
1287
- GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\
1288
- GMOCK_INTERNAL_DECL_##value_params) {\
1289
- return GMOCK_ACTION_CLASS_(name, value_params)<\
1290
- GMOCK_INTERNAL_LIST_##template_params\
1291
- GMOCK_INTERNAL_LIST_TYPE_##value_params>(\
1292
- GMOCK_INTERNAL_LIST_##value_params);\
1293
- }\
1294
- template <GMOCK_INTERNAL_DECL_##template_params\
1295
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
1296
- template <typename F>\
1297
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1298
- typename arg3_type, typename arg4_type, typename arg5_type, \
1299
- typename arg6_type, typename arg7_type, typename arg8_type, \
1300
- typename arg9_type>\
1301
- typename ::testing::internal::Function<F>::Result\
1302
- GMOCK_ACTION_CLASS_(name, value_params)<\
1303
- GMOCK_INTERNAL_LIST_##template_params\
1304
- GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl<F>::\
1305
- gmock_PerformImpl(\
1306
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1307
-
1308
- #define ACTION(name)\
1309
- class name##Action {\
1310
- public:\
1311
- name##Action() {}\
1312
- template <typename F>\
1313
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1314
- public:\
1315
- typedef F function_type;\
1316
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1317
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1318
- args_type;\
1319
- gmock_Impl() {}\
1320
- virtual return_type Perform(const args_type& args) {\
1321
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1322
- Perform(this, args);\
1323
- }\
1324
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1325
- typename arg3_type, typename arg4_type, typename arg5_type, \
1326
- typename arg6_type, typename arg7_type, typename arg8_type, \
1327
- typename arg9_type>\
1328
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1329
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1330
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1331
- arg9_type arg9) const;\
1332
- private:\
1333
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1334
- };\
1335
- template <typename F> operator ::testing::Action<F>() const {\
1336
- return ::testing::Action<F>(new gmock_Impl<F>());\
1337
- }\
1338
- private:\
1339
- GTEST_DISALLOW_ASSIGN_(name##Action);\
1340
- };\
1341
- inline name##Action name() {\
1342
- return name##Action();\
1343
- }\
1344
- template <typename F>\
1345
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1346
- typename arg3_type, typename arg4_type, typename arg5_type, \
1347
- typename arg6_type, typename arg7_type, typename arg8_type, \
1348
- typename arg9_type>\
1349
- typename ::testing::internal::Function<F>::Result\
1350
- name##Action::gmock_Impl<F>::gmock_PerformImpl(\
1351
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1352
-
1353
- #define ACTION_P(name, p0)\
1354
- template <typename p0##_type>\
1355
- class name##ActionP {\
1356
- public:\
1357
- explicit name##ActionP(p0##_type gmock_p0) : p0(gmock_p0) {}\
1358
- template <typename F>\
1359
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1360
- public:\
1361
- typedef F function_type;\
1362
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1363
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1364
- args_type;\
1365
- explicit gmock_Impl(p0##_type gmock_p0) : p0(gmock_p0) {}\
1366
- virtual return_type Perform(const args_type& args) {\
1367
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1368
- Perform(this, args);\
1369
- }\
1370
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1371
- typename arg3_type, typename arg4_type, typename arg5_type, \
1372
- typename arg6_type, typename arg7_type, typename arg8_type, \
1373
- typename arg9_type>\
1374
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1375
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1376
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1377
- arg9_type arg9) const;\
1378
- p0##_type p0;\
1379
- private:\
1380
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1381
- };\
1382
- template <typename F> operator ::testing::Action<F>() const {\
1383
- return ::testing::Action<F>(new gmock_Impl<F>(p0));\
1384
- }\
1385
- p0##_type p0;\
1386
- private:\
1387
- GTEST_DISALLOW_ASSIGN_(name##ActionP);\
1388
- };\
1389
- template <typename p0##_type>\
1390
- inline name##ActionP<p0##_type> name(p0##_type p0) {\
1391
- return name##ActionP<p0##_type>(p0);\
1392
- }\
1393
- template <typename p0##_type>\
1394
- template <typename F>\
1395
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1396
- typename arg3_type, typename arg4_type, typename arg5_type, \
1397
- typename arg6_type, typename arg7_type, typename arg8_type, \
1398
- typename arg9_type>\
1399
- typename ::testing::internal::Function<F>::Result\
1400
- name##ActionP<p0##_type>::gmock_Impl<F>::gmock_PerformImpl(\
1401
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1402
-
1403
- #define ACTION_P2(name, p0, p1)\
1404
- template <typename p0##_type, typename p1##_type>\
1405
- class name##ActionP2 {\
1406
- public:\
1407
- name##ActionP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
1408
- p1(gmock_p1) {}\
1409
- template <typename F>\
1410
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1411
- public:\
1412
- typedef F function_type;\
1413
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1414
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1415
- args_type;\
1416
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
1417
- p1(gmock_p1) {}\
1418
- virtual return_type Perform(const args_type& args) {\
1419
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1420
- Perform(this, args);\
1421
- }\
1422
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1423
- typename arg3_type, typename arg4_type, typename arg5_type, \
1424
- typename arg6_type, typename arg7_type, typename arg8_type, \
1425
- typename arg9_type>\
1426
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1427
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1428
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1429
- arg9_type arg9) const;\
1430
- p0##_type p0;\
1431
- p1##_type p1;\
1432
- private:\
1433
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1434
- };\
1435
- template <typename F> operator ::testing::Action<F>() const {\
1436
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1));\
1437
- }\
1438
- p0##_type p0;\
1439
- p1##_type p1;\
1440
- private:\
1441
- GTEST_DISALLOW_ASSIGN_(name##ActionP2);\
1442
- };\
1443
- template <typename p0##_type, typename p1##_type>\
1444
- inline name##ActionP2<p0##_type, p1##_type> name(p0##_type p0, \
1445
- p1##_type p1) {\
1446
- return name##ActionP2<p0##_type, p1##_type>(p0, p1);\
1447
- }\
1448
- template <typename p0##_type, typename p1##_type>\
1449
- template <typename F>\
1450
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1451
- typename arg3_type, typename arg4_type, typename arg5_type, \
1452
- typename arg6_type, typename arg7_type, typename arg8_type, \
1453
- typename arg9_type>\
1454
- typename ::testing::internal::Function<F>::Result\
1455
- name##ActionP2<p0##_type, p1##_type>::gmock_Impl<F>::gmock_PerformImpl(\
1456
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1457
-
1458
- #define ACTION_P3(name, p0, p1, p2)\
1459
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
1460
- class name##ActionP3 {\
1461
- public:\
1462
- name##ActionP3(p0##_type gmock_p0, p1##_type gmock_p1, \
1463
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
1464
- template <typename F>\
1465
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1466
- public:\
1467
- typedef F function_type;\
1468
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1469
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1470
- args_type;\
1471
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, \
1472
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
1473
- virtual return_type Perform(const args_type& args) {\
1474
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1475
- Perform(this, args);\
1476
- }\
1477
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1478
- typename arg3_type, typename arg4_type, typename arg5_type, \
1479
- typename arg6_type, typename arg7_type, typename arg8_type, \
1480
- typename arg9_type>\
1481
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1482
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1483
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1484
- arg9_type arg9) const;\
1485
- p0##_type p0;\
1486
- p1##_type p1;\
1487
- p2##_type p2;\
1488
- private:\
1489
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1490
- };\
1491
- template <typename F> operator ::testing::Action<F>() const {\
1492
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2));\
1493
- }\
1494
- p0##_type p0;\
1495
- p1##_type p1;\
1496
- p2##_type p2;\
1497
- private:\
1498
- GTEST_DISALLOW_ASSIGN_(name##ActionP3);\
1499
- };\
1500
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
1501
- inline name##ActionP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
1502
- p1##_type p1, p2##_type p2) {\
1503
- return name##ActionP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
1504
- }\
1505
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
1506
- template <typename F>\
1507
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1508
- typename arg3_type, typename arg4_type, typename arg5_type, \
1509
- typename arg6_type, typename arg7_type, typename arg8_type, \
1510
- typename arg9_type>\
1511
- typename ::testing::internal::Function<F>::Result\
1512
- name##ActionP3<p0##_type, p1##_type, \
1513
- p2##_type>::gmock_Impl<F>::gmock_PerformImpl(\
1514
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1515
-
1516
- #define ACTION_P4(name, p0, p1, p2, p3)\
1517
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1518
- typename p3##_type>\
1519
- class name##ActionP4 {\
1520
- public:\
1521
- name##ActionP4(p0##_type gmock_p0, p1##_type gmock_p1, \
1522
- p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \
1523
- p2(gmock_p2), p3(gmock_p3) {}\
1524
- template <typename F>\
1525
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1526
- public:\
1527
- typedef F function_type;\
1528
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1529
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1530
- args_type;\
1531
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1532
- p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1533
- p3(gmock_p3) {}\
1534
- virtual return_type Perform(const args_type& args) {\
1535
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1536
- Perform(this, args);\
1537
- }\
1538
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1539
- typename arg3_type, typename arg4_type, typename arg5_type, \
1540
- typename arg6_type, typename arg7_type, typename arg8_type, \
1541
- typename arg9_type>\
1542
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1543
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1544
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1545
- arg9_type arg9) const;\
1546
- p0##_type p0;\
1547
- p1##_type p1;\
1548
- p2##_type p2;\
1549
- p3##_type p3;\
1550
- private:\
1551
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1552
- };\
1553
- template <typename F> operator ::testing::Action<F>() const {\
1554
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3));\
1555
- }\
1556
- p0##_type p0;\
1557
- p1##_type p1;\
1558
- p2##_type p2;\
1559
- p3##_type p3;\
1560
- private:\
1561
- GTEST_DISALLOW_ASSIGN_(name##ActionP4);\
1562
- };\
1563
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1564
- typename p3##_type>\
1565
- inline name##ActionP4<p0##_type, p1##_type, p2##_type, \
1566
- p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
1567
- p3##_type p3) {\
1568
- return name##ActionP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, p1, \
1569
- p2, p3);\
1570
- }\
1571
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1572
- typename p3##_type>\
1573
- template <typename F>\
1574
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1575
- typename arg3_type, typename arg4_type, typename arg5_type, \
1576
- typename arg6_type, typename arg7_type, typename arg8_type, \
1577
- typename arg9_type>\
1578
- typename ::testing::internal::Function<F>::Result\
1579
- name##ActionP4<p0##_type, p1##_type, p2##_type, \
1580
- p3##_type>::gmock_Impl<F>::gmock_PerformImpl(\
1581
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1582
-
1583
- #define ACTION_P5(name, p0, p1, p2, p3, p4)\
1584
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1585
- typename p3##_type, typename p4##_type>\
1586
- class name##ActionP5 {\
1587
- public:\
1588
- name##ActionP5(p0##_type gmock_p0, p1##_type gmock_p1, \
1589
- p2##_type gmock_p2, p3##_type gmock_p3, \
1590
- p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1591
- p3(gmock_p3), p4(gmock_p4) {}\
1592
- template <typename F>\
1593
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1594
- public:\
1595
- typedef F function_type;\
1596
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1597
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1598
- args_type;\
1599
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1600
- p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), \
1601
- p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4) {}\
1602
- virtual return_type Perform(const args_type& args) {\
1603
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1604
- Perform(this, args);\
1605
- }\
1606
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1607
- typename arg3_type, typename arg4_type, typename arg5_type, \
1608
- typename arg6_type, typename arg7_type, typename arg8_type, \
1609
- typename arg9_type>\
1610
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1611
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1612
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1613
- arg9_type arg9) const;\
1614
- p0##_type p0;\
1615
- p1##_type p1;\
1616
- p2##_type p2;\
1617
- p3##_type p3;\
1618
- p4##_type p4;\
1619
- private:\
1620
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1621
- };\
1622
- template <typename F> operator ::testing::Action<F>() const {\
1623
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4));\
1624
- }\
1625
- p0##_type p0;\
1626
- p1##_type p1;\
1627
- p2##_type p2;\
1628
- p3##_type p3;\
1629
- p4##_type p4;\
1630
- private:\
1631
- GTEST_DISALLOW_ASSIGN_(name##ActionP5);\
1632
- };\
1633
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1634
- typename p3##_type, typename p4##_type>\
1635
- inline name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1636
- p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
1637
- p4##_type p4) {\
1638
- return name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1639
- p4##_type>(p0, p1, p2, p3, p4);\
1640
- }\
1641
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1642
- typename p3##_type, typename p4##_type>\
1643
- template <typename F>\
1644
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1645
- typename arg3_type, typename arg4_type, typename arg5_type, \
1646
- typename arg6_type, typename arg7_type, typename arg8_type, \
1647
- typename arg9_type>\
1648
- typename ::testing::internal::Function<F>::Result\
1649
- name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1650
- p4##_type>::gmock_Impl<F>::gmock_PerformImpl(\
1651
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1652
-
1653
- #define ACTION_P6(name, p0, p1, p2, p3, p4, p5)\
1654
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1655
- typename p3##_type, typename p4##_type, typename p5##_type>\
1656
- class name##ActionP6 {\
1657
- public:\
1658
- name##ActionP6(p0##_type gmock_p0, p1##_type gmock_p1, \
1659
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1660
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1661
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\
1662
- template <typename F>\
1663
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1664
- public:\
1665
- typedef F function_type;\
1666
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1667
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1668
- args_type;\
1669
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1670
- p3##_type gmock_p3, p4##_type gmock_p4, \
1671
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1672
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\
1673
- virtual return_type Perform(const args_type& args) {\
1674
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1675
- Perform(this, args);\
1676
- }\
1677
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1678
- typename arg3_type, typename arg4_type, typename arg5_type, \
1679
- typename arg6_type, typename arg7_type, typename arg8_type, \
1680
- typename arg9_type>\
1681
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1682
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1683
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1684
- arg9_type arg9) const;\
1685
- p0##_type p0;\
1686
- p1##_type p1;\
1687
- p2##_type p2;\
1688
- p3##_type p3;\
1689
- p4##_type p4;\
1690
- p5##_type p5;\
1691
- private:\
1692
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1693
- };\
1694
- template <typename F> operator ::testing::Action<F>() const {\
1695
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5));\
1696
- }\
1697
- p0##_type p0;\
1698
- p1##_type p1;\
1699
- p2##_type p2;\
1700
- p3##_type p3;\
1701
- p4##_type p4;\
1702
- p5##_type p5;\
1703
- private:\
1704
- GTEST_DISALLOW_ASSIGN_(name##ActionP6);\
1705
- };\
1706
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1707
- typename p3##_type, typename p4##_type, typename p5##_type>\
1708
- inline name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \
1709
- p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
1710
- p3##_type p3, p4##_type p4, p5##_type p5) {\
1711
- return name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \
1712
- p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
1713
- }\
1714
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1715
- typename p3##_type, typename p4##_type, typename p5##_type>\
1716
- template <typename F>\
1717
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1718
- typename arg3_type, typename arg4_type, typename arg5_type, \
1719
- typename arg6_type, typename arg7_type, typename arg8_type, \
1720
- typename arg9_type>\
1721
- typename ::testing::internal::Function<F>::Result\
1722
- name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1723
- p5##_type>::gmock_Impl<F>::gmock_PerformImpl(\
1724
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1725
-
1726
- #define ACTION_P7(name, p0, p1, p2, p3, p4, p5, p6)\
1727
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1728
- typename p3##_type, typename p4##_type, typename p5##_type, \
1729
- typename p6##_type>\
1730
- class name##ActionP7 {\
1731
- public:\
1732
- name##ActionP7(p0##_type gmock_p0, p1##_type gmock_p1, \
1733
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1734
- p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \
1735
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \
1736
- p6(gmock_p6) {}\
1737
- template <typename F>\
1738
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1739
- public:\
1740
- typedef F function_type;\
1741
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1742
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1743
- args_type;\
1744
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1745
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1746
- p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1747
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\
1748
- virtual return_type Perform(const args_type& args) {\
1749
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1750
- Perform(this, args);\
1751
- }\
1752
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1753
- typename arg3_type, typename arg4_type, typename arg5_type, \
1754
- typename arg6_type, typename arg7_type, typename arg8_type, \
1755
- typename arg9_type>\
1756
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1757
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1758
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1759
- arg9_type arg9) const;\
1760
- p0##_type p0;\
1761
- p1##_type p1;\
1762
- p2##_type p2;\
1763
- p3##_type p3;\
1764
- p4##_type p4;\
1765
- p5##_type p5;\
1766
- p6##_type p6;\
1767
- private:\
1768
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1769
- };\
1770
- template <typename F> operator ::testing::Action<F>() const {\
1771
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
1772
- p6));\
1773
- }\
1774
- p0##_type p0;\
1775
- p1##_type p1;\
1776
- p2##_type p2;\
1777
- p3##_type p3;\
1778
- p4##_type p4;\
1779
- p5##_type p5;\
1780
- p6##_type p6;\
1781
- private:\
1782
- GTEST_DISALLOW_ASSIGN_(name##ActionP7);\
1783
- };\
1784
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1785
- typename p3##_type, typename p4##_type, typename p5##_type, \
1786
- typename p6##_type>\
1787
- inline name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \
1788
- p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
1789
- p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
1790
- p6##_type p6) {\
1791
- return name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \
1792
- p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
1793
- }\
1794
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1795
- typename p3##_type, typename p4##_type, typename p5##_type, \
1796
- typename p6##_type>\
1797
- template <typename F>\
1798
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1799
- typename arg3_type, typename arg4_type, typename arg5_type, \
1800
- typename arg6_type, typename arg7_type, typename arg8_type, \
1801
- typename arg9_type>\
1802
- typename ::testing::internal::Function<F>::Result\
1803
- name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1804
- p5##_type, p6##_type>::gmock_Impl<F>::gmock_PerformImpl(\
1805
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1806
-
1807
- #define ACTION_P8(name, p0, p1, p2, p3, p4, p5, p6, p7)\
1808
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1809
- typename p3##_type, typename p4##_type, typename p5##_type, \
1810
- typename p6##_type, typename p7##_type>\
1811
- class name##ActionP8 {\
1812
- public:\
1813
- name##ActionP8(p0##_type gmock_p0, p1##_type gmock_p1, \
1814
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1815
- p5##_type gmock_p5, p6##_type gmock_p6, \
1816
- p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1817
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
1818
- p7(gmock_p7) {}\
1819
- template <typename F>\
1820
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1821
- public:\
1822
- typedef F function_type;\
1823
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1824
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1825
- args_type;\
1826
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1827
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1828
- p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), \
1829
- p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), \
1830
- p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\
1831
- virtual return_type Perform(const args_type& args) {\
1832
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1833
- Perform(this, args);\
1834
- }\
1835
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1836
- typename arg3_type, typename arg4_type, typename arg5_type, \
1837
- typename arg6_type, typename arg7_type, typename arg8_type, \
1838
- typename arg9_type>\
1839
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1840
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1841
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1842
- arg9_type arg9) const;\
1843
- p0##_type p0;\
1844
- p1##_type p1;\
1845
- p2##_type p2;\
1846
- p3##_type p3;\
1847
- p4##_type p4;\
1848
- p5##_type p5;\
1849
- p6##_type p6;\
1850
- p7##_type p7;\
1851
- private:\
1852
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1853
- };\
1854
- template <typename F> operator ::testing::Action<F>() const {\
1855
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
1856
- p6, p7));\
1857
- }\
1858
- p0##_type p0;\
1859
- p1##_type p1;\
1860
- p2##_type p2;\
1861
- p3##_type p3;\
1862
- p4##_type p4;\
1863
- p5##_type p5;\
1864
- p6##_type p6;\
1865
- p7##_type p7;\
1866
- private:\
1867
- GTEST_DISALLOW_ASSIGN_(name##ActionP8);\
1868
- };\
1869
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1870
- typename p3##_type, typename p4##_type, typename p5##_type, \
1871
- typename p6##_type, typename p7##_type>\
1872
- inline name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \
1873
- p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
1874
- p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
1875
- p6##_type p6, p7##_type p7) {\
1876
- return name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \
1877
- p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
1878
- p6, p7);\
1879
- }\
1880
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1881
- typename p3##_type, typename p4##_type, typename p5##_type, \
1882
- typename p6##_type, typename p7##_type>\
1883
- template <typename F>\
1884
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1885
- typename arg3_type, typename arg4_type, typename arg5_type, \
1886
- typename arg6_type, typename arg7_type, typename arg8_type, \
1887
- typename arg9_type>\
1888
- typename ::testing::internal::Function<F>::Result\
1889
- name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1890
- p5##_type, p6##_type, \
1891
- p7##_type>::gmock_Impl<F>::gmock_PerformImpl(\
1892
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1893
-
1894
- #define ACTION_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8)\
1895
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1896
- typename p3##_type, typename p4##_type, typename p5##_type, \
1897
- typename p6##_type, typename p7##_type, typename p8##_type>\
1898
- class name##ActionP9 {\
1899
- public:\
1900
- name##ActionP9(p0##_type gmock_p0, p1##_type gmock_p1, \
1901
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1902
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
1903
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1904
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
1905
- p8(gmock_p8) {}\
1906
- template <typename F>\
1907
- class gmock_Impl : public ::testing::ActionInterface<F> {\
1908
- public:\
1909
- typedef F function_type;\
1910
- typedef typename ::testing::internal::Function<F>::Result return_type;\
1911
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
1912
- args_type;\
1913
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1914
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1915
- p6##_type gmock_p6, p7##_type gmock_p7, \
1916
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
1917
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
1918
- p7(gmock_p7), p8(gmock_p8) {}\
1919
- virtual return_type Perform(const args_type& args) {\
1920
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
1921
- Perform(this, args);\
1922
- }\
1923
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1924
- typename arg3_type, typename arg4_type, typename arg5_type, \
1925
- typename arg6_type, typename arg7_type, typename arg8_type, \
1926
- typename arg9_type>\
1927
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
1928
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
1929
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
1930
- arg9_type arg9) const;\
1931
- p0##_type p0;\
1932
- p1##_type p1;\
1933
- p2##_type p2;\
1934
- p3##_type p3;\
1935
- p4##_type p4;\
1936
- p5##_type p5;\
1937
- p6##_type p6;\
1938
- p7##_type p7;\
1939
- p8##_type p8;\
1940
- private:\
1941
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
1942
- };\
1943
- template <typename F> operator ::testing::Action<F>() const {\
1944
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
1945
- p6, p7, p8));\
1946
- }\
1947
- p0##_type p0;\
1948
- p1##_type p1;\
1949
- p2##_type p2;\
1950
- p3##_type p3;\
1951
- p4##_type p4;\
1952
- p5##_type p5;\
1953
- p6##_type p6;\
1954
- p7##_type p7;\
1955
- p8##_type p8;\
1956
- private:\
1957
- GTEST_DISALLOW_ASSIGN_(name##ActionP9);\
1958
- };\
1959
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1960
- typename p3##_type, typename p4##_type, typename p5##_type, \
1961
- typename p6##_type, typename p7##_type, typename p8##_type>\
1962
- inline name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \
1963
- p4##_type, p5##_type, p6##_type, p7##_type, \
1964
- p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
1965
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
1966
- p8##_type p8) {\
1967
- return name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \
1968
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
1969
- p3, p4, p5, p6, p7, p8);\
1970
- }\
1971
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1972
- typename p3##_type, typename p4##_type, typename p5##_type, \
1973
- typename p6##_type, typename p7##_type, typename p8##_type>\
1974
- template <typename F>\
1975
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
1976
- typename arg3_type, typename arg4_type, typename arg5_type, \
1977
- typename arg6_type, typename arg7_type, typename arg8_type, \
1978
- typename arg9_type>\
1979
- typename ::testing::internal::Function<F>::Result\
1980
- name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1981
- p5##_type, p6##_type, p7##_type, \
1982
- p8##_type>::gmock_Impl<F>::gmock_PerformImpl(\
1983
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1984
-
1985
- #define ACTION_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)\
1986
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
1987
- typename p3##_type, typename p4##_type, typename p5##_type, \
1988
- typename p6##_type, typename p7##_type, typename p8##_type, \
1989
- typename p9##_type>\
1990
- class name##ActionP10 {\
1991
- public:\
1992
- name##ActionP10(p0##_type gmock_p0, p1##_type gmock_p1, \
1993
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1994
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
1995
- p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \
1996
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
1997
- p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\
1998
- template <typename F>\
1999
- class gmock_Impl : public ::testing::ActionInterface<F> {\
2000
- public:\
2001
- typedef F function_type;\
2002
- typedef typename ::testing::internal::Function<F>::Result return_type;\
2003
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
2004
- args_type;\
2005
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
2006
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
2007
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
2008
- p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
2009
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
2010
- p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\
2011
- virtual return_type Perform(const args_type& args) {\
2012
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
2013
- Perform(this, args);\
2014
- }\
2015
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
2016
- typename arg3_type, typename arg4_type, typename arg5_type, \
2017
- typename arg6_type, typename arg7_type, typename arg8_type, \
2018
- typename arg9_type>\
2019
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
2020
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
2021
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
2022
- arg9_type arg9) const;\
2023
- p0##_type p0;\
2024
- p1##_type p1;\
2025
- p2##_type p2;\
2026
- p3##_type p3;\
2027
- p4##_type p4;\
2028
- p5##_type p5;\
2029
- p6##_type p6;\
2030
- p7##_type p7;\
2031
- p8##_type p8;\
2032
- p9##_type p9;\
2033
- private:\
2034
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
2035
- };\
2036
- template <typename F> operator ::testing::Action<F>() const {\
2037
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
2038
- p6, p7, p8, p9));\
2039
- }\
2040
- p0##_type p0;\
2041
- p1##_type p1;\
2042
- p2##_type p2;\
2043
- p3##_type p3;\
2044
- p4##_type p4;\
2045
- p5##_type p5;\
2046
- p6##_type p6;\
2047
- p7##_type p7;\
2048
- p8##_type p8;\
2049
- p9##_type p9;\
2050
- private:\
2051
- GTEST_DISALLOW_ASSIGN_(name##ActionP10);\
2052
- };\
2053
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
2054
- typename p3##_type, typename p4##_type, typename p5##_type, \
2055
- typename p6##_type, typename p7##_type, typename p8##_type, \
2056
- typename p9##_type>\
2057
- inline name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2058
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2059
- p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
2060
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
2061
- p9##_type p9) {\
2062
- return name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2063
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
2064
- p1, p2, p3, p4, p5, p6, p7, p8, p9);\
2065
- }\
2066
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
2067
- typename p3##_type, typename p4##_type, typename p5##_type, \
2068
- typename p6##_type, typename p7##_type, typename p8##_type, \
2069
- typename p9##_type>\
2070
- template <typename F>\
2071
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
2072
- typename arg3_type, typename arg4_type, typename arg5_type, \
2073
- typename arg6_type, typename arg7_type, typename arg8_type, \
2074
- typename arg9_type>\
2075
- typename ::testing::internal::Function<F>::Result\
2076
- name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
2077
- p5##_type, p6##_type, p7##_type, p8##_type, \
2078
- p9##_type>::gmock_Impl<F>::gmock_PerformImpl(\
2079
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
2080
-
2081
- namespace testing {
2082
-
2083
-
2084
- // The ACTION*() macros trigger warning C4100 (unreferenced formal
2085
- // parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
2086
- // the macro definition, as the warnings are generated when the macro
2087
- // is expanded and macro expansion cannot contain #pragma. Therefore
2088
- // we suppress them here.
2089
- #ifdef _MSC_VER
2090
- # pragma warning(push)
2091
- # pragma warning(disable:4100)
2092
- #endif
2093
-
2094
- // Various overloads for InvokeArgument<N>().
2095
- //
2096
- // The InvokeArgument<N>(a1, a2, ..., a_k) action invokes the N-th
2097
- // (0-based) argument, which must be a k-ary callable, of the mock
2098
- // function, with arguments a1, a2, ..., a_k.
2099
- //
2100
- // Notes:
2101
- //
2102
- // 1. The arguments are passed by value by default. If you need to
2103
- // pass an argument by reference, wrap it inside ByRef(). For
2104
- // example,
2105
- //
2106
- // InvokeArgument<1>(5, string("Hello"), ByRef(foo))
2107
- //
2108
- // passes 5 and string("Hello") by value, and passes foo by
2109
- // reference.
2110
- //
2111
- // 2. If the callable takes an argument by reference but ByRef() is
2112
- // not used, it will receive the reference to a copy of the value,
2113
- // instead of the original value. For example, when the 0-th
2114
- // argument of the mock function takes a const string&, the action
2115
- //
2116
- // InvokeArgument<0>(string("Hello"))
2117
- //
2118
- // makes a copy of the temporary string("Hello") object and passes a
2119
- // reference of the copy, instead of the original temporary object,
2120
- // to the callable. This makes it easy for a user to define an
2121
- // InvokeArgument action from temporary values and have it performed
2122
- // later.
2123
-
2124
- namespace internal {
2125
- namespace invoke_argument {
2126
-
2127
- // Appears in InvokeArgumentAdl's argument list to help avoid
2128
- // accidental calls to user functions of the same name.
2129
- struct AdlTag {};
2130
-
2131
- // InvokeArgumentAdl - a helper for InvokeArgument.
2132
- // The basic overloads are provided here for generic functors.
2133
- // Overloads for other custom-callables are provided in the
2134
- // internal/custom/callback-actions.h header.
2135
-
2136
- template <typename R, typename F>
2137
- R InvokeArgumentAdl(AdlTag, F f) {
2138
- return f();
2139
- }
2140
- template <typename R, typename F, typename A1>
2141
- R InvokeArgumentAdl(AdlTag, F f, A1 a1) {
2142
- return f(a1);
2143
- }
2144
- template <typename R, typename F, typename A1, typename A2>
2145
- R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2) {
2146
- return f(a1, a2);
2147
- }
2148
- template <typename R, typename F, typename A1, typename A2, typename A3>
2149
- R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3) {
2150
- return f(a1, a2, a3);
2151
- }
2152
- template <typename R, typename F, typename A1, typename A2, typename A3,
2153
- typename A4>
2154
- R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4) {
2155
- return f(a1, a2, a3, a4);
2156
- }
2157
- template <typename R, typename F, typename A1, typename A2, typename A3,
2158
- typename A4, typename A5>
2159
- R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
2160
- return f(a1, a2, a3, a4, a5);
2161
- }
2162
- template <typename R, typename F, typename A1, typename A2, typename A3,
2163
- typename A4, typename A5, typename A6>
2164
- R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
2165
- return f(a1, a2, a3, a4, a5, a6);
2166
- }
2167
- template <typename R, typename F, typename A1, typename A2, typename A3,
2168
- typename A4, typename A5, typename A6, typename A7>
2169
- R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
2170
- A7 a7) {
2171
- return f(a1, a2, a3, a4, a5, a6, a7);
2172
- }
2173
- template <typename R, typename F, typename A1, typename A2, typename A3,
2174
- typename A4, typename A5, typename A6, typename A7, typename A8>
2175
- R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
2176
- A7 a7, A8 a8) {
2177
- return f(a1, a2, a3, a4, a5, a6, a7, a8);
2178
- }
2179
- template <typename R, typename F, typename A1, typename A2, typename A3,
2180
- typename A4, typename A5, typename A6, typename A7, typename A8,
2181
- typename A9>
2182
- R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
2183
- A7 a7, A8 a8, A9 a9) {
2184
- return f(a1, a2, a3, a4, a5, a6, a7, a8, a9);
2185
- }
2186
- template <typename R, typename F, typename A1, typename A2, typename A3,
2187
- typename A4, typename A5, typename A6, typename A7, typename A8,
2188
- typename A9, typename A10>
2189
- R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
2190
- A7 a7, A8 a8, A9 a9, A10 a10) {
2191
- return f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
2192
- }
2193
- } // namespace invoke_argument
2194
- } // namespace internal
2195
-
2196
- ACTION_TEMPLATE(InvokeArgument,
2197
- HAS_1_TEMPLATE_PARAMS(int, k),
2198
- AND_0_VALUE_PARAMS()) {
2199
- using internal::invoke_argument::InvokeArgumentAdl;
2200
- return InvokeArgumentAdl<return_type>(
2201
- internal::invoke_argument::AdlTag(),
2202
- ::testing::get<k>(args));
2203
- }
2204
-
2205
- ACTION_TEMPLATE(InvokeArgument,
2206
- HAS_1_TEMPLATE_PARAMS(int, k),
2207
- AND_1_VALUE_PARAMS(p0)) {
2208
- using internal::invoke_argument::InvokeArgumentAdl;
2209
- return InvokeArgumentAdl<return_type>(
2210
- internal::invoke_argument::AdlTag(),
2211
- ::testing::get<k>(args), p0);
2212
- }
2213
-
2214
- ACTION_TEMPLATE(InvokeArgument,
2215
- HAS_1_TEMPLATE_PARAMS(int, k),
2216
- AND_2_VALUE_PARAMS(p0, p1)) {
2217
- using internal::invoke_argument::InvokeArgumentAdl;
2218
- return InvokeArgumentAdl<return_type>(
2219
- internal::invoke_argument::AdlTag(),
2220
- ::testing::get<k>(args), p0, p1);
2221
- }
2222
-
2223
- ACTION_TEMPLATE(InvokeArgument,
2224
- HAS_1_TEMPLATE_PARAMS(int, k),
2225
- AND_3_VALUE_PARAMS(p0, p1, p2)) {
2226
- using internal::invoke_argument::InvokeArgumentAdl;
2227
- return InvokeArgumentAdl<return_type>(
2228
- internal::invoke_argument::AdlTag(),
2229
- ::testing::get<k>(args), p0, p1, p2);
2230
- }
2231
-
2232
- ACTION_TEMPLATE(InvokeArgument,
2233
- HAS_1_TEMPLATE_PARAMS(int, k),
2234
- AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {
2235
- using internal::invoke_argument::InvokeArgumentAdl;
2236
- return InvokeArgumentAdl<return_type>(
2237
- internal::invoke_argument::AdlTag(),
2238
- ::testing::get<k>(args), p0, p1, p2, p3);
2239
- }
2240
-
2241
- ACTION_TEMPLATE(InvokeArgument,
2242
- HAS_1_TEMPLATE_PARAMS(int, k),
2243
- AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {
2244
- using internal::invoke_argument::InvokeArgumentAdl;
2245
- return InvokeArgumentAdl<return_type>(
2246
- internal::invoke_argument::AdlTag(),
2247
- ::testing::get<k>(args), p0, p1, p2, p3, p4);
2248
- }
2249
-
2250
- ACTION_TEMPLATE(InvokeArgument,
2251
- HAS_1_TEMPLATE_PARAMS(int, k),
2252
- AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {
2253
- using internal::invoke_argument::InvokeArgumentAdl;
2254
- return InvokeArgumentAdl<return_type>(
2255
- internal::invoke_argument::AdlTag(),
2256
- ::testing::get<k>(args), p0, p1, p2, p3, p4, p5);
2257
- }
2258
-
2259
- ACTION_TEMPLATE(InvokeArgument,
2260
- HAS_1_TEMPLATE_PARAMS(int, k),
2261
- AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {
2262
- using internal::invoke_argument::InvokeArgumentAdl;
2263
- return InvokeArgumentAdl<return_type>(
2264
- internal::invoke_argument::AdlTag(),
2265
- ::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6);
2266
- }
2267
-
2268
- ACTION_TEMPLATE(InvokeArgument,
2269
- HAS_1_TEMPLATE_PARAMS(int, k),
2270
- AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {
2271
- using internal::invoke_argument::InvokeArgumentAdl;
2272
- return InvokeArgumentAdl<return_type>(
2273
- internal::invoke_argument::AdlTag(),
2274
- ::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7);
2275
- }
2276
-
2277
- ACTION_TEMPLATE(InvokeArgument,
2278
- HAS_1_TEMPLATE_PARAMS(int, k),
2279
- AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {
2280
- using internal::invoke_argument::InvokeArgumentAdl;
2281
- return InvokeArgumentAdl<return_type>(
2282
- internal::invoke_argument::AdlTag(),
2283
- ::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8);
2284
- }
2285
-
2286
- ACTION_TEMPLATE(InvokeArgument,
2287
- HAS_1_TEMPLATE_PARAMS(int, k),
2288
- AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {
2289
- using internal::invoke_argument::InvokeArgumentAdl;
2290
- return InvokeArgumentAdl<return_type>(
2291
- internal::invoke_argument::AdlTag(),
2292
- ::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
2293
- }
2294
-
2295
- // Various overloads for ReturnNew<T>().
2296
- //
2297
- // The ReturnNew<T>(a1, a2, ..., a_k) action returns a pointer to a new
2298
- // instance of type T, constructed on the heap with constructor arguments
2299
- // a1, a2, ..., and a_k. The caller assumes ownership of the returned value.
2300
- ACTION_TEMPLATE(ReturnNew,
2301
- HAS_1_TEMPLATE_PARAMS(typename, T),
2302
- AND_0_VALUE_PARAMS()) {
2303
- return new T();
2304
- }
2305
-
2306
- ACTION_TEMPLATE(ReturnNew,
2307
- HAS_1_TEMPLATE_PARAMS(typename, T),
2308
- AND_1_VALUE_PARAMS(p0)) {
2309
- return new T(p0);
2310
- }
2311
-
2312
- ACTION_TEMPLATE(ReturnNew,
2313
- HAS_1_TEMPLATE_PARAMS(typename, T),
2314
- AND_2_VALUE_PARAMS(p0, p1)) {
2315
- return new T(p0, p1);
2316
- }
2317
-
2318
- ACTION_TEMPLATE(ReturnNew,
2319
- HAS_1_TEMPLATE_PARAMS(typename, T),
2320
- AND_3_VALUE_PARAMS(p0, p1, p2)) {
2321
- return new T(p0, p1, p2);
2322
- }
2323
-
2324
- ACTION_TEMPLATE(ReturnNew,
2325
- HAS_1_TEMPLATE_PARAMS(typename, T),
2326
- AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {
2327
- return new T(p0, p1, p2, p3);
2328
- }
2329
-
2330
- ACTION_TEMPLATE(ReturnNew,
2331
- HAS_1_TEMPLATE_PARAMS(typename, T),
2332
- AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {
2333
- return new T(p0, p1, p2, p3, p4);
2334
- }
2335
-
2336
- ACTION_TEMPLATE(ReturnNew,
2337
- HAS_1_TEMPLATE_PARAMS(typename, T),
2338
- AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {
2339
- return new T(p0, p1, p2, p3, p4, p5);
2340
- }
2341
-
2342
- ACTION_TEMPLATE(ReturnNew,
2343
- HAS_1_TEMPLATE_PARAMS(typename, T),
2344
- AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {
2345
- return new T(p0, p1, p2, p3, p4, p5, p6);
2346
- }
2347
-
2348
- ACTION_TEMPLATE(ReturnNew,
2349
- HAS_1_TEMPLATE_PARAMS(typename, T),
2350
- AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {
2351
- return new T(p0, p1, p2, p3, p4, p5, p6, p7);
2352
- }
2353
-
2354
- ACTION_TEMPLATE(ReturnNew,
2355
- HAS_1_TEMPLATE_PARAMS(typename, T),
2356
- AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {
2357
- return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8);
2358
- }
2359
-
2360
- ACTION_TEMPLATE(ReturnNew,
2361
- HAS_1_TEMPLATE_PARAMS(typename, T),
2362
- AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {
2363
- return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
2364
- }
2365
-
2366
- #ifdef _MSC_VER
2367
- # pragma warning(pop)
2368
- #endif
2369
-
2370
- } // namespace testing
2371
-
2372
- // Include any custom actions added by the local installation.
2373
- // We must include this header at the end to make sure it can use the
2374
- // declarations from this file.
2375
- #include "gmock/internal/custom/gmock-generated-actions.h"
2376
-
2377
- #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_