@eosrio/node-abieos 2.1.0-beta.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (740) hide show
  1. package/README.md +4 -1
  2. package/dist/abieos.node +0 -0
  3. package/lib/abieos.d.ts +19 -0
  4. package/lib/abieos.d.ts.map +1 -0
  5. package/lib/abieos.js +100 -0
  6. package/lib/abieos.ts +107 -0
  7. package/package.json +13 -8
  8. package/.gitmodules +0 -6
  9. package/.idea/misc.xml +0 -6
  10. package/.idea/modules.xml +0 -8
  11. package/.idea/node-abieos.iml +0 -12
  12. package/.idea/vcs.xml +0 -9
  13. package/.idea/workspace.xml +0 -266
  14. package/CMakeLists.txt +0 -35
  15. package/abieos.d.ts +0 -21
  16. package/abieos.js +0 -59
  17. package/eosio.json +0 -1596
  18. package/external/date/CMakeLists.txt +0 -175
  19. package/external/date/LICENSE.txt +0 -31
  20. package/external/date/README.md +0 -61
  21. package/external/date/compile_fail.sh +0 -16
  22. package/external/date/include/date/chrono_io.h +0 -34
  23. package/external/date/include/date/date.h +0 -8335
  24. package/external/date/include/date/ios.h +0 -50
  25. package/external/date/include/date/islamic.h +0 -3031
  26. package/external/date/include/date/iso_week.h +0 -1745
  27. package/external/date/include/date/julian.h +0 -3046
  28. package/external/date/include/date/ptz.h +0 -592
  29. package/external/date/include/date/tz.h +0 -2760
  30. package/external/date/include/date/tz_private.h +0 -318
  31. package/external/date/src/ios.mm +0 -337
  32. package/external/date/src/tz.cpp +0 -3801
  33. package/external/date/test/clock_cast_test/custom_clock.pass.cpp +0 -213
  34. package/external/date/test/clock_cast_test/deprecated.pass.cpp +0 -90
  35. package/external/date/test/clock_cast_test/local_t.pass.cpp +0 -132
  36. package/external/date/test/clock_cast_test/noncastable.pass.cpp +0 -251
  37. package/external/date/test/clock_cast_test/normal_clocks.pass.cpp +0 -102
  38. package/external/date/test/clock_cast_test/to_sys_return_int.fail.cpp +0 -49
  39. package/external/date/test/clock_cast_test/to_sys_return_reference.fail.cpp +0 -51
  40. package/external/date/test/clock_cast_test/to_sys_return_utc_time.fail.cpp +0 -49
  41. package/external/date/test/date_test/day.pass.cpp +0 -143
  42. package/external/date/test/date_test/daypday.fail.cpp +0 -32
  43. package/external/date/test/date_test/daysmday.fail.cpp +0 -32
  44. package/external/date/test/date_test/daysmweekday.fail.cpp +0 -32
  45. package/external/date/test/date_test/detail/decimal_format_seconds.pass.cpp +0 -145
  46. package/external/date/test/date_test/detail/make_precision.pass.cpp +0 -63
  47. package/external/date/test/date_test/detail/static_pow10.pass.cpp +0 -50
  48. package/external/date/test/date_test/detail/width.pass.cpp +0 -64
  49. package/external/date/test/date_test/durations.pass.cpp +0 -62
  50. package/external/date/test/date_test/durations_output.pass.cpp +0 -328
  51. package/external/date/test/date_test/format/century.pass.cpp +0 -117
  52. package/external/date/test/date_test/format/misc.pass.cpp +0 -52
  53. package/external/date/test/date_test/format/range.pass.cpp +0 -78
  54. package/external/date/test/date_test/format/two_dight_year.pass.cpp +0 -121
  55. package/external/date/test/date_test/last.pass.cpp +0 -34
  56. package/external/date/test/date_test/make_time.pass.cpp +0 -164
  57. package/external/date/test/date_test/month.pass.cpp +0 -181
  58. package/external/date/test/date_test/month_day.pass.cpp +0 -82
  59. package/external/date/test/date_test/month_day_last.pass.cpp +0 -75
  60. package/external/date/test/date_test/month_weekday.pass.cpp +0 -77
  61. package/external/date/test/date_test/month_weekday_last.pass.cpp +0 -77
  62. package/external/date/test/date_test/month_weekday_last_less.fail.cpp +0 -34
  63. package/external/date/test/date_test/month_weekday_less.fail.cpp +0 -34
  64. package/external/date/test/date_test/monthpmonth.fail.cpp +0 -32
  65. package/external/date/test/date_test/months_m_year_month.fail.cpp +0 -33
  66. package/external/date/test/date_test/months_m_year_month_day.fail.cpp +0 -33
  67. package/external/date/test/date_test/monthsmmonth.fail.cpp +0 -32
  68. package/external/date/test/date_test/multi_year_duration_addition.pass.cpp +0 -297
  69. package/external/date/test/date_test/op_div_day_day.fail.cpp +0 -33
  70. package/external/date/test/date_test/op_div_int_month.fail.cpp +0 -33
  71. package/external/date/test/date_test/op_div_int_year.fail.cpp +0 -33
  72. package/external/date/test/date_test/op_div_last_last.fail.cpp +0 -33
  73. package/external/date/test/date_test/op_div_month_day.pass.cpp +0 -41
  74. package/external/date/test/date_test/op_div_month_day_last.pass.cpp +0 -39
  75. package/external/date/test/date_test/op_div_month_day_month_day.fail.cpp +0 -33
  76. package/external/date/test/date_test/op_div_month_month.fail.cpp +0 -33
  77. package/external/date/test/date_test/op_div_month_weekday.pass.cpp +0 -39
  78. package/external/date/test/date_test/op_div_month_weekday_last.pass.cpp +0 -39
  79. package/external/date/test/date_test/op_div_month_year.fail.cpp +0 -33
  80. package/external/date/test/date_test/op_div_survey.pass.cpp +0 -437
  81. package/external/date/test/date_test/op_div_weekday_indexed_weekday_indexed.fail.cpp +0 -33
  82. package/external/date/test/date_test/op_div_weekday_last_weekday_last.fail.cpp +0 -33
  83. package/external/date/test/date_test/op_div_year_month.pass.cpp +0 -35
  84. package/external/date/test/date_test/op_div_year_month_day.pass.cpp +0 -43
  85. package/external/date/test/date_test/op_div_year_month_day_last.pass.cpp +0 -41
  86. package/external/date/test/date_test/op_div_year_month_weekday.pass.cpp +0 -41
  87. package/external/date/test/date_test/op_div_year_month_weekday_last.pass.cpp +0 -41
  88. package/external/date/test/date_test/op_div_year_month_year_month.fail.cpp +0 -33
  89. package/external/date/test/date_test/op_div_year_year.fail.cpp +0 -33
  90. package/external/date/test/date_test/parse.pass.cpp +0 -904
  91. package/external/date/test/date_test/sizeof.pass.cpp +0 -62
  92. package/external/date/test/date_test/time_of_day_hours.pass.cpp +0 -104
  93. package/external/date/test/date_test/time_of_day_microfortnights.pass.cpp +0 -119
  94. package/external/date/test/date_test/time_of_day_milliseconds.pass.cpp +0 -126
  95. package/external/date/test/date_test/time_of_day_minutes.pass.cpp +0 -110
  96. package/external/date/test/date_test/time_of_day_nanoseconds.pass.cpp +0 -126
  97. package/external/date/test/date_test/time_of_day_seconds.pass.cpp +0 -116
  98. package/external/date/test/date_test/weekday.pass.cpp +0 -201
  99. package/external/date/test/date_test/weekday_indexed.pass.cpp +0 -70
  100. package/external/date/test/date_test/weekday_last.pass.cpp +0 -66
  101. package/external/date/test/date_test/weekday_lessthan.fail.cpp +0 -32
  102. package/external/date/test/date_test/weekday_sum.fail.cpp +0 -32
  103. package/external/date/test/date_test/year.pass.cpp +0 -146
  104. package/external/date/test/date_test/year_month.pass.cpp +0 -142
  105. package/external/date/test/date_test/year_month_day.pass.cpp +0 -244
  106. package/external/date/test/date_test/year_month_day_last.pass.cpp +0 -177
  107. package/external/date/test/date_test/year_month_day_m_year_month_day.fail.cpp +0 -33
  108. package/external/date/test/date_test/year_month_day_p_year_month_day.fail.cpp +0 -33
  109. package/external/date/test/date_test/year_month_p_year_month.fail.cpp +0 -33
  110. package/external/date/test/date_test/year_month_weekday.pass.cpp +0 -178
  111. package/external/date/test/date_test/year_month_weekday_last.pass.cpp +0 -169
  112. package/external/date/test/date_test/year_p_year.fail.cpp +0 -32
  113. package/external/date/test/date_test/years_m_year.fail.cpp +0 -32
  114. package/external/date/test/date_test/years_m_year_month.fail.cpp +0 -33
  115. package/external/date/test/date_test/years_m_year_month_day.fail.cpp +0 -33
  116. package/external/date/test/iso_week/last.pass.cpp +0 -34
  117. package/external/date/test/iso_week/lastweek_weekday.pass.cpp +0 -82
  118. package/external/date/test/iso_week/op_div_survey.pass.cpp +0 -196
  119. package/external/date/test/iso_week/weekday.pass.cpp +0 -227
  120. package/external/date/test/iso_week/weekday_lessthan.fail.cpp +0 -32
  121. package/external/date/test/iso_week/weekday_sum.fail.cpp +0 -32
  122. package/external/date/test/iso_week/weeknum.pass.cpp +0 -121
  123. package/external/date/test/iso_week/weeknum_p_weeknum.fail.cpp +0 -32
  124. package/external/date/test/iso_week/weeknum_weekday.pass.cpp +0 -86
  125. package/external/date/test/iso_week/year.pass.cpp +0 -120
  126. package/external/date/test/iso_week/year_lastweek.pass.cpp +0 -97
  127. package/external/date/test/iso_week/year_lastweek_weekday.pass.cpp +0 -129
  128. package/external/date/test/iso_week/year_p_year.fail.cpp +0 -32
  129. package/external/date/test/iso_week/year_weeknum.pass.cpp +0 -97
  130. package/external/date/test/iso_week/year_weeknum_weekday.pass.cpp +0 -139
  131. package/external/date/test/iso_week/years_m_year.fail.cpp +0 -32
  132. package/external/date/test/just.pass.cpp +0 -26
  133. package/external/date/test/testit +0 -177
  134. package/external/date/test/tz_test/OffsetZone.pass.cpp +0 -81
  135. package/external/date/test/tz_test/README.md +0 -22
  136. package/external/date/test/tz_test/tzdata2015e.txt.zip +0 -0
  137. package/external/date/test/tz_test/tzdata2015f.txt.zip +0 -0
  138. package/external/date/test/tz_test/tzdata2016c.txt.zip +0 -0
  139. package/external/date/test/tz_test/tzdata2016d.txt.zip +0 -0
  140. package/external/date/test/tz_test/tzdata2016e.txt.zip +0 -0
  141. package/external/date/test/tz_test/tzdata2016f.txt.zip +0 -0
  142. package/external/date/test/tz_test/validate.cpp +0 -165
  143. package/external/date/test/tz_test/zone.pass.cpp +0 -37
  144. package/external/date/test/tz_test/zoned_time.pass.cpp +0 -464
  145. package/external/date/test_fail.sh +0 -10
  146. package/external/rapidjson/.gitattributes +0 -22
  147. package/external/rapidjson/.gitmodules +0 -3
  148. package/external/rapidjson/.travis.yml +0 -99
  149. package/external/rapidjson/CHANGELOG.md +0 -158
  150. package/external/rapidjson/CMakeLists.txt +0 -221
  151. package/external/rapidjson/CMakeModules/FindGTestSrc.cmake +0 -30
  152. package/external/rapidjson/RapidJSON.pc.in +0 -7
  153. package/external/rapidjson/RapidJSONConfig.cmake.in +0 -15
  154. package/external/rapidjson/RapidJSONConfigVersion.cmake.in +0 -10
  155. package/external/rapidjson/appveyor.yml +0 -54
  156. package/external/rapidjson/bin/data/glossary.json +0 -22
  157. package/external/rapidjson/bin/data/menu.json +0 -27
  158. package/external/rapidjson/bin/data/readme.txt +0 -1
  159. package/external/rapidjson/bin/data/sample.json +0 -3315
  160. package/external/rapidjson/bin/data/webapp.json +0 -88
  161. package/external/rapidjson/bin/data/widget.json +0 -26
  162. package/external/rapidjson/bin/encodings/utf16be.json +0 -0
  163. package/external/rapidjson/bin/encodings/utf16bebom.json +0 -0
  164. package/external/rapidjson/bin/encodings/utf16le.json +0 -0
  165. package/external/rapidjson/bin/encodings/utf16lebom.json +0 -0
  166. package/external/rapidjson/bin/encodings/utf32be.json +0 -0
  167. package/external/rapidjson/bin/encodings/utf32bebom.json +0 -0
  168. package/external/rapidjson/bin/encodings/utf32le.json +0 -0
  169. package/external/rapidjson/bin/encodings/utf32lebom.json +0 -0
  170. package/external/rapidjson/bin/encodings/utf8.json +0 -7
  171. package/external/rapidjson/bin/encodings/utf8bom.json +0 -7
  172. package/external/rapidjson/bin/jsonchecker/fail1.json +0 -1
  173. package/external/rapidjson/bin/jsonchecker/fail10.json +0 -1
  174. package/external/rapidjson/bin/jsonchecker/fail11.json +0 -1
  175. package/external/rapidjson/bin/jsonchecker/fail12.json +0 -1
  176. package/external/rapidjson/bin/jsonchecker/fail13.json +0 -1
  177. package/external/rapidjson/bin/jsonchecker/fail14.json +0 -1
  178. package/external/rapidjson/bin/jsonchecker/fail15.json +0 -1
  179. package/external/rapidjson/bin/jsonchecker/fail16.json +0 -1
  180. package/external/rapidjson/bin/jsonchecker/fail17.json +0 -1
  181. package/external/rapidjson/bin/jsonchecker/fail18.json +0 -1
  182. package/external/rapidjson/bin/jsonchecker/fail19.json +0 -1
  183. package/external/rapidjson/bin/jsonchecker/fail2.json +0 -1
  184. package/external/rapidjson/bin/jsonchecker/fail20.json +0 -1
  185. package/external/rapidjson/bin/jsonchecker/fail21.json +0 -1
  186. package/external/rapidjson/bin/jsonchecker/fail22.json +0 -1
  187. package/external/rapidjson/bin/jsonchecker/fail23.json +0 -1
  188. package/external/rapidjson/bin/jsonchecker/fail24.json +0 -1
  189. package/external/rapidjson/bin/jsonchecker/fail25.json +0 -1
  190. package/external/rapidjson/bin/jsonchecker/fail26.json +0 -1
  191. package/external/rapidjson/bin/jsonchecker/fail27.json +0 -2
  192. package/external/rapidjson/bin/jsonchecker/fail28.json +0 -2
  193. package/external/rapidjson/bin/jsonchecker/fail29.json +0 -1
  194. package/external/rapidjson/bin/jsonchecker/fail3.json +0 -1
  195. package/external/rapidjson/bin/jsonchecker/fail30.json +0 -1
  196. package/external/rapidjson/bin/jsonchecker/fail31.json +0 -1
  197. package/external/rapidjson/bin/jsonchecker/fail32.json +0 -1
  198. package/external/rapidjson/bin/jsonchecker/fail33.json +0 -1
  199. package/external/rapidjson/bin/jsonchecker/fail4.json +0 -1
  200. package/external/rapidjson/bin/jsonchecker/fail5.json +0 -1
  201. package/external/rapidjson/bin/jsonchecker/fail6.json +0 -1
  202. package/external/rapidjson/bin/jsonchecker/fail7.json +0 -1
  203. package/external/rapidjson/bin/jsonchecker/fail8.json +0 -1
  204. package/external/rapidjson/bin/jsonchecker/fail9.json +0 -1
  205. package/external/rapidjson/bin/jsonchecker/pass1.json +0 -58
  206. package/external/rapidjson/bin/jsonchecker/pass2.json +0 -1
  207. package/external/rapidjson/bin/jsonchecker/pass3.json +0 -6
  208. package/external/rapidjson/bin/jsonchecker/readme.txt +0 -3
  209. package/external/rapidjson/bin/types/booleans.json +0 -102
  210. package/external/rapidjson/bin/types/floats.json +0 -102
  211. package/external/rapidjson/bin/types/guids.json +0 -102
  212. package/external/rapidjson/bin/types/integers.json +0 -102
  213. package/external/rapidjson/bin/types/mixed.json +0 -592
  214. package/external/rapidjson/bin/types/nulls.json +0 -102
  215. package/external/rapidjson/bin/types/paragraphs.json +0 -102
  216. package/external/rapidjson/bin/types/readme.txt +0 -1
  217. package/external/rapidjson/contrib/natvis/LICENSE +0 -45
  218. package/external/rapidjson/contrib/natvis/README.md +0 -7
  219. package/external/rapidjson/contrib/natvis/rapidjson.natvis +0 -38
  220. package/external/rapidjson/doc/CMakeLists.txt +0 -27
  221. package/external/rapidjson/doc/Doxyfile.in +0 -2369
  222. package/external/rapidjson/doc/Doxyfile.zh-cn.in +0 -2369
  223. package/external/rapidjson/doc/diagram/architecture.dot +0 -50
  224. package/external/rapidjson/doc/diagram/architecture.png +0 -0
  225. package/external/rapidjson/doc/diagram/insituparsing.dot +0 -65
  226. package/external/rapidjson/doc/diagram/insituparsing.png +0 -0
  227. package/external/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +0 -62
  228. package/external/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
  229. package/external/rapidjson/doc/diagram/move1.dot +0 -47
  230. package/external/rapidjson/doc/diagram/move1.png +0 -0
  231. package/external/rapidjson/doc/diagram/move2.dot +0 -62
  232. package/external/rapidjson/doc/diagram/move2.png +0 -0
  233. package/external/rapidjson/doc/diagram/move3.dot +0 -60
  234. package/external/rapidjson/doc/diagram/move3.png +0 -0
  235. package/external/rapidjson/doc/diagram/normalparsing.dot +0 -56
  236. package/external/rapidjson/doc/diagram/normalparsing.png +0 -0
  237. package/external/rapidjson/doc/diagram/simpledom.dot +0 -54
  238. package/external/rapidjson/doc/diagram/simpledom.png +0 -0
  239. package/external/rapidjson/doc/diagram/tutorial.dot +0 -58
  240. package/external/rapidjson/doc/diagram/tutorial.png +0 -0
  241. package/external/rapidjson/doc/diagram/utilityclass.dot +0 -73
  242. package/external/rapidjson/doc/diagram/utilityclass.png +0 -0
  243. package/external/rapidjson/doc/dom.md +0 -280
  244. package/external/rapidjson/doc/dom.zh-cn.md +0 -284
  245. package/external/rapidjson/doc/encoding.md +0 -146
  246. package/external/rapidjson/doc/encoding.zh-cn.md +0 -152
  247. package/external/rapidjson/doc/faq.md +0 -289
  248. package/external/rapidjson/doc/faq.zh-cn.md +0 -290
  249. package/external/rapidjson/doc/features.md +0 -104
  250. package/external/rapidjson/doc/features.zh-cn.md +0 -103
  251. package/external/rapidjson/doc/internals.md +0 -368
  252. package/external/rapidjson/doc/internals.zh-cn.md +0 -363
  253. package/external/rapidjson/doc/logo/rapidjson.png +0 -0
  254. package/external/rapidjson/doc/logo/rapidjson.svg +0 -119
  255. package/external/rapidjson/doc/misc/DoxygenLayout.xml +0 -194
  256. package/external/rapidjson/doc/misc/doxygenextra.css +0 -274
  257. package/external/rapidjson/doc/misc/footer.html +0 -11
  258. package/external/rapidjson/doc/misc/header.html +0 -24
  259. package/external/rapidjson/doc/npm.md +0 -31
  260. package/external/rapidjson/doc/performance.md +0 -26
  261. package/external/rapidjson/doc/performance.zh-cn.md +0 -26
  262. package/external/rapidjson/doc/pointer.md +0 -234
  263. package/external/rapidjson/doc/pointer.zh-cn.md +0 -234
  264. package/external/rapidjson/doc/sax.md +0 -509
  265. package/external/rapidjson/doc/sax.zh-cn.md +0 -487
  266. package/external/rapidjson/doc/schema.md +0 -505
  267. package/external/rapidjson/doc/schema.zh-cn.md +0 -237
  268. package/external/rapidjson/doc/stream.md +0 -429
  269. package/external/rapidjson/doc/stream.zh-cn.md +0 -429
  270. package/external/rapidjson/doc/tutorial.md +0 -536
  271. package/external/rapidjson/doc/tutorial.zh-cn.md +0 -535
  272. package/external/rapidjson/docker/debian/Dockerfile +0 -8
  273. package/external/rapidjson/example/CMakeLists.txt +0 -45
  274. package/external/rapidjson/example/archiver/archiver.cpp +0 -292
  275. package/external/rapidjson/example/archiver/archiver.h +0 -145
  276. package/external/rapidjson/example/archiver/archivertest.cpp +0 -287
  277. package/external/rapidjson/example/capitalize/capitalize.cpp +0 -67
  278. package/external/rapidjson/example/condense/condense.cpp +0 -32
  279. package/external/rapidjson/example/filterkey/filterkey.cpp +0 -135
  280. package/external/rapidjson/example/filterkeydom/filterkeydom.cpp +0 -170
  281. package/external/rapidjson/example/jsonx/jsonx.cpp +0 -207
  282. package/external/rapidjson/example/lookaheadparser/lookaheadparser.cpp +0 -350
  283. package/external/rapidjson/example/messagereader/messagereader.cpp +0 -105
  284. package/external/rapidjson/example/parsebyparts/parsebyparts.cpp +0 -176
  285. package/external/rapidjson/example/pretty/pretty.cpp +0 -30
  286. package/external/rapidjson/example/prettyauto/prettyauto.cpp +0 -56
  287. package/external/rapidjson/example/schemavalidator/schemavalidator.cpp +0 -78
  288. package/external/rapidjson/example/serialize/serialize.cpp +0 -173
  289. package/external/rapidjson/example/simpledom/simpledom.cpp +0 -29
  290. package/external/rapidjson/example/simplepullreader/simplepullreader.cpp +0 -53
  291. package/external/rapidjson/example/simplereader/simplereader.cpp +0 -42
  292. package/external/rapidjson/example/simplewriter/simplewriter.cpp +0 -36
  293. package/external/rapidjson/example/tutorial/tutorial.cpp +0 -151
  294. package/external/rapidjson/include/rapidjson/allocators.h +0 -284
  295. package/external/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -78
  296. package/external/rapidjson/include/rapidjson/document.h +0 -2646
  297. package/external/rapidjson/include/rapidjson/encodedstream.h +0 -299
  298. package/external/rapidjson/include/rapidjson/encodings.h +0 -716
  299. package/external/rapidjson/include/rapidjson/error/en.h +0 -74
  300. package/external/rapidjson/include/rapidjson/error/error.h +0 -161
  301. package/external/rapidjson/include/rapidjson/filereadstream.h +0 -99
  302. package/external/rapidjson/include/rapidjson/filewritestream.h +0 -104
  303. package/external/rapidjson/include/rapidjson/fwd.h +0 -151
  304. package/external/rapidjson/include/rapidjson/internal/biginteger.h +0 -290
  305. package/external/rapidjson/include/rapidjson/internal/diyfp.h +0 -271
  306. package/external/rapidjson/include/rapidjson/internal/dtoa.h +0 -245
  307. package/external/rapidjson/include/rapidjson/internal/ieee754.h +0 -78
  308. package/external/rapidjson/include/rapidjson/internal/itoa.h +0 -308
  309. package/external/rapidjson/include/rapidjson/internal/meta.h +0 -186
  310. package/external/rapidjson/include/rapidjson/internal/pow10.h +0 -55
  311. package/external/rapidjson/include/rapidjson/internal/regex.h +0 -732
  312. package/external/rapidjson/include/rapidjson/internal/stack.h +0 -231
  313. package/external/rapidjson/include/rapidjson/internal/strfunc.h +0 -69
  314. package/external/rapidjson/include/rapidjson/internal/strtod.h +0 -290
  315. package/external/rapidjson/include/rapidjson/internal/swap.h +0 -46
  316. package/external/rapidjson/include/rapidjson/istreamwrapper.h +0 -113
  317. package/external/rapidjson/include/rapidjson/memorybuffer.h +0 -70
  318. package/external/rapidjson/include/rapidjson/memorystream.h +0 -71
  319. package/external/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -316
  320. package/external/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -300
  321. package/external/rapidjson/include/rapidjson/ostreamwrapper.h +0 -81
  322. package/external/rapidjson/include/rapidjson/pointer.h +0 -1357
  323. package/external/rapidjson/include/rapidjson/prettywriter.h +0 -277
  324. package/external/rapidjson/include/rapidjson/rapidjson.h +0 -654
  325. package/external/rapidjson/include/rapidjson/reader.h +0 -2230
  326. package/external/rapidjson/include/rapidjson/schema.h +0 -2494
  327. package/external/rapidjson/include/rapidjson/stream.h +0 -223
  328. package/external/rapidjson/include/rapidjson/stringbuffer.h +0 -121
  329. package/external/rapidjson/include/rapidjson/writer.h +0 -710
  330. package/external/rapidjson/include_dirs.js +0 -2
  331. package/external/rapidjson/library.json +0 -15
  332. package/external/rapidjson/license.txt +0 -57
  333. package/external/rapidjson/package.json +0 -24
  334. package/external/rapidjson/rapidjson.autopkg +0 -77
  335. package/external/rapidjson/readme.md +0 -160
  336. package/external/rapidjson/readme.zh-cn.md +0 -152
  337. package/external/rapidjson/test/CMakeLists.txt +0 -20
  338. package/external/rapidjson/test/perftest/CMakeLists.txt +0 -28
  339. package/external/rapidjson/test/perftest/misctest.cpp +0 -974
  340. package/external/rapidjson/test/perftest/perftest.cpp +0 -24
  341. package/external/rapidjson/test/perftest/perftest.h +0 -185
  342. package/external/rapidjson/test/perftest/platformtest.cpp +0 -166
  343. package/external/rapidjson/test/perftest/rapidjsontest.cpp +0 -472
  344. package/external/rapidjson/test/perftest/schematest.cpp +0 -223
  345. package/external/rapidjson/test/unittest/CMakeLists.txt +0 -92
  346. package/external/rapidjson/test/unittest/allocatorstest.cpp +0 -100
  347. package/external/rapidjson/test/unittest/bigintegertest.cpp +0 -138
  348. package/external/rapidjson/test/unittest/cursorstreamwrappertest.cpp +0 -115
  349. package/external/rapidjson/test/unittest/documenttest.cpp +0 -672
  350. package/external/rapidjson/test/unittest/dtoatest.cpp +0 -98
  351. package/external/rapidjson/test/unittest/encodedstreamtest.cpp +0 -313
  352. package/external/rapidjson/test/unittest/encodingstest.cpp +0 -451
  353. package/external/rapidjson/test/unittest/filestreamtest.cpp +0 -112
  354. package/external/rapidjson/test/unittest/fwdtest.cpp +0 -230
  355. package/external/rapidjson/test/unittest/istreamwrappertest.cpp +0 -181
  356. package/external/rapidjson/test/unittest/itoatest.cpp +0 -160
  357. package/external/rapidjson/test/unittest/jsoncheckertest.cpp +0 -143
  358. package/external/rapidjson/test/unittest/namespacetest.cpp +0 -70
  359. package/external/rapidjson/test/unittest/ostreamwrappertest.cpp +0 -92
  360. package/external/rapidjson/test/unittest/pointertest.cpp +0 -1529
  361. package/external/rapidjson/test/unittest/prettywritertest.cpp +0 -373
  362. package/external/rapidjson/test/unittest/readertest.cpp +0 -2190
  363. package/external/rapidjson/test/unittest/regextest.cpp +0 -638
  364. package/external/rapidjson/test/unittest/schematest.cpp +0 -2072
  365. package/external/rapidjson/test/unittest/simdtest.cpp +0 -219
  366. package/external/rapidjson/test/unittest/strfunctest.cpp +0 -30
  367. package/external/rapidjson/test/unittest/stringbuffertest.cpp +0 -192
  368. package/external/rapidjson/test/unittest/strtodtest.cpp +0 -132
  369. package/external/rapidjson/test/unittest/unittest.cpp +0 -51
  370. package/external/rapidjson/test/unittest/unittest.h +0 -140
  371. package/external/rapidjson/test/unittest/valuetest.cpp +0 -1851
  372. package/external/rapidjson/test/unittest/writertest.cpp +0 -598
  373. package/external/rapidjson/test/valgrind.supp +0 -17
  374. package/external/rapidjson/thirdparty/gtest/.travis.yml +0 -81
  375. package/external/rapidjson/thirdparty/gtest/BUILD.bazel +0 -175
  376. package/external/rapidjson/thirdparty/gtest/CMakeLists.txt +0 -33
  377. package/external/rapidjson/thirdparty/gtest/CONTRIBUTING.md +0 -160
  378. package/external/rapidjson/thirdparty/gtest/LICENSE +0 -28
  379. package/external/rapidjson/thirdparty/gtest/Makefile.am +0 -14
  380. package/external/rapidjson/thirdparty/gtest/README.md +0 -122
  381. package/external/rapidjson/thirdparty/gtest/WORKSPACE +0 -8
  382. package/external/rapidjson/thirdparty/gtest/appveyor.yml +0 -104
  383. package/external/rapidjson/thirdparty/gtest/ci/build-linux-autotools.sh +0 -44
  384. package/external/rapidjson/thirdparty/gtest/ci/build-linux-bazel.sh +0 -36
  385. package/external/rapidjson/thirdparty/gtest/ci/env-linux.sh +0 -41
  386. package/external/rapidjson/thirdparty/gtest/ci/env-osx.sh +0 -40
  387. package/external/rapidjson/thirdparty/gtest/ci/get-nprocessors.sh +0 -48
  388. package/external/rapidjson/thirdparty/gtest/ci/install-linux.sh +0 -49
  389. package/external/rapidjson/thirdparty/gtest/ci/install-osx.sh +0 -39
  390. package/external/rapidjson/thirdparty/gtest/ci/log-config.sh +0 -51
  391. package/external/rapidjson/thirdparty/gtest/ci/travis.sh +0 -44
  392. package/external/rapidjson/thirdparty/gtest/configure.ac +0 -16
  393. package/external/rapidjson/thirdparty/gtest/googlemock/CHANGES +0 -126
  394. package/external/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +0 -242
  395. package/external/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +0 -40
  396. package/external/rapidjson/thirdparty/gtest/googlemock/LICENSE +0 -28
  397. package/external/rapidjson/thirdparty/gtest/googlemock/Makefile.am +0 -224
  398. package/external/rapidjson/thirdparty/gtest/googlemock/README.md +0 -344
  399. package/external/rapidjson/thirdparty/gtest/googlemock/build-aux/.keep +0 -0
  400. package/external/rapidjson/thirdparty/gtest/googlemock/cmake/gmock.pc.in +0 -9
  401. package/external/rapidjson/thirdparty/gtest/googlemock/cmake/gmock_main.pc.in +0 -9
  402. package/external/rapidjson/thirdparty/gtest/googlemock/configure.ac +0 -146
  403. package/external/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +0 -564
  404. package/external/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +0 -3660
  405. package/external/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +0 -280
  406. package/external/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +0 -15
  407. package/external/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +0 -447
  408. package/external/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +0 -627
  409. package/external/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +0 -19
  410. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +0 -1262
  411. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +0 -147
  412. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +0 -2571
  413. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +0 -833
  414. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +0 -1379
  415. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +0 -347
  416. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +0 -2258
  417. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +0 -675
  418. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +0 -458
  419. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +0 -178
  420. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +0 -5255
  421. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +0 -246
  422. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +0 -91
  423. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +0 -1918
  424. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +0 -95
  425. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +0 -8
  426. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +0 -10
  427. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +0 -38
  428. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +0 -46
  429. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +0 -286
  430. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +0 -136
  431. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +0 -574
  432. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +0 -87
  433. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +0 -32
  434. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +0 -191
  435. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +0 -15
  436. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +0 -187
  437. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +0 -201
  438. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +0 -46
  439. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +0 -145
  440. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +0 -19
  441. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +0 -151
  442. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +0 -176
  443. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +0 -46
  444. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +0 -145
  445. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +0 -19
  446. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +0 -151
  447. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +0 -176
  448. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +0 -240
  449. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +0 -203
  450. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +0 -34
  451. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +0 -115
  452. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  453. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +0 -1733
  454. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +0 -227
  455. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +0 -448
  456. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +0 -59
  457. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +0 -287
  458. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +0 -41
  459. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +0 -31
  460. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +0 -303
  461. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +0 -640
  462. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +0 -1387
  463. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +0 -78
  464. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +0 -47
  465. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +0 -156
  466. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +0 -204
  467. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +0 -573
  468. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +0 -883
  469. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +0 -205
  470. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +0 -54
  471. package/external/rapidjson/thirdparty/gtest/googlemock/test/BUILD.bazel +0 -123
  472. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +0 -1575
  473. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +0 -428
  474. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +0 -1230
  475. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +0 -647
  476. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +0 -129
  477. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +0 -1341
  478. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +0 -718
  479. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +0 -6767
  480. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +0 -710
  481. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +0 -511
  482. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +0 -43
  483. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +0 -2771
  484. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +0 -51
  485. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +0 -81
  486. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +0 -108
  487. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +0 -100
  488. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +0 -40
  489. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +0 -40
  490. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +0 -691
  491. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +0 -183
  492. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +0 -310
  493. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +0 -317
  494. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +0 -323
  495. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +0 -262
  496. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +0 -110
  497. package/external/rapidjson/thirdparty/gtest/googletest/CHANGES +0 -157
  498. package/external/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +0 -312
  499. package/external/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +0 -37
  500. package/external/rapidjson/thirdparty/gtest/googletest/LICENSE +0 -28
  501. package/external/rapidjson/thirdparty/gtest/googletest/Makefile.am +0 -339
  502. package/external/rapidjson/thirdparty/gtest/googletest/README.md +0 -341
  503. package/external/rapidjson/thirdparty/gtest/googletest/cmake/gtest.pc.in +0 -9
  504. package/external/rapidjson/thirdparty/gtest/googletest/cmake/gtest_main.pc.in +0 -10
  505. package/external/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +0 -280
  506. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +0 -138
  507. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +0 -54
  508. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +0 -38
  509. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +0 -40
  510. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +0 -82
  511. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +0 -88
  512. package/external/rapidjson/thirdparty/gtest/googletest/configure.ac +0 -68
  513. package/external/rapidjson/thirdparty/gtest/googletest/docs/Pkgconfig.md +0 -146
  514. package/external/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +0 -177
  515. package/external/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +0 -93
  516. package/external/rapidjson/thirdparty/gtest/googletest/docs/advanced.md +0 -2416
  517. package/external/rapidjson/thirdparty/gtest/googletest/docs/faq.md +0 -1092
  518. package/external/rapidjson/thirdparty/gtest/googletest/docs/primer.md +0 -536
  519. package/external/rapidjson/thirdparty/gtest/googletest/docs/samples.md +0 -14
  520. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +0 -342
  521. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +0 -249
  522. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +0 -1438
  523. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +0 -501
  524. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +0 -1082
  525. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +0 -231
  526. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +0 -179
  527. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +0 -264
  528. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +0 -2332
  529. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +0 -357
  530. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +0 -61
  531. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +0 -70
  532. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
  533. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +0 -45
  534. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -275
  535. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +0 -205
  536. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +0 -1277
  537. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
  538. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5139
  539. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -279
  540. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +0 -723
  541. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +0 -100
  542. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +0 -2687
  543. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +0 -167
  544. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
  545. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
  546. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +0 -3347
  547. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -313
  548. package/external/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +0 -363
  549. package/external/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +0 -74
  550. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.sln +0 -55
  551. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj +0 -149
  552. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj.filters +0 -18
  553. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.sln +0 -55
  554. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj +0 -149
  555. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj.filters +0 -18
  556. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj +0 -154
  557. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj.filters +0 -18
  558. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj +0 -162
  559. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj.filters +0 -18
  560. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj +0 -199
  561. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters +0 -26
  562. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj +0 -191
  563. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters +0 -26
  564. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj +0 -188
  565. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters +0 -18
  566. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj +0 -180
  567. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj.filters +0 -18
  568. package/external/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +0 -127
  569. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +0 -68
  570. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +0 -43
  571. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -140
  572. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +0 -154
  573. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +0 -56
  574. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +0 -85
  575. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +0 -110
  576. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +0 -172
  577. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +0 -152
  578. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +0 -46
  579. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +0 -53
  580. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +0 -49
  581. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +0 -199
  582. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +0 -225
  583. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +0 -118
  584. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +0 -174
  585. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -157
  586. package/external/rapidjson/thirdparty/gtest/googletest/scripts/common.py +0 -83
  587. package/external/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +0 -253
  588. package/external/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +0 -730
  589. package/external/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +0 -274
  590. package/external/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +0 -855
  591. package/external/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +0 -158
  592. package/external/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +0 -1387
  593. package/external/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +0 -78
  594. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +0 -48
  595. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +0 -1536
  596. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +0 -385
  597. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +0 -1175
  598. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +0 -1277
  599. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +0 -458
  600. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +0 -102
  601. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +0 -119
  602. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +0 -5846
  603. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +0 -38
  604. package/external/rapidjson/thirdparty/gtest/googletest/test/BUILD.bazel +0 -396
  605. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +0 -93
  606. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +0 -1424
  607. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +0 -652
  608. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +0 -154
  609. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +0 -311
  610. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +0 -159
  611. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +0 -213
  612. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +0 -61
  613. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +0 -1110
  614. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +0 -53
  615. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +0 -1303
  616. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +0 -1737
  617. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +0 -208
  618. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +0 -320
  619. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +0 -45
  620. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +0 -380
  621. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +0 -66
  622. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +0 -341
  623. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +0 -47
  624. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_assert_by_exception_test.cc +0 -119
  625. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +0 -210
  626. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +0 -87
  627. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -235
  628. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +0 -311
  629. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +0 -129
  630. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -63
  631. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +0 -119
  632. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -124
  633. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -189
  634. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +0 -638
  635. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -138
  636. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +0 -172
  637. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +0 -46
  638. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_json_outfiles_test.py +0 -162
  639. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_json_output_unittest.py +0 -611
  640. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_json_test_utils.py +0 -60
  641. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +0 -207
  642. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +0 -157
  643. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +0 -45
  644. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +0 -56
  645. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +0 -344
  646. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +0 -1067
  647. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +0 -781
  648. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +0 -2427
  649. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +0 -127
  650. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +0 -57
  651. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +0 -236
  652. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +0 -325
  653. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +0 -103
  654. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +0 -57
  655. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -250
  656. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +0 -318
  657. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test.py +0 -65
  658. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test_.cc +0 -44
  659. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +0 -92
  660. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +0 -171
  661. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +0 -72
  662. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +0 -69
  663. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +0 -43
  664. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +0 -7797
  665. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -48
  666. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -48
  667. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +0 -140
  668. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +0 -378
  669. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -179
  670. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +0 -196
  671. package/external/rapidjson/thirdparty/gtest/googletest/test/production.cc +0 -36
  672. package/external/rapidjson/thirdparty/gtest/googletest/test/production.h +0 -55
  673. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +0 -30
  674. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +0 -17
  675. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +0 -41
  676. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +0 -32
  677. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +0 -18
  678. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +0 -8
  679. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +0 -30
  680. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +0 -28
  681. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +0 -457
  682. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +0 -62
  683. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +0 -63
  684. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +0 -59
  685. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +0 -68
  686. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +0 -65
  687. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +0 -100
  688. package/external/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +0 -1182
  689. package/external/rapidjson/travis-doxygen.sh +0 -121
  690. package/include/.clang-format +0 -76
  691. package/include/eosio/abi.hpp +0 -286
  692. package/include/eosio/asset.hpp +0 -458
  693. package/include/eosio/bytes.hpp +0 -27
  694. package/include/eosio/chain_conversions.hpp +0 -450
  695. package/include/eosio/chain_types.hpp +0 -14
  696. package/include/eosio/check.hpp +0 -178
  697. package/include/eosio/convert.hpp +0 -95
  698. package/include/eosio/crypto.hpp +0 -147
  699. package/include/eosio/eosio_outcome.hpp +0 -41
  700. package/include/eosio/fixed_bytes.hpp +0 -246
  701. package/include/eosio/float.hpp +0 -35
  702. package/include/eosio/for_each_field.hpp +0 -48
  703. package/include/eosio/fpconv.c +0 -336
  704. package/include/eosio/fpconv.h +0 -41
  705. package/include/eosio/fpconv.license +0 -23
  706. package/include/eosio/from_bin.hpp +0 -272
  707. package/include/eosio/from_json.hpp +0 -737
  708. package/include/eosio/from_string.hpp +0 -28
  709. package/include/eosio/map_macro.h +0 -64
  710. package/include/eosio/murmur.hpp +0 -55
  711. package/include/eosio/name.hpp +0 -174
  712. package/include/eosio/opaque.hpp +0 -108
  713. package/include/eosio/operators.hpp +0 -71
  714. package/include/eosio/powers.h +0 -76
  715. package/include/eosio/reflection.hpp +0 -61
  716. package/include/eosio/ship_protocol.hpp +0 -850
  717. package/include/eosio/stream.hpp +0 -231
  718. package/include/eosio/symbol.hpp +0 -300
  719. package/include/eosio/time.hpp +0 -264
  720. package/include/eosio/to_bin.hpp +0 -189
  721. package/include/eosio/to_json.hpp +0 -279
  722. package/include/eosio/to_key.hpp +0 -298
  723. package/include/eosio/types.hpp +0 -97
  724. package/include/eosio/varint.hpp +0 -452
  725. package/include/outcome-basic.hpp +0 -6836
  726. package/src/abi.cpp +0 -297
  727. package/src/abieos.cpp +0 -263
  728. package/src/abieos.h +0 -76
  729. package/src/abieos.hpp +0 -1010
  730. package/src/abieos_exception.hpp +0 -89
  731. package/src/abieos_numeric.hpp +0 -94
  732. package/src/abieos_ripemd160.hpp +0 -417
  733. package/src/crypto.cpp +0 -215
  734. package/src/key_test.cpp +0 -218
  735. package/src/main.cpp +0 -242
  736. package/src/reflect_test.cpp +0 -28
  737. package/src/template_test.cpp +0 -240
  738. package/src/test.cpp +0 -940
  739. package/tools/CMakeLists.txt +0 -9
  740. package/tools/name.cpp +0 -86
@@ -1,1262 +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 actions.
35
-
36
- #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
37
- #define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
38
-
39
- #ifndef _WIN32_WCE
40
- # include <errno.h>
41
- #endif
42
-
43
- #include <algorithm>
44
- #include <string>
45
-
46
- #include "gmock/internal/gmock-internal-utils.h"
47
- #include "gmock/internal/gmock-port.h"
48
-
49
- #if GTEST_LANG_CXX11 // Defined by gtest-port.h via gmock-port.h.
50
- #include <functional>
51
- #include <type_traits>
52
- #endif // GTEST_LANG_CXX11
53
-
54
- namespace testing {
55
-
56
- // To implement an action Foo, define:
57
- // 1. a class FooAction that implements the ActionInterface interface, and
58
- // 2. a factory function that creates an Action object from a
59
- // const FooAction*.
60
- //
61
- // The two-level delegation design follows that of Matcher, providing
62
- // consistency for extension developers. It also eases ownership
63
- // management as Action objects can now be copied like plain values.
64
-
65
- namespace internal {
66
-
67
- template <typename F1, typename F2>
68
- class ActionAdaptor;
69
-
70
- // BuiltInDefaultValueGetter<T, true>::Get() returns a
71
- // default-constructed T value. BuiltInDefaultValueGetter<T,
72
- // false>::Get() crashes with an error.
73
- //
74
- // This primary template is used when kDefaultConstructible is true.
75
- template <typename T, bool kDefaultConstructible>
76
- struct BuiltInDefaultValueGetter {
77
- static T Get() { return T(); }
78
- };
79
- template <typename T>
80
- struct BuiltInDefaultValueGetter<T, false> {
81
- static T Get() {
82
- Assert(false, __FILE__, __LINE__,
83
- "Default action undefined for the function return type.");
84
- return internal::Invalid<T>();
85
- // The above statement will never be reached, but is required in
86
- // order for this function to compile.
87
- }
88
- };
89
-
90
- // BuiltInDefaultValue<T>::Get() returns the "built-in" default value
91
- // for type T, which is NULL when T is a raw pointer type, 0 when T is
92
- // a numeric type, false when T is bool, or "" when T is string or
93
- // std::string. In addition, in C++11 and above, it turns a
94
- // default-constructed T value if T is default constructible. For any
95
- // other type T, the built-in default T value is undefined, and the
96
- // function will abort the process.
97
- template <typename T>
98
- class BuiltInDefaultValue {
99
- public:
100
- #if GTEST_LANG_CXX11
101
- // This function returns true iff type T has a built-in default value.
102
- static bool Exists() {
103
- return ::std::is_default_constructible<T>::value;
104
- }
105
-
106
- static T Get() {
107
- return BuiltInDefaultValueGetter<
108
- T, ::std::is_default_constructible<T>::value>::Get();
109
- }
110
-
111
- #else // GTEST_LANG_CXX11
112
- // This function returns true iff type T has a built-in default value.
113
- static bool Exists() {
114
- return false;
115
- }
116
-
117
- static T Get() {
118
- return BuiltInDefaultValueGetter<T, false>::Get();
119
- }
120
-
121
- #endif // GTEST_LANG_CXX11
122
- };
123
-
124
- // This partial specialization says that we use the same built-in
125
- // default value for T and const T.
126
- template <typename T>
127
- class BuiltInDefaultValue<const T> {
128
- public:
129
- static bool Exists() { return BuiltInDefaultValue<T>::Exists(); }
130
- static T Get() { return BuiltInDefaultValue<T>::Get(); }
131
- };
132
-
133
- // This partial specialization defines the default values for pointer
134
- // types.
135
- template <typename T>
136
- class BuiltInDefaultValue<T*> {
137
- public:
138
- static bool Exists() { return true; }
139
- static T* Get() { return NULL; }
140
- };
141
-
142
- // The following specializations define the default values for
143
- // specific types we care about.
144
- #define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \
145
- template <> \
146
- class BuiltInDefaultValue<type> { \
147
- public: \
148
- static bool Exists() { return true; } \
149
- static type Get() { return value; } \
150
- }
151
-
152
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT
153
- #if GTEST_HAS_GLOBAL_STRING
154
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, "");
155
- #endif // GTEST_HAS_GLOBAL_STRING
156
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, "");
157
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false);
158
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0');
159
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\0');
160
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\0');
161
-
162
- // There's no need for a default action for signed wchar_t, as that
163
- // type is the same as wchar_t for gcc, and invalid for MSVC.
164
- //
165
- // There's also no need for a default action for unsigned wchar_t, as
166
- // that type is the same as unsigned int for gcc, and invalid for
167
- // MSVC.
168
- #if GMOCK_WCHAR_T_IS_NATIVE_
169
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U); // NOLINT
170
- #endif
171
-
172
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned short, 0U); // NOLINT
173
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed short, 0); // NOLINT
174
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U);
175
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0);
176
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL); // NOLINT
177
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L); // NOLINT
178
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(UInt64, 0);
179
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(Int64, 0);
180
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0);
181
- GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0);
182
-
183
- #undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
184
-
185
- } // namespace internal
186
-
187
- // When an unexpected function call is encountered, Google Mock will
188
- // let it return a default value if the user has specified one for its
189
- // return type, or if the return type has a built-in default value;
190
- // otherwise Google Mock won't know what value to return and will have
191
- // to abort the process.
192
- //
193
- // The DefaultValue<T> class allows a user to specify the
194
- // default value for a type T that is both copyable and publicly
195
- // destructible (i.e. anything that can be used as a function return
196
- // type). The usage is:
197
- //
198
- // // Sets the default value for type T to be foo.
199
- // DefaultValue<T>::Set(foo);
200
- template <typename T>
201
- class DefaultValue {
202
- public:
203
- // Sets the default value for type T; requires T to be
204
- // copy-constructable and have a public destructor.
205
- static void Set(T x) {
206
- delete producer_;
207
- producer_ = new FixedValueProducer(x);
208
- }
209
-
210
- // Provides a factory function to be called to generate the default value.
211
- // This method can be used even if T is only move-constructible, but it is not
212
- // limited to that case.
213
- typedef T (*FactoryFunction)();
214
- static void SetFactory(FactoryFunction factory) {
215
- delete producer_;
216
- producer_ = new FactoryValueProducer(factory);
217
- }
218
-
219
- // Unsets the default value for type T.
220
- static void Clear() {
221
- delete producer_;
222
- producer_ = NULL;
223
- }
224
-
225
- // Returns true iff the user has set the default value for type T.
226
- static bool IsSet() { return producer_ != NULL; }
227
-
228
- // Returns true if T has a default return value set by the user or there
229
- // exists a built-in default value.
230
- static bool Exists() {
231
- return IsSet() || internal::BuiltInDefaultValue<T>::Exists();
232
- }
233
-
234
- // Returns the default value for type T if the user has set one;
235
- // otherwise returns the built-in default value. Requires that Exists()
236
- // is true, which ensures that the return value is well-defined.
237
- static T Get() {
238
- return producer_ == NULL ?
239
- internal::BuiltInDefaultValue<T>::Get() : producer_->Produce();
240
- }
241
-
242
- private:
243
- class ValueProducer {
244
- public:
245
- virtual ~ValueProducer() {}
246
- virtual T Produce() = 0;
247
- };
248
-
249
- class FixedValueProducer : public ValueProducer {
250
- public:
251
- explicit FixedValueProducer(T value) : value_(value) {}
252
- virtual T Produce() { return value_; }
253
-
254
- private:
255
- const T value_;
256
- GTEST_DISALLOW_COPY_AND_ASSIGN_(FixedValueProducer);
257
- };
258
-
259
- class FactoryValueProducer : public ValueProducer {
260
- public:
261
- explicit FactoryValueProducer(FactoryFunction factory)
262
- : factory_(factory) {}
263
- virtual T Produce() { return factory_(); }
264
-
265
- private:
266
- const FactoryFunction factory_;
267
- GTEST_DISALLOW_COPY_AND_ASSIGN_(FactoryValueProducer);
268
- };
269
-
270
- static ValueProducer* producer_;
271
- };
272
-
273
- // This partial specialization allows a user to set default values for
274
- // reference types.
275
- template <typename T>
276
- class DefaultValue<T&> {
277
- public:
278
- // Sets the default value for type T&.
279
- static void Set(T& x) { // NOLINT
280
- address_ = &x;
281
- }
282
-
283
- // Unsets the default value for type T&.
284
- static void Clear() {
285
- address_ = NULL;
286
- }
287
-
288
- // Returns true iff the user has set the default value for type T&.
289
- static bool IsSet() { return address_ != NULL; }
290
-
291
- // Returns true if T has a default return value set by the user or there
292
- // exists a built-in default value.
293
- static bool Exists() {
294
- return IsSet() || internal::BuiltInDefaultValue<T&>::Exists();
295
- }
296
-
297
- // Returns the default value for type T& if the user has set one;
298
- // otherwise returns the built-in default value if there is one;
299
- // otherwise aborts the process.
300
- static T& Get() {
301
- return address_ == NULL ?
302
- internal::BuiltInDefaultValue<T&>::Get() : *address_;
303
- }
304
-
305
- private:
306
- static T* address_;
307
- };
308
-
309
- // This specialization allows DefaultValue<void>::Get() to
310
- // compile.
311
- template <>
312
- class DefaultValue<void> {
313
- public:
314
- static bool Exists() { return true; }
315
- static void Get() {}
316
- };
317
-
318
- // Points to the user-set default value for type T.
319
- template <typename T>
320
- typename DefaultValue<T>::ValueProducer* DefaultValue<T>::producer_ = NULL;
321
-
322
- // Points to the user-set default value for type T&.
323
- template <typename T>
324
- T* DefaultValue<T&>::address_ = NULL;
325
-
326
- // Implement this interface to define an action for function type F.
327
- template <typename F>
328
- class ActionInterface {
329
- public:
330
- typedef typename internal::Function<F>::Result Result;
331
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
332
-
333
- ActionInterface() {}
334
- virtual ~ActionInterface() {}
335
-
336
- // Performs the action. This method is not const, as in general an
337
- // action can have side effects and be stateful. For example, a
338
- // get-the-next-element-from-the-collection action will need to
339
- // remember the current element.
340
- virtual Result Perform(const ArgumentTuple& args) = 0;
341
-
342
- private:
343
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface);
344
- };
345
-
346
- // An Action<F> is a copyable and IMMUTABLE (except by assignment)
347
- // object that represents an action to be taken when a mock function
348
- // of type F is called. The implementation of Action<T> is just a
349
- // linked_ptr to const ActionInterface<T>, so copying is fairly cheap.
350
- // Don't inherit from Action!
351
- //
352
- // You can view an object implementing ActionInterface<F> as a
353
- // concrete action (including its current state), and an Action<F>
354
- // object as a handle to it.
355
- template <typename F>
356
- class Action {
357
- public:
358
- typedef typename internal::Function<F>::Result Result;
359
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
360
-
361
- // Constructs a null Action. Needed for storing Action objects in
362
- // STL containers.
363
- Action() {}
364
-
365
- #if GTEST_LANG_CXX11
366
- // Construct an Action from a specified callable.
367
- // This cannot take std::function directly, because then Action would not be
368
- // directly constructible from lambda (it would require two conversions).
369
- template <typename G,
370
- typename = typename ::std::enable_if<
371
- ::std::is_constructible<::std::function<F>, G>::value>::type>
372
- Action(G&& fun) : fun_(::std::forward<G>(fun)) {} // NOLINT
373
- #endif
374
-
375
- // Constructs an Action from its implementation.
376
- explicit Action(ActionInterface<F>* impl) : impl_(impl) {}
377
-
378
- // This constructor allows us to turn an Action<Func> object into an
379
- // Action<F>, as long as F's arguments can be implicitly converted
380
- // to Func's and Func's return type can be implicitly converted to
381
- // F's.
382
- template <typename Func>
383
- explicit Action(const Action<Func>& action);
384
-
385
- // Returns true iff this is the DoDefault() action.
386
- bool IsDoDefault() const {
387
- #if GTEST_LANG_CXX11
388
- return impl_ == nullptr && fun_ == nullptr;
389
- #else
390
- return impl_ == NULL;
391
- #endif
392
- }
393
-
394
- // Performs the action. Note that this method is const even though
395
- // the corresponding method in ActionInterface is not. The reason
396
- // is that a const Action<F> means that it cannot be re-bound to
397
- // another concrete action, not that the concrete action it binds to
398
- // cannot change state. (Think of the difference between a const
399
- // pointer and a pointer to const.)
400
- Result Perform(ArgumentTuple args) const {
401
- if (IsDoDefault()) {
402
- internal::IllegalDoDefault(__FILE__, __LINE__);
403
- }
404
- #if GTEST_LANG_CXX11
405
- if (fun_ != nullptr) {
406
- return internal::Apply(fun_, ::std::move(args));
407
- }
408
- #endif
409
- return impl_->Perform(args);
410
- }
411
-
412
- private:
413
- template <typename F1, typename F2>
414
- friend class internal::ActionAdaptor;
415
-
416
- template <typename G>
417
- friend class Action;
418
-
419
- // In C++11, Action can be implemented either as a generic functor (through
420
- // std::function), or legacy ActionInterface. In C++98, only ActionInterface
421
- // is available. The invariants are as follows:
422
- // * in C++98, impl_ is null iff this is the default action
423
- // * in C++11, at most one of fun_ & impl_ may be nonnull; both are null iff
424
- // this is the default action
425
- #if GTEST_LANG_CXX11
426
- ::std::function<F> fun_;
427
- #endif
428
- internal::linked_ptr<ActionInterface<F> > impl_;
429
- };
430
-
431
- // The PolymorphicAction class template makes it easy to implement a
432
- // polymorphic action (i.e. an action that can be used in mock
433
- // functions of than one type, e.g. Return()).
434
- //
435
- // To define a polymorphic action, a user first provides a COPYABLE
436
- // implementation class that has a Perform() method template:
437
- //
438
- // class FooAction {
439
- // public:
440
- // template <typename Result, typename ArgumentTuple>
441
- // Result Perform(const ArgumentTuple& args) const {
442
- // // Processes the arguments and returns a result, using
443
- // // tr1::get<N>(args) to get the N-th (0-based) argument in the tuple.
444
- // }
445
- // ...
446
- // };
447
- //
448
- // Then the user creates the polymorphic action using
449
- // MakePolymorphicAction(object) where object has type FooAction. See
450
- // the definition of Return(void) and SetArgumentPointee<N>(value) for
451
- // complete examples.
452
- template <typename Impl>
453
- class PolymorphicAction {
454
- public:
455
- explicit PolymorphicAction(const Impl& impl) : impl_(impl) {}
456
-
457
- template <typename F>
458
- operator Action<F>() const {
459
- return Action<F>(new MonomorphicImpl<F>(impl_));
460
- }
461
-
462
- private:
463
- template <typename F>
464
- class MonomorphicImpl : public ActionInterface<F> {
465
- public:
466
- typedef typename internal::Function<F>::Result Result;
467
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
468
-
469
- explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
470
-
471
- virtual Result Perform(const ArgumentTuple& args) {
472
- return impl_.template Perform<Result>(args);
473
- }
474
-
475
- private:
476
- Impl impl_;
477
-
478
- GTEST_DISALLOW_ASSIGN_(MonomorphicImpl);
479
- };
480
-
481
- Impl impl_;
482
-
483
- GTEST_DISALLOW_ASSIGN_(PolymorphicAction);
484
- };
485
-
486
- // Creates an Action from its implementation and returns it. The
487
- // created Action object owns the implementation.
488
- template <typename F>
489
- Action<F> MakeAction(ActionInterface<F>* impl) {
490
- return Action<F>(impl);
491
- }
492
-
493
- // Creates a polymorphic action from its implementation. This is
494
- // easier to use than the PolymorphicAction<Impl> constructor as it
495
- // doesn't require you to explicitly write the template argument, e.g.
496
- //
497
- // MakePolymorphicAction(foo);
498
- // vs
499
- // PolymorphicAction<TypeOfFoo>(foo);
500
- template <typename Impl>
501
- inline PolymorphicAction<Impl> MakePolymorphicAction(const Impl& impl) {
502
- return PolymorphicAction<Impl>(impl);
503
- }
504
-
505
- namespace internal {
506
-
507
- // Allows an Action<F2> object to pose as an Action<F1>, as long as F2
508
- // and F1 are compatible.
509
- template <typename F1, typename F2>
510
- class ActionAdaptor : public ActionInterface<F1> {
511
- public:
512
- typedef typename internal::Function<F1>::Result Result;
513
- typedef typename internal::Function<F1>::ArgumentTuple ArgumentTuple;
514
-
515
- explicit ActionAdaptor(const Action<F2>& from) : impl_(from.impl_) {}
516
-
517
- virtual Result Perform(const ArgumentTuple& args) {
518
- return impl_->Perform(args);
519
- }
520
-
521
- private:
522
- const internal::linked_ptr<ActionInterface<F2> > impl_;
523
-
524
- GTEST_DISALLOW_ASSIGN_(ActionAdaptor);
525
- };
526
-
527
- // Helper struct to specialize ReturnAction to execute a move instead of a copy
528
- // on return. Useful for move-only types, but could be used on any type.
529
- template <typename T>
530
- struct ByMoveWrapper {
531
- explicit ByMoveWrapper(T value) : payload(internal::move(value)) {}
532
- T payload;
533
- };
534
-
535
- // Implements the polymorphic Return(x) action, which can be used in
536
- // any function that returns the type of x, regardless of the argument
537
- // types.
538
- //
539
- // Note: The value passed into Return must be converted into
540
- // Function<F>::Result when this action is cast to Action<F> rather than
541
- // when that action is performed. This is important in scenarios like
542
- //
543
- // MOCK_METHOD1(Method, T(U));
544
- // ...
545
- // {
546
- // Foo foo;
547
- // X x(&foo);
548
- // EXPECT_CALL(mock, Method(_)).WillOnce(Return(x));
549
- // }
550
- //
551
- // In the example above the variable x holds reference to foo which leaves
552
- // scope and gets destroyed. If copying X just copies a reference to foo,
553
- // that copy will be left with a hanging reference. If conversion to T
554
- // makes a copy of foo, the above code is safe. To support that scenario, we
555
- // need to make sure that the type conversion happens inside the EXPECT_CALL
556
- // statement, and conversion of the result of Return to Action<T(U)> is a
557
- // good place for that.
558
- //
559
- // The real life example of the above scenario happens when an invocation
560
- // of gtl::Container() is passed into Return.
561
- //
562
- template <typename R>
563
- class ReturnAction {
564
- public:
565
- // Constructs a ReturnAction object from the value to be returned.
566
- // 'value' is passed by value instead of by const reference in order
567
- // to allow Return("string literal") to compile.
568
- explicit ReturnAction(R value) : value_(new R(internal::move(value))) {}
569
-
570
- // This template type conversion operator allows Return(x) to be
571
- // used in ANY function that returns x's type.
572
- template <typename F>
573
- operator Action<F>() const {
574
- // Assert statement belongs here because this is the best place to verify
575
- // conditions on F. It produces the clearest error messages
576
- // in most compilers.
577
- // Impl really belongs in this scope as a local class but can't
578
- // because MSVC produces duplicate symbols in different translation units
579
- // in this case. Until MS fixes that bug we put Impl into the class scope
580
- // and put the typedef both here (for use in assert statement) and
581
- // in the Impl class. But both definitions must be the same.
582
- typedef typename Function<F>::Result Result;
583
- GTEST_COMPILE_ASSERT_(
584
- !is_reference<Result>::value,
585
- use_ReturnRef_instead_of_Return_to_return_a_reference);
586
- return Action<F>(new Impl<R, F>(value_));
587
- }
588
-
589
- private:
590
- // Implements the Return(x) action for a particular function type F.
591
- template <typename R_, typename F>
592
- class Impl : public ActionInterface<F> {
593
- public:
594
- typedef typename Function<F>::Result Result;
595
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
596
-
597
- // The implicit cast is necessary when Result has more than one
598
- // single-argument constructor (e.g. Result is std::vector<int>) and R
599
- // has a type conversion operator template. In that case, value_(value)
600
- // won't compile as the compiler doesn't known which constructor of
601
- // Result to call. ImplicitCast_ forces the compiler to convert R to
602
- // Result without considering explicit constructors, thus resolving the
603
- // ambiguity. value_ is then initialized using its copy constructor.
604
- explicit Impl(const linked_ptr<R>& value)
605
- : value_before_cast_(*value),
606
- value_(ImplicitCast_<Result>(value_before_cast_)) {}
607
-
608
- virtual Result Perform(const ArgumentTuple&) { return value_; }
609
-
610
- private:
611
- GTEST_COMPILE_ASSERT_(!is_reference<Result>::value,
612
- Result_cannot_be_a_reference_type);
613
- // We save the value before casting just in case it is being cast to a
614
- // wrapper type.
615
- R value_before_cast_;
616
- Result value_;
617
-
618
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Impl);
619
- };
620
-
621
- // Partially specialize for ByMoveWrapper. This version of ReturnAction will
622
- // move its contents instead.
623
- template <typename R_, typename F>
624
- class Impl<ByMoveWrapper<R_>, F> : public ActionInterface<F> {
625
- public:
626
- typedef typename Function<F>::Result Result;
627
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
628
-
629
- explicit Impl(const linked_ptr<R>& wrapper)
630
- : performed_(false), wrapper_(wrapper) {}
631
-
632
- virtual Result Perform(const ArgumentTuple&) {
633
- GTEST_CHECK_(!performed_)
634
- << "A ByMove() action should only be performed once.";
635
- performed_ = true;
636
- return internal::move(wrapper_->payload);
637
- }
638
-
639
- private:
640
- bool performed_;
641
- const linked_ptr<R> wrapper_;
642
-
643
- GTEST_DISALLOW_ASSIGN_(Impl);
644
- };
645
-
646
- const linked_ptr<R> value_;
647
-
648
- GTEST_DISALLOW_ASSIGN_(ReturnAction);
649
- };
650
-
651
- // Implements the ReturnNull() action.
652
- class ReturnNullAction {
653
- public:
654
- // Allows ReturnNull() to be used in any pointer-returning function. In C++11
655
- // this is enforced by returning nullptr, and in non-C++11 by asserting a
656
- // pointer type on compile time.
657
- template <typename Result, typename ArgumentTuple>
658
- static Result Perform(const ArgumentTuple&) {
659
- #if GTEST_LANG_CXX11
660
- return nullptr;
661
- #else
662
- GTEST_COMPILE_ASSERT_(internal::is_pointer<Result>::value,
663
- ReturnNull_can_be_used_to_return_a_pointer_only);
664
- return NULL;
665
- #endif // GTEST_LANG_CXX11
666
- }
667
- };
668
-
669
- // Implements the Return() action.
670
- class ReturnVoidAction {
671
- public:
672
- // Allows Return() to be used in any void-returning function.
673
- template <typename Result, typename ArgumentTuple>
674
- static void Perform(const ArgumentTuple&) {
675
- CompileAssertTypesEqual<void, Result>();
676
- }
677
- };
678
-
679
- // Implements the polymorphic ReturnRef(x) action, which can be used
680
- // in any function that returns a reference to the type of x,
681
- // regardless of the argument types.
682
- template <typename T>
683
- class ReturnRefAction {
684
- public:
685
- // Constructs a ReturnRefAction object from the reference to be returned.
686
- explicit ReturnRefAction(T& ref) : ref_(ref) {} // NOLINT
687
-
688
- // This template type conversion operator allows ReturnRef(x) to be
689
- // used in ANY function that returns a reference to x's type.
690
- template <typename F>
691
- operator Action<F>() const {
692
- typedef typename Function<F>::Result Result;
693
- // Asserts that the function return type is a reference. This
694
- // catches the user error of using ReturnRef(x) when Return(x)
695
- // should be used, and generates some helpful error message.
696
- GTEST_COMPILE_ASSERT_(internal::is_reference<Result>::value,
697
- use_Return_instead_of_ReturnRef_to_return_a_value);
698
- return Action<F>(new Impl<F>(ref_));
699
- }
700
-
701
- private:
702
- // Implements the ReturnRef(x) action for a particular function type F.
703
- template <typename F>
704
- class Impl : public ActionInterface<F> {
705
- public:
706
- typedef typename Function<F>::Result Result;
707
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
708
-
709
- explicit Impl(T& ref) : ref_(ref) {} // NOLINT
710
-
711
- virtual Result Perform(const ArgumentTuple&) {
712
- return ref_;
713
- }
714
-
715
- private:
716
- T& ref_;
717
-
718
- GTEST_DISALLOW_ASSIGN_(Impl);
719
- };
720
-
721
- T& ref_;
722
-
723
- GTEST_DISALLOW_ASSIGN_(ReturnRefAction);
724
- };
725
-
726
- // Implements the polymorphic ReturnRefOfCopy(x) action, which can be
727
- // used in any function that returns a reference to the type of x,
728
- // regardless of the argument types.
729
- template <typename T>
730
- class ReturnRefOfCopyAction {
731
- public:
732
- // Constructs a ReturnRefOfCopyAction object from the reference to
733
- // be returned.
734
- explicit ReturnRefOfCopyAction(const T& value) : value_(value) {} // NOLINT
735
-
736
- // This template type conversion operator allows ReturnRefOfCopy(x) to be
737
- // used in ANY function that returns a reference to x's type.
738
- template <typename F>
739
- operator Action<F>() const {
740
- typedef typename Function<F>::Result Result;
741
- // Asserts that the function return type is a reference. This
742
- // catches the user error of using ReturnRefOfCopy(x) when Return(x)
743
- // should be used, and generates some helpful error message.
744
- GTEST_COMPILE_ASSERT_(
745
- internal::is_reference<Result>::value,
746
- use_Return_instead_of_ReturnRefOfCopy_to_return_a_value);
747
- return Action<F>(new Impl<F>(value_));
748
- }
749
-
750
- private:
751
- // Implements the ReturnRefOfCopy(x) action for a particular function type F.
752
- template <typename F>
753
- class Impl : public ActionInterface<F> {
754
- public:
755
- typedef typename Function<F>::Result Result;
756
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
757
-
758
- explicit Impl(const T& value) : value_(value) {} // NOLINT
759
-
760
- virtual Result Perform(const ArgumentTuple&) {
761
- return value_;
762
- }
763
-
764
- private:
765
- T value_;
766
-
767
- GTEST_DISALLOW_ASSIGN_(Impl);
768
- };
769
-
770
- const T value_;
771
-
772
- GTEST_DISALLOW_ASSIGN_(ReturnRefOfCopyAction);
773
- };
774
-
775
- // Implements the polymorphic DoDefault() action.
776
- class DoDefaultAction {
777
- public:
778
- // This template type conversion operator allows DoDefault() to be
779
- // used in any function.
780
- template <typename F>
781
- operator Action<F>() const { return Action<F>(); } // NOLINT
782
- };
783
-
784
- // Implements the Assign action to set a given pointer referent to a
785
- // particular value.
786
- template <typename T1, typename T2>
787
- class AssignAction {
788
- public:
789
- AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {}
790
-
791
- template <typename Result, typename ArgumentTuple>
792
- void Perform(const ArgumentTuple& /* args */) const {
793
- *ptr_ = value_;
794
- }
795
-
796
- private:
797
- T1* const ptr_;
798
- const T2 value_;
799
-
800
- GTEST_DISALLOW_ASSIGN_(AssignAction);
801
- };
802
-
803
- #if !GTEST_OS_WINDOWS_MOBILE
804
-
805
- // Implements the SetErrnoAndReturn action to simulate return from
806
- // various system calls and libc functions.
807
- template <typename T>
808
- class SetErrnoAndReturnAction {
809
- public:
810
- SetErrnoAndReturnAction(int errno_value, T result)
811
- : errno_(errno_value),
812
- result_(result) {}
813
- template <typename Result, typename ArgumentTuple>
814
- Result Perform(const ArgumentTuple& /* args */) const {
815
- errno = errno_;
816
- return result_;
817
- }
818
-
819
- private:
820
- const int errno_;
821
- const T result_;
822
-
823
- GTEST_DISALLOW_ASSIGN_(SetErrnoAndReturnAction);
824
- };
825
-
826
- #endif // !GTEST_OS_WINDOWS_MOBILE
827
-
828
- // Implements the SetArgumentPointee<N>(x) action for any function
829
- // whose N-th argument (0-based) is a pointer to x's type. The
830
- // template parameter kIsProto is true iff type A is ProtocolMessage,
831
- // proto2::Message, or a sub-class of those.
832
- template <size_t N, typename A, bool kIsProto>
833
- class SetArgumentPointeeAction {
834
- public:
835
- // Constructs an action that sets the variable pointed to by the
836
- // N-th function argument to 'value'.
837
- explicit SetArgumentPointeeAction(const A& value) : value_(value) {}
838
-
839
- template <typename Result, typename ArgumentTuple>
840
- void Perform(const ArgumentTuple& args) const {
841
- CompileAssertTypesEqual<void, Result>();
842
- *::testing::get<N>(args) = value_;
843
- }
844
-
845
- private:
846
- const A value_;
847
-
848
- GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction);
849
- };
850
-
851
- template <size_t N, typename Proto>
852
- class SetArgumentPointeeAction<N, Proto, true> {
853
- public:
854
- // Constructs an action that sets the variable pointed to by the
855
- // N-th function argument to 'proto'. Both ProtocolMessage and
856
- // proto2::Message have the CopyFrom() method, so the same
857
- // implementation works for both.
858
- explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) {
859
- proto_->CopyFrom(proto);
860
- }
861
-
862
- template <typename Result, typename ArgumentTuple>
863
- void Perform(const ArgumentTuple& args) const {
864
- CompileAssertTypesEqual<void, Result>();
865
- ::testing::get<N>(args)->CopyFrom(*proto_);
866
- }
867
-
868
- private:
869
- const internal::linked_ptr<Proto> proto_;
870
-
871
- GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction);
872
- };
873
-
874
- // Implements the InvokeWithoutArgs(f) action. The template argument
875
- // FunctionImpl is the implementation type of f, which can be either a
876
- // function pointer or a functor. InvokeWithoutArgs(f) can be used as an
877
- // Action<F> as long as f's type is compatible with F (i.e. f can be
878
- // assigned to a tr1::function<F>).
879
- template <typename FunctionImpl>
880
- class InvokeWithoutArgsAction {
881
- public:
882
- // The c'tor makes a copy of function_impl (either a function
883
- // pointer or a functor).
884
- explicit InvokeWithoutArgsAction(FunctionImpl function_impl)
885
- : function_impl_(function_impl) {}
886
-
887
- // Allows InvokeWithoutArgs(f) to be used as any action whose type is
888
- // compatible with f.
889
- template <typename Result, typename ArgumentTuple>
890
- Result Perform(const ArgumentTuple&) { return function_impl_(); }
891
-
892
- private:
893
- FunctionImpl function_impl_;
894
-
895
- GTEST_DISALLOW_ASSIGN_(InvokeWithoutArgsAction);
896
- };
897
-
898
- // Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action.
899
- template <class Class, typename MethodPtr>
900
- class InvokeMethodWithoutArgsAction {
901
- public:
902
- InvokeMethodWithoutArgsAction(Class* obj_ptr, MethodPtr method_ptr)
903
- : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {}
904
-
905
- template <typename Result, typename ArgumentTuple>
906
- Result Perform(const ArgumentTuple&) const {
907
- return (obj_ptr_->*method_ptr_)();
908
- }
909
-
910
- private:
911
- Class* const obj_ptr_;
912
- const MethodPtr method_ptr_;
913
-
914
- GTEST_DISALLOW_ASSIGN_(InvokeMethodWithoutArgsAction);
915
- };
916
-
917
- // Implements the InvokeWithoutArgs(callback) action.
918
- template <typename CallbackType>
919
- class InvokeCallbackWithoutArgsAction {
920
- public:
921
- // The c'tor takes ownership of the callback.
922
- explicit InvokeCallbackWithoutArgsAction(CallbackType* callback)
923
- : callback_(callback) {
924
- callback->CheckIsRepeatable(); // Makes sure the callback is permanent.
925
- }
926
-
927
- // This type conversion operator template allows Invoke(callback) to
928
- // be used wherever the callback's return type can be implicitly
929
- // converted to that of the mock function.
930
- template <typename Result, typename ArgumentTuple>
931
- Result Perform(const ArgumentTuple&) const { return callback_->Run(); }
932
-
933
- private:
934
- const internal::linked_ptr<CallbackType> callback_;
935
-
936
- GTEST_DISALLOW_ASSIGN_(InvokeCallbackWithoutArgsAction);
937
- };
938
-
939
- // Implements the IgnoreResult(action) action.
940
- template <typename A>
941
- class IgnoreResultAction {
942
- public:
943
- explicit IgnoreResultAction(const A& action) : action_(action) {}
944
-
945
- template <typename F>
946
- operator Action<F>() const {
947
- // Assert statement belongs here because this is the best place to verify
948
- // conditions on F. It produces the clearest error messages
949
- // in most compilers.
950
- // Impl really belongs in this scope as a local class but can't
951
- // because MSVC produces duplicate symbols in different translation units
952
- // in this case. Until MS fixes that bug we put Impl into the class scope
953
- // and put the typedef both here (for use in assert statement) and
954
- // in the Impl class. But both definitions must be the same.
955
- typedef typename internal::Function<F>::Result Result;
956
-
957
- // Asserts at compile time that F returns void.
958
- CompileAssertTypesEqual<void, Result>();
959
-
960
- return Action<F>(new Impl<F>(action_));
961
- }
962
-
963
- private:
964
- template <typename F>
965
- class Impl : public ActionInterface<F> {
966
- public:
967
- typedef typename internal::Function<F>::Result Result;
968
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
969
-
970
- explicit Impl(const A& action) : action_(action) {}
971
-
972
- virtual void Perform(const ArgumentTuple& args) {
973
- // Performs the action and ignores its result.
974
- action_.Perform(args);
975
- }
976
-
977
- private:
978
- // Type OriginalFunction is the same as F except that its return
979
- // type is IgnoredValue.
980
- typedef typename internal::Function<F>::MakeResultIgnoredValue
981
- OriginalFunction;
982
-
983
- const Action<OriginalFunction> action_;
984
-
985
- GTEST_DISALLOW_ASSIGN_(Impl);
986
- };
987
-
988
- const A action_;
989
-
990
- GTEST_DISALLOW_ASSIGN_(IgnoreResultAction);
991
- };
992
-
993
- // A ReferenceWrapper<T> object represents a reference to type T,
994
- // which can be either const or not. It can be explicitly converted
995
- // from, and implicitly converted to, a T&. Unlike a reference,
996
- // ReferenceWrapper<T> can be copied and can survive template type
997
- // inference. This is used to support by-reference arguments in the
998
- // InvokeArgument<N>(...) action. The idea was from "reference
999
- // wrappers" in tr1, which we don't have in our source tree yet.
1000
- template <typename T>
1001
- class ReferenceWrapper {
1002
- public:
1003
- // Constructs a ReferenceWrapper<T> object from a T&.
1004
- explicit ReferenceWrapper(T& l_value) : pointer_(&l_value) {} // NOLINT
1005
-
1006
- // Allows a ReferenceWrapper<T> object to be implicitly converted to
1007
- // a T&.
1008
- operator T&() const { return *pointer_; }
1009
- private:
1010
- T* pointer_;
1011
- };
1012
-
1013
- // Allows the expression ByRef(x) to be printed as a reference to x.
1014
- template <typename T>
1015
- void PrintTo(const ReferenceWrapper<T>& ref, ::std::ostream* os) {
1016
- T& value = ref;
1017
- UniversalPrinter<T&>::Print(value, os);
1018
- }
1019
-
1020
- // Does two actions sequentially. Used for implementing the DoAll(a1,
1021
- // a2, ...) action.
1022
- template <typename Action1, typename Action2>
1023
- class DoBothAction {
1024
- public:
1025
- DoBothAction(Action1 action1, Action2 action2)
1026
- : action1_(action1), action2_(action2) {}
1027
-
1028
- // This template type conversion operator allows DoAll(a1, ..., a_n)
1029
- // to be used in ANY function of compatible type.
1030
- template <typename F>
1031
- operator Action<F>() const {
1032
- return Action<F>(new Impl<F>(action1_, action2_));
1033
- }
1034
-
1035
- private:
1036
- // Implements the DoAll(...) action for a particular function type F.
1037
- template <typename F>
1038
- class Impl : public ActionInterface<F> {
1039
- public:
1040
- typedef typename Function<F>::Result Result;
1041
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
1042
- typedef typename Function<F>::MakeResultVoid VoidResult;
1043
-
1044
- Impl(const Action<VoidResult>& action1, const Action<F>& action2)
1045
- : action1_(action1), action2_(action2) {}
1046
-
1047
- virtual Result Perform(const ArgumentTuple& args) {
1048
- action1_.Perform(args);
1049
- return action2_.Perform(args);
1050
- }
1051
-
1052
- private:
1053
- const Action<VoidResult> action1_;
1054
- const Action<F> action2_;
1055
-
1056
- GTEST_DISALLOW_ASSIGN_(Impl);
1057
- };
1058
-
1059
- Action1 action1_;
1060
- Action2 action2_;
1061
-
1062
- GTEST_DISALLOW_ASSIGN_(DoBothAction);
1063
- };
1064
-
1065
- } // namespace internal
1066
-
1067
- // An Unused object can be implicitly constructed from ANY value.
1068
- // This is handy when defining actions that ignore some or all of the
1069
- // mock function arguments. For example, given
1070
- //
1071
- // MOCK_METHOD3(Foo, double(const string& label, double x, double y));
1072
- // MOCK_METHOD3(Bar, double(int index, double x, double y));
1073
- //
1074
- // instead of
1075
- //
1076
- // double DistanceToOriginWithLabel(const string& label, double x, double y) {
1077
- // return sqrt(x*x + y*y);
1078
- // }
1079
- // double DistanceToOriginWithIndex(int index, double x, double y) {
1080
- // return sqrt(x*x + y*y);
1081
- // }
1082
- // ...
1083
- // EXPECT_CALL(mock, Foo("abc", _, _))
1084
- // .WillOnce(Invoke(DistanceToOriginWithLabel));
1085
- // EXPECT_CALL(mock, Bar(5, _, _))
1086
- // .WillOnce(Invoke(DistanceToOriginWithIndex));
1087
- //
1088
- // you could write
1089
- //
1090
- // // We can declare any uninteresting argument as Unused.
1091
- // double DistanceToOrigin(Unused, double x, double y) {
1092
- // return sqrt(x*x + y*y);
1093
- // }
1094
- // ...
1095
- // EXPECT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin));
1096
- // EXPECT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin));
1097
- typedef internal::IgnoredValue Unused;
1098
-
1099
- // This constructor allows us to turn an Action<From> object into an
1100
- // Action<To>, as long as To's arguments can be implicitly converted
1101
- // to From's and From's return type cann be implicitly converted to
1102
- // To's.
1103
- template <typename To>
1104
- template <typename From>
1105
- Action<To>::Action(const Action<From>& from)
1106
- :
1107
- #if GTEST_LANG_CXX11
1108
- fun_(from.fun_),
1109
- #endif
1110
- impl_(from.impl_ == NULL ? NULL
1111
- : new internal::ActionAdaptor<To, From>(from)) {
1112
- }
1113
-
1114
- // Creates an action that returns 'value'. 'value' is passed by value
1115
- // instead of const reference - otherwise Return("string literal")
1116
- // will trigger a compiler error about using array as initializer.
1117
- template <typename R>
1118
- internal::ReturnAction<R> Return(R value) {
1119
- return internal::ReturnAction<R>(internal::move(value));
1120
- }
1121
-
1122
- // Creates an action that returns NULL.
1123
- inline PolymorphicAction<internal::ReturnNullAction> ReturnNull() {
1124
- return MakePolymorphicAction(internal::ReturnNullAction());
1125
- }
1126
-
1127
- // Creates an action that returns from a void function.
1128
- inline PolymorphicAction<internal::ReturnVoidAction> Return() {
1129
- return MakePolymorphicAction(internal::ReturnVoidAction());
1130
- }
1131
-
1132
- // Creates an action that returns the reference to a variable.
1133
- template <typename R>
1134
- inline internal::ReturnRefAction<R> ReturnRef(R& x) { // NOLINT
1135
- return internal::ReturnRefAction<R>(x);
1136
- }
1137
-
1138
- // Creates an action that returns the reference to a copy of the
1139
- // argument. The copy is created when the action is constructed and
1140
- // lives as long as the action.
1141
- template <typename R>
1142
- inline internal::ReturnRefOfCopyAction<R> ReturnRefOfCopy(const R& x) {
1143
- return internal::ReturnRefOfCopyAction<R>(x);
1144
- }
1145
-
1146
- // Modifies the parent action (a Return() action) to perform a move of the
1147
- // argument instead of a copy.
1148
- // Return(ByMove()) actions can only be executed once and will assert this
1149
- // invariant.
1150
- template <typename R>
1151
- internal::ByMoveWrapper<R> ByMove(R x) {
1152
- return internal::ByMoveWrapper<R>(internal::move(x));
1153
- }
1154
-
1155
- // Creates an action that does the default action for the give mock function.
1156
- inline internal::DoDefaultAction DoDefault() {
1157
- return internal::DoDefaultAction();
1158
- }
1159
-
1160
- // Creates an action that sets the variable pointed by the N-th
1161
- // (0-based) function argument to 'value'.
1162
- template <size_t N, typename T>
1163
- PolymorphicAction<
1164
- internal::SetArgumentPointeeAction<
1165
- N, T, internal::IsAProtocolMessage<T>::value> >
1166
- SetArgPointee(const T& x) {
1167
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
1168
- N, T, internal::IsAProtocolMessage<T>::value>(x));
1169
- }
1170
-
1171
- #if !((GTEST_GCC_VER_ && GTEST_GCC_VER_ < 40000) || GTEST_OS_SYMBIAN)
1172
- // This overload allows SetArgPointee() to accept a string literal.
1173
- // GCC prior to the version 4.0 and Symbian C++ compiler cannot distinguish
1174
- // this overload from the templated version and emit a compile error.
1175
- template <size_t N>
1176
- PolymorphicAction<
1177
- internal::SetArgumentPointeeAction<N, const char*, false> >
1178
- SetArgPointee(const char* p) {
1179
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
1180
- N, const char*, false>(p));
1181
- }
1182
-
1183
- template <size_t N>
1184
- PolymorphicAction<
1185
- internal::SetArgumentPointeeAction<N, const wchar_t*, false> >
1186
- SetArgPointee(const wchar_t* p) {
1187
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
1188
- N, const wchar_t*, false>(p));
1189
- }
1190
- #endif
1191
-
1192
- // The following version is DEPRECATED.
1193
- template <size_t N, typename T>
1194
- PolymorphicAction<
1195
- internal::SetArgumentPointeeAction<
1196
- N, T, internal::IsAProtocolMessage<T>::value> >
1197
- SetArgumentPointee(const T& x) {
1198
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
1199
- N, T, internal::IsAProtocolMessage<T>::value>(x));
1200
- }
1201
-
1202
- // Creates an action that sets a pointer referent to a given value.
1203
- template <typename T1, typename T2>
1204
- PolymorphicAction<internal::AssignAction<T1, T2> > Assign(T1* ptr, T2 val) {
1205
- return MakePolymorphicAction(internal::AssignAction<T1, T2>(ptr, val));
1206
- }
1207
-
1208
- #if !GTEST_OS_WINDOWS_MOBILE
1209
-
1210
- // Creates an action that sets errno and returns the appropriate error.
1211
- template <typename T>
1212
- PolymorphicAction<internal::SetErrnoAndReturnAction<T> >
1213
- SetErrnoAndReturn(int errval, T result) {
1214
- return MakePolymorphicAction(
1215
- internal::SetErrnoAndReturnAction<T>(errval, result));
1216
- }
1217
-
1218
- #endif // !GTEST_OS_WINDOWS_MOBILE
1219
-
1220
- // Various overloads for InvokeWithoutArgs().
1221
-
1222
- // Creates an action that invokes 'function_impl' with no argument.
1223
- template <typename FunctionImpl>
1224
- PolymorphicAction<internal::InvokeWithoutArgsAction<FunctionImpl> >
1225
- InvokeWithoutArgs(FunctionImpl function_impl) {
1226
- return MakePolymorphicAction(
1227
- internal::InvokeWithoutArgsAction<FunctionImpl>(function_impl));
1228
- }
1229
-
1230
- // Creates an action that invokes the given method on the given object
1231
- // with no argument.
1232
- template <class Class, typename MethodPtr>
1233
- PolymorphicAction<internal::InvokeMethodWithoutArgsAction<Class, MethodPtr> >
1234
- InvokeWithoutArgs(Class* obj_ptr, MethodPtr method_ptr) {
1235
- return MakePolymorphicAction(
1236
- internal::InvokeMethodWithoutArgsAction<Class, MethodPtr>(
1237
- obj_ptr, method_ptr));
1238
- }
1239
-
1240
- // Creates an action that performs an_action and throws away its
1241
- // result. In other words, it changes the return type of an_action to
1242
- // void. an_action MUST NOT return void, or the code won't compile.
1243
- template <typename A>
1244
- inline internal::IgnoreResultAction<A> IgnoreResult(const A& an_action) {
1245
- return internal::IgnoreResultAction<A>(an_action);
1246
- }
1247
-
1248
- // Creates a reference wrapper for the given L-value. If necessary,
1249
- // you can explicitly specify the type of the reference. For example,
1250
- // suppose 'derived' is an object of type Derived, ByRef(derived)
1251
- // would wrap a Derived&. If you want to wrap a const Base& instead,
1252
- // where Base is a base class of Derived, just write:
1253
- //
1254
- // ByRef<const Base>(derived)
1255
- template <typename T>
1256
- inline internal::ReferenceWrapper<T> ByRef(T& l_value) { // NOLINT
1257
- return internal::ReferenceWrapper<T>(l_value);
1258
- }
1259
-
1260
- } // namespace testing
1261
-
1262
- #endif // GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_