@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
package/src/test.cpp DELETED
@@ -1,940 +0,0 @@
1
- // copyright defined in abieos/LICENSE.txt
2
-
3
- #include "abieos.h"
4
- #include "abieos.hpp"
5
- #include "fuzzer.hpp"
6
- #include <stdexcept>
7
- #include <stdio.h>
8
- #include <string>
9
- #include <vector>
10
-
11
- inline const bool generate_corpus = false;
12
-
13
- const char tokenHexAbi[] = "0e656f73696f3a3a6162692f312e30010c6163636f756e745f6e616d65046e61"
14
- "6d6505087472616e7366657200040466726f6d0c6163636f756e745f6e616d65"
15
- "02746f0c6163636f756e745f6e616d65087175616e7469747905617373657404"
16
- "6d656d6f06737472696e67066372656174650002066973737565720c6163636f"
17
- "756e745f6e616d650e6d6178696d756d5f737570706c79056173736574056973"
18
- "737565000302746f0c6163636f756e745f6e616d65087175616e746974790561"
19
- "73736574046d656d6f06737472696e67076163636f756e7400010762616c616e"
20
- "63650561737365740e63757272656e63795f7374617473000306737570706c79"
21
- "0561737365740a6d61785f737570706c79056173736574066973737565720c61"
22
- "63636f756e745f6e616d6503000000572d3ccdcd087472616e73666572000000"
23
- "000000a531760569737375650000000000a86cd4450663726561746500020000"
24
- "00384f4d113203693634010863757272656e6379010675696e74363407616363"
25
- "6f756e740000000000904dc603693634010863757272656e6379010675696e74"
26
- "36340e63757272656e63795f7374617473000000";
27
-
28
- const char testHexAbi[] = "0E656F73696F3A3A6162692F312E310004027331000102783104696E74380273"
29
- "32000202793105696E74382402793205696E7438240273330003027A3105696E"
30
- "743824027A3203763124027A3303733224027334000202613106696E74383F24"
31
- "02623107696E74385B5D240000000000010276310304696E7438027331027332";
32
-
33
- const char testAbi[] = R"({
34
- "version": "eosio::abi/1.1",
35
- "structs": [
36
- {
37
- "name": "s1",
38
- "fields": [
39
- {
40
- "name": "x1",
41
- "type": "int8"
42
- }
43
- ]
44
- },
45
- {
46
- "name": "s2",
47
- "fields": [
48
- {
49
- "name": "y1",
50
- "type": "int8$"
51
- },
52
- {
53
- "name": "y2",
54
- "type": "int8$"
55
- }
56
- ]
57
- },
58
- {
59
- "name": "s3",
60
- "fields": [
61
- {
62
- "name": "z1",
63
- "type": "int8$"
64
- },
65
- {
66
- "name": "z2",
67
- "type": "v1$"
68
- },
69
- {
70
- "name": "z3",
71
- "type": "s2$"
72
- }
73
- ]
74
- },
75
- {
76
- "name": "s4",
77
- "fields": [
78
- {
79
- "name": "a1",
80
- "type": "int8?$"
81
- },
82
- {
83
- "name": "b1",
84
- "type": "int8[]$"
85
- }
86
- ]
87
- },
88
- {
89
- "name": "s5",
90
- "fields": [
91
- {
92
- "name": "x1",
93
- "type": "int8"
94
- },
95
- {
96
- "name": "x2",
97
- "type": "int8"
98
- },
99
- {
100
- "name": "x3",
101
- "type": "s6"
102
- }
103
- ]
104
- },
105
- {
106
- "name": "s6",
107
- "fields": [
108
- {
109
- "name": "c1",
110
- "type": "int8"
111
- },
112
- {
113
- "name": "c2",
114
- "type": "s5[]"
115
- },
116
- {
117
- "name": "c3",
118
- "type": "int8"
119
- }
120
- ]
121
- }
122
- ],
123
- "variants": [
124
- {
125
- "name": "v1",
126
- "types": ["int8","s1","s2"]
127
- }
128
- ]
129
- })";
130
-
131
- const char transactionAbi[] = R"({
132
- "version": "eosio::abi/1.0",
133
- "types": [
134
- {
135
- "new_type_name": "account_name",
136
- "type": "name"
137
- },
138
- {
139
- "new_type_name": "action_name",
140
- "type": "name"
141
- },
142
- {
143
- "new_type_name": "permission_name",
144
- "type": "name"
145
- }
146
- ],
147
- "structs": [
148
- {
149
- "name": "permission_level",
150
- "base": "",
151
- "fields": [
152
- {
153
- "name": "actor",
154
- "type": "account_name"
155
- },
156
- {
157
- "name": "permission",
158
- "type": "permission_name"
159
- }
160
- ]
161
- },
162
- {
163
- "name": "action",
164
- "base": "",
165
- "fields": [
166
- {
167
- "name": "account",
168
- "type": "account_name"
169
- },
170
- {
171
- "name": "name",
172
- "type": "action_name"
173
- },
174
- {
175
- "name": "authorization",
176
- "type": "permission_level[]"
177
- },
178
- {
179
- "name": "data",
180
- "type": "bytes"
181
- }
182
- ]
183
- },
184
- {
185
- "name": "extension",
186
- "base": "",
187
- "fields": [
188
- {
189
- "name": "type",
190
- "type": "uint16"
191
- },
192
- {
193
- "name": "data",
194
- "type": "bytes"
195
- }
196
- ]
197
- },
198
- {
199
- "name": "transaction_header",
200
- "base": "",
201
- "fields": [
202
- {
203
- "name": "expiration",
204
- "type": "time_point_sec"
205
- },
206
- {
207
- "name": "ref_block_num",
208
- "type": "uint16"
209
- },
210
- {
211
- "name": "ref_block_prefix",
212
- "type": "uint32"
213
- },
214
- {
215
- "name": "max_net_usage_words",
216
- "type": "varuint32"
217
- },
218
- {
219
- "name": "max_cpu_usage_ms",
220
- "type": "uint8"
221
- },
222
- {
223
- "name": "delay_sec",
224
- "type": "varuint32"
225
- }
226
- ]
227
- },
228
- {
229
- "name": "transaction",
230
- "base": "transaction_header",
231
- "fields": [
232
- {
233
- "name": "context_free_actions",
234
- "type": "action[]"
235
- },
236
- {
237
- "name": "actions",
238
- "type": "action[]"
239
- },
240
- {
241
- "name": "transaction_extensions",
242
- "type": "extension[]"
243
- }
244
- ]
245
- }
246
- ]
247
- })";
248
-
249
- std::string string_to_hex(const std::string& s) {
250
- std::string result;
251
- uint8_t size = s.size();
252
- abieos::hex(&size, &size + 1, std::back_inserter(result));
253
- abieos::hex(s.begin(), s.end(), std::back_inserter(result));
254
- return result;
255
- }
256
-
257
- template <typename T>
258
- T check(T value, const char* msg = "") {
259
- if (!value)
260
- throw std::runtime_error(std::string{msg} + " failed");
261
- return value;
262
- }
263
-
264
- template <typename T>
265
- T check_context(abieos_context* context, T value) {
266
- if (!value)
267
- throw std::runtime_error(abieos_get_error(context));
268
- return value;
269
- }
270
-
271
- void run_check_type(abieos_context* context, uint64_t contract, const char* type, const char* data,
272
- const char* expected = nullptr, bool check_ordered = true) {
273
- if (!expected)
274
- expected = data;
275
- // printf("%s %s\n", type, data);
276
- check_context(context, abieos_json_to_bin_reorderable(context, contract, type, data));
277
- std::string reorderable_hex = check_context(context, abieos_get_bin_hex(context));
278
- if (check_ordered) {
279
- check_context(context, abieos_json_to_bin(context, contract, type, data));
280
- std::string ordered_hex = check_context(context, abieos_get_bin_hex(context));
281
- if (reorderable_hex != ordered_hex)
282
- throw std::runtime_error("mismatch between reorderable_hex, ordered_hex");
283
- }
284
- // printf("%s\n", reorderable_hex.c_str());
285
- std::string result = check_context(context, abieos_hex_to_json(context, contract, type, reorderable_hex.c_str()));
286
- // printf("%s\n", result.c_str());
287
- printf("%s %s %s %s\n", type, data, reorderable_hex.c_str(), result.c_str());
288
- if (result != expected)
289
- throw std::runtime_error("mismatch");
290
- }
291
-
292
- template <typename F>
293
- void check_except(const std::string& s, F f) {
294
- bool ok = false;
295
- try {
296
- f();
297
- } catch (std::exception& e) {
298
- if (e.what() == s || true) // !!! Don't check the message right now. It's in flux.
299
- ok = true;
300
- else
301
- throw std::runtime_error("expected exception: " + s + " got: " + e.what());
302
- }
303
- if (!ok)
304
- throw std::runtime_error("expected exception: " + s);
305
- }
306
-
307
- template <typename F>
308
- void check_error(abieos_context* context, const std::string& s, F f) {
309
- check_except(s, [&] { check_context(context, f()); });
310
- }
311
-
312
- void check_types() {
313
- auto context = check(abieos_create());
314
- auto token = check_context(context, abieos_string_to_name(context, "eosio.token"));
315
- auto testAbiName = check_context(context, abieos_string_to_name(context, "test.abi"));
316
- auto testHexAbiName = check_context(context, abieos_string_to_name(context, "test.hex"));
317
- check_context(context, abieos_set_abi(context, 0, transactionAbi));
318
- check_context(context, abieos_set_abi_hex(context, token, tokenHexAbi));
319
- check_context(context, abieos_set_abi(context, testAbiName, testAbi));
320
- check_context(context, abieos_set_abi_hex(context, testHexAbiName, testHexAbi));
321
-
322
- int next_id = 0;
323
- auto write_corpus = [&](bool abi_is_bin, uint8_t operation, uint64_t contract, eosio::input_stream abi,
324
- eosio::input_stream type, eosio::input_stream data) {
325
- fuzzer_header header;
326
- header.abi_is_bin = abi_is_bin;
327
- header.operation = operation;
328
- header.contract = contract;
329
- header.abi_size = abi.end - abi.pos;
330
- header.type_size = type.end - type.pos;
331
-
332
- std::vector<char> v;
333
- v.insert(v.end(), (const char*)(&header), (const char*)(&header + 1));
334
- v.insert(v.end(), abi.pos, abi.end);
335
- v.insert(v.end(), type.pos, type.end);
336
- v.insert(v.end(), data.pos, data.end);
337
-
338
- auto f = fopen(("corpus/" + std::to_string(next_id++)).c_str(), "wb");
339
- if (!f)
340
- return;
341
- fwrite(v.data(), v.size(), 1, f);
342
- fclose(f);
343
- };
344
-
345
- auto check_type = [&](abieos_context* context, uint64_t contract, const char* type, const char* data,
346
- const char* expected = nullptr, bool check_ordered = true) {
347
- if (!generate_corpus)
348
- return run_check_type(context, contract, type, data, expected, check_ordered);
349
-
350
- bool abi_is_bin;
351
- std::vector<char> abi;
352
- if (contract == 0) {
353
- abi_is_bin = false;
354
- abi = {transactionAbi, transactionAbi + strlen(transactionAbi)};
355
- } else if (contract == token) {
356
- abi_is_bin = true;
357
- std::string error;
358
- if (!abieos::unhex(error, tokenHexAbi, tokenHexAbi + strlen(tokenHexAbi), std::back_inserter(abi)))
359
- throw std::runtime_error(error);
360
- } else if (contract == testAbiName) {
361
- abi_is_bin = false;
362
- abi = {testAbi, testAbi + strlen(testAbi)};
363
- } else if (contract == testHexAbiName) {
364
- abi_is_bin = true;
365
- std::string error;
366
- if (!abieos::unhex(error, testHexAbi, testHexAbi + strlen(testHexAbi), std::back_inserter(abi)))
367
- throw std::runtime_error(error);
368
- } else {
369
- throw std::runtime_error("missing case in check_type");
370
- }
371
- abi.push_back(0);
372
-
373
- write_corpus(abi_is_bin, fuzzer_json_to_bin, contract, {abi.data(), abi.data() + abi.size()},
374
- {type, type + strlen(type) + 1}, {data, data + strlen(data) + 1});
375
-
376
- check_context(context, abieos_json_to_bin_reorderable(context, contract, type, data));
377
- std::string hex = check_context(context, abieos_get_bin_hex(context));
378
-
379
- write_corpus(abi_is_bin, fuzzer_hex_to_json, contract, {abi.data(), abi.data() + abi.size()},
380
- {type, type + strlen(type) + 1}, {hex.c_str(), hex.c_str() + hex.size() + 1});
381
- };
382
-
383
- check_error(context, "no data", [&] { return abieos_set_abi_hex(context, 8, ""); });
384
- check_error(context, "unsupported abi version", [&] { return abieos_set_abi_hex(context, 8, "00"); });
385
- check_error(context, "unsupported abi version",
386
- [&] { return abieos_set_abi_hex(context, 8, string_to_hex("eosio::abi/9.0").c_str()); });
387
- check_error(context, "Stream overrun",
388
- [&] { return abieos_set_abi_hex(context, 8, string_to_hex("eosio::abi/1.0").c_str()); });
389
- check_error(context, "Stream overrun",
390
- [&] { return abieos_set_abi_hex(context, 8, string_to_hex("eosio::abi/1.1").c_str()); });
391
-
392
- check_error(context, "unsupported abi version",
393
- [&] { return abieos_set_abi(context, 8, R"({"version":"eosio::abi/9.0"})"); });
394
- abieos_set_abi(context, 8, R"({"version":"eosio::abi/1.0"})");
395
- abieos_set_abi(context, 8, R"({"version":"eosio::abi/1.1"})");
396
-
397
- check_type(context, 0, "bool", R"(true)");
398
- check_type(context, 0, "bool", R"(false)");
399
- check_error(context, "Stream overrun", [&] { return abieos_hex_to_json(context, 0, "bool", ""); });
400
- // !!!
401
- check_error(context, "The document root must not follow by other values", [&] { return abieos_json_to_bin(context, 0, "bool", R"(trues)"); });
402
- check_error(context, "Expected number or boolean",
403
- [&] { return abieos_json_to_bin(context, 0, "bool", R"(null)"); });
404
- check_error(context, "Expected positive integer", [&] { return abieos_json_to_bin(context, 0, "bool", R"("foo")"); });
405
- check_type(context, 0, "int8", R"(0)");
406
- check_type(context, 0, "int8", R"(127)");
407
- check_type(context, 0, "int8", R"(-128)");
408
- check_type(context, 0, "uint8", R"(0)");
409
- check_type(context, 0, "uint8", R"(1)");
410
- check_type(context, 0, "uint8", R"(254)");
411
- check_type(context, 0, "uint8", R"(255)");
412
- check_error(context, "number is out of range", [&] { return abieos_json_to_bin(context, 0, "int8", "128"); });
413
- check_error(context, "number is out of range", [&] { return abieos_json_to_bin(context, 0, "int8", "-129"); });
414
- check_error(context, "expected non-negative number", [&] { return abieos_json_to_bin(context, 0, "uint8", "-1"); });
415
- check_error(context, "number is out of range", [&] { return abieos_json_to_bin(context, 0, "uint8", "256"); });
416
- check_type(context, 0, "uint8[]", R"([])");
417
- check_type(context, 0, "uint8[]", R"([10])");
418
- check_type(context, 0, "uint8[]", R"([10,9])");
419
- check_type(context, 0, "uint8[]", R"([10,9,8])");
420
- check_type(context, 0, "int16", R"(0)");
421
- check_type(context, 0, "int16", R"(32767)");
422
- check_type(context, 0, "int16", R"(-32768)");
423
- check_error(context, "Stream overrun", [&] { return abieos_hex_to_json(context, 0, "int16", "01"); });
424
- check_type(context, 0, "uint16", R"(0)");
425
- check_type(context, 0, "uint16", R"(65535)");
426
- check_error(context, "number is out of range", [&] { return abieos_json_to_bin(context, 0, "int16", "32768"); });
427
- check_error(context, "number is out of range", [&] { return abieos_json_to_bin(context, 0, "int16", "-32769"); });
428
- check_error(context, "expected non-negative number",
429
- [&] { return abieos_json_to_bin(context, 0, "uint16", "-1"); });
430
- check_error(context, "number is out of range", [&] { return abieos_json_to_bin(context, 0, "uint16", "655356"); });
431
- check_type(context, 0, "int32", R"(0)");
432
- check_type(context, 0, "int32", R"(2147483647)");
433
- check_type(context, 0, "int32", R"(-2147483648)");
434
- check_type(context, 0, "uint32", R"(0)");
435
- check_type(context, 0, "uint32", R"(4294967295)");
436
- check_error(context, "number is out of range",
437
- [&] { return abieos_json_to_bin(context, 0, "int32", "2147483648"); });
438
- check_error(context, "number is out of range",
439
- [&] { return abieos_json_to_bin(context, 0, "int32", "-2147483649"); });
440
- check_error(context, "expected non-negative number",
441
- [&] { return abieos_json_to_bin(context, 0, "uint32", "-1"); });
442
- check_error(context, "number is out of range",
443
- [&] { return abieos_json_to_bin(context, 0, "uint32", "4294967296"); });
444
- check_type(context, 0, "int64", R"(0)", R"("0")");
445
- check_type(context, 0, "int64", R"(1)", R"("1")");
446
- check_type(context, 0, "int64", R"(-1)", R"("-1")");
447
- check_type(context, 0, "int64", R"("0")");
448
- check_type(context, 0, "int64", R"("9223372036854775807")");
449
- check_type(context, 0, "int64", R"("-9223372036854775808")");
450
- check_type(context, 0, "uint64", R"("0")");
451
- check_type(context, 0, "uint64", R"("18446744073709551615")");
452
- check_error(context, "number is out of range",
453
- [&] { return abieos_json_to_bin(context, 0, "int64", "9223372036854775808"); });
454
- check_error(context, "number is out of range",
455
- [&] { return abieos_json_to_bin(context, 0, "int64", "-9223372036854775809"); });
456
- check_error(context, "expected non-negative number",
457
- [&] { return abieos_json_to_bin(context, 0, "uint64", "-1"); });
458
- check_error(context, "number is out of range",
459
- [&] { return abieos_json_to_bin(context, 0, "uint64", "18446744073709551616"); });
460
- check_type(context, 0, "int128", R"("0")");
461
- check_type(context, 0, "int128", R"("1")");
462
- check_type(context, 0, "int128", R"("-1")");
463
- check_type(context, 0, "int128", R"("18446744073709551615")");
464
- check_type(context, 0, "int128", R"("-18446744073709551615")");
465
- check_type(context, 0, "int128", R"("170141183460469231731687303715884105727")");
466
- check_type(context, 0, "int128", R"("-170141183460469231731687303715884105727")");
467
- check_type(context, 0, "int128", R"("-170141183460469231731687303715884105728")");
468
- check_type(context, 0, "uint128", R"("0")");
469
- check_type(context, 0, "uint128", R"("1")");
470
- check_type(context, 0, "uint128", R"("18446744073709551615")");
471
- check_type(context, 0, "uint128", R"("340282366920938463463374607431768211454")");
472
- check_type(context, 0, "uint128", R"("340282366920938463463374607431768211455")");
473
- check_error(context, "number is out of range",
474
- [&] { return abieos_json_to_bin(context, 0, "int128", "170141183460469231731687303715884105728"); });
475
- check_error(context, "number is out of range",
476
- [&] { return abieos_json_to_bin(context, 0, "int128", "-170141183460469231731687303715884105729"); });
477
- check_error(context, "expected string containing int128",
478
- [&] { return abieos_json_to_bin(context, 0, "int128", "true"); });
479
- check_error(context, "invalid number", [&] { return abieos_json_to_bin(context, 0, "uint128", "-1"); });
480
- check_error(context, "number is out of range",
481
- [&] { return abieos_json_to_bin(context, 0, "uint128", "340282366920938463463374607431768211456"); });
482
- check_error(context, "expected string containing uint128",
483
- [&] { return abieos_json_to_bin(context, 0, "uint128", "true"); });
484
- check_type(context, 0, "varuint32", R"(0)");
485
- check_type(context, 0, "varuint32", R"(127)");
486
- check_type(context, 0, "varuint32", R"(128)");
487
- check_type(context, 0, "varuint32", R"(129)");
488
- check_type(context, 0, "varuint32", R"(16383)");
489
- check_type(context, 0, "varuint32", R"(16384)");
490
- check_type(context, 0, "varuint32", R"(16385)");
491
- check_type(context, 0, "varuint32", R"(2097151)");
492
- check_type(context, 0, "varuint32", R"(2097152)");
493
- check_type(context, 0, "varuint32", R"(2097153)");
494
- check_type(context, 0, "varuint32", R"(268435455)");
495
- check_type(context, 0, "varuint32", R"(268435456)");
496
- check_type(context, 0, "varuint32", R"(268435457)");
497
- check_type(context, 0, "varuint32", R"(4294967294)");
498
- check_type(context, 0, "varuint32", R"(4294967295)");
499
- check_type(context, 0, "varint32", R"(0)");
500
- check_type(context, 0, "varint32", R"(-1)");
501
- check_type(context, 0, "varint32", R"(1)");
502
- check_type(context, 0, "varint32", R"(-2)");
503
- check_type(context, 0, "varint32", R"(2)");
504
- check_type(context, 0, "varint32", R"(-2147483647)");
505
- check_type(context, 0, "varint32", R"(2147483647)");
506
- check_type(context, 0, "varint32", R"(-2147483648)");
507
- check_error(context, "number is out of range",
508
- [&] { return abieos_json_to_bin(context, 0, "varint32", "2147483648"); });
509
- check_error(context, "number is out of range",
510
- [&] { return abieos_json_to_bin(context, 0, "varint32", "-2147483649"); });
511
- check_error(context, "expected non-negative number",
512
- [&] { return abieos_json_to_bin(context, 0, "varuint32", "-1"); });
513
- check_error(context, "number is out of range",
514
- [&] { return abieos_json_to_bin(context, 0, "varuint32", "4294967296"); });
515
- check_type(context, 0, "float32", R"(0.0)", "0");
516
- check_type(context, 0, "float32", R"(0.125)");
517
- check_type(context, 0, "float32", R"(-0.125)");
518
- check_type(context, 0, "float64", R"(0.0)", "0");
519
- check_type(context, 0, "float64", R"(0.125)");
520
- check_type(context, 0, "float64", R"(-0.125)");
521
- check_type(context, 0, "float128", R"("00000000000000000000000000000000")");
522
- check_type(context, 0, "float128", R"("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")");
523
- check_type(context, 0, "float128", R"("12345678ABCDEF12345678ABCDEF1234")");
524
- check_type(context, 0, "time_point_sec", R"("1970-01-01T00:00:00.000")");
525
- check_type(context, 0, "time_point_sec", R"("2018-06-15T19:17:47.000")");
526
- check_type(context, 0, "time_point_sec", R"("2030-06-15T19:17:47.000")");
527
- check_error(context, "expected string containing time_point_sec",
528
- [&] { return abieos_json_to_bin(context, 0, "time_point_sec", "true"); });
529
- check_type(context, 0, "time_point", R"("1970-01-01T00:00:00.000")");
530
- check_type(context, 0, "time_point", R"("1970-01-01T00:00:00.001")");
531
- check_type(context, 0, "time_point", R"("1970-01-01T00:00:00.002")");
532
- check_type(context, 0, "time_point", R"("1970-01-01T00:00:00.010")");
533
- check_type(context, 0, "time_point", R"("1970-01-01T00:00:00.100")");
534
- check_type(context, 0, "time_point", R"("2018-06-15T19:17:47.000")");
535
- check_type(context, 0, "time_point", R"("2018-06-15T19:17:47.999")");
536
- check_type(context, 0, "time_point", R"("2030-06-15T19:17:47.999")");
537
- check_type(context, 0, "time_point", R"("2000-12-31T23:59:59.999999")", R"("2000-12-31T23:59:59.999")");
538
- check_error(context, "expected string containing time_point",
539
- [&] { return abieos_json_to_bin(context, 0, "time_point", "true"); });
540
- check_type(context, 0, "block_timestamp_type", R"("2000-01-01T00:00:00.000")");
541
- check_type(context, 0, "block_timestamp_type", R"("2000-01-01T00:00:00.500")");
542
- check_type(context, 0, "block_timestamp_type", R"("2000-01-01T00:00:01.000")");
543
- check_type(context, 0, "block_timestamp_type", R"("2018-06-15T19:17:47.500")");
544
- check_type(context, 0, "block_timestamp_type", R"("2018-06-15T19:17:48.000")");
545
- check_error(context, "expected string containing block_timestamp_type",
546
- [&] { return abieos_json_to_bin(context, 0, "block_timestamp_type", "true"); });
547
- check_type(context, 0, "name", R"("")");
548
- check_type(context, 0, "name", R"("1")");
549
- check_type(context, 0, "name", R"("abcd")");
550
- check_type(context, 0, "name", R"("ab.cd.ef")");
551
- check_type(context, 0, "name", R"("ab.cd.ef.1234")");
552
- check_type(context, 0, "name", R"("..ab.cd.ef..")", R"("..ab.cd.ef")");
553
- check_type(context, 0, "name", R"("zzzzzzzzzzzz")");
554
- // todo: should json conversion fall back to hash? reenable this error?
555
- // check_error(context, "thirteenth character in name cannot be a letter that comes after j",
556
- // [&] { return abieos_json_to_bin(context, 0, "name", R"("zzzzzzzzzzzzz")"); });
557
- check_error(context, "expected string containing name",
558
- [&] { return abieos_json_to_bin(context, 0, "name", "true"); });
559
- check_type(context, 0, "bytes", R"("")");
560
- check_type(context, 0, "bytes", R"("00")");
561
- check_type(context, 0, "bytes", R"("AABBCCDDEEFF00010203040506070809")");
562
- check_error(context, "odd number of hex digits", [&] { return abieos_json_to_bin(context, 0, "bytes", R"("0")"); });
563
- check_error(context, "expected hex string", [&] { return abieos_json_to_bin(context, 0, "bytes", R"("yz")"); });
564
- check_error(context, "expected string containing hex digits",
565
- [&] { return abieos_json_to_bin(context, 0, "bytes", R"(true)"); });
566
- check_error(context, "Stream overrun", [&] { return abieos_hex_to_json(context, 0, "bytes", "01"); });
567
- check_type(context, 0, "string", R"("")");
568
- check_type(context, 0, "string", R"("z")");
569
- check_type(context, 0, "string", R"("This is a string.")");
570
- check_type(context, 0, "string", R"("' + '*'.repeat(128) + '")");
571
- check_type(context, 0, "string", R"("\u0000 这是一个测试 Это тест هذا اختبار 👍")");
572
- check(abieos_bin_to_json(context, 0, "string", "\x11invalid utf8: \xff\xfe\xfd", 18) == std::string(R"("invalid utf8: ???")"), "invalid utf8");
573
- check(abieos_bin_to_json(context, 0, "string", "\4\xe8\xbf\x99\n", 5) == std::string("\"\xe8\xbf\x99\\u000A\""), "escaping");
574
- check_error(context, "Stream overrun", [&] { return abieos_hex_to_json(context, 0, "string", "01"); });
575
- check_type(context, 0, "checksum160", R"("0000000000000000000000000000000000000000")");
576
- check_type(context, 0, "checksum160", R"("123456789ABCDEF01234567890ABCDEF70123456")");
577
- check_type(context, 0, "checksum256", R"("0000000000000000000000000000000000000000000000000000000000000000")");
578
- check_type(context, 0, "checksum256", R"("0987654321ABCDEF0987654321FFFF1234567890ABCDEF001234567890ABCDEF")");
579
- check_type(
580
- context, 0, "checksum512",
581
- R"("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")");
582
- check_type(
583
- context, 0, "checksum512",
584
- R"("0987654321ABCDEF0987654321FFFF1234567890ABCDEF001234567890ABCDEF0987654321ABCDEF0987654321FFFF1234567890ABCDEF001234567890ABCDEF")");
585
- check_error(context, "expected hex string",
586
- [&] { return abieos_json_to_bin(context, 0, "checksum256", R"("yz")"); });
587
- check_error(context, "expected string containing hex",
588
- [&] { return abieos_json_to_bin(context, 0, "checksum256", R"(true)"); });
589
- check_error(context, "hex string has incorrect length",
590
- [&] { return abieos_json_to_bin(context, 0, "checksum256", R"("a0")"); });
591
- check_type(context, 0, "public_key", R"("EOS1111111111111111111111111111111114T1Anm")",
592
- R"("PUB_K1_11111111111111111111111111111111149Mr2R")");
593
- check_type(context, 0, "public_key", R"("EOS11111111111111111111111115qCHTcgbQwptSz99m")",
594
- R"("PUB_K1_11111111111111111111111115qCHTcgbQwpvP72Uq")");
595
- check_type(context, 0, "public_key", R"("EOS111111111111111114ZrjxJnU1LA5xSyrWMNuXTrYSJ57")",
596
- R"("PUB_K1_111111111111111114ZrjxJnU1LA5xSyrWMNuXTrVub2r")");
597
- check_type(context, 0, "public_key", R"("EOS1111111113diW7pnisfdBvHTXP7wvW5k5Ky1e5DVuF23dosU")",
598
- R"("PUB_K1_1111111113diW7pnisfdBvHTXP7wvW5k5Ky1e5DVuF4PizpM")");
599
- check_type(context, 0, "public_key", R"("EOS11DsZ6Lyr1aXpm9aBqqgV4iFJpNbSw5eE9LLTwNAxqjJgmjgbT")",
600
- R"("PUB_K1_11DsZ6Lyr1aXpm9aBqqgV4iFJpNbSw5eE9LLTwNAxqjJgXSdB8")");
601
- check_type(context, 0, "public_key", R"("EOS12wkBET2rRgE8pahuaczxKbmv7ciehqsne57F9gtzf1PVYNMRa2")",
602
- R"("PUB_K1_12wkBET2rRgE8pahuaczxKbmv7ciehqsne57F9gtzf1PVb7Rf7o")");
603
- check_type(context, 0, "public_key", R"("EOS1yp8ebBuKZ13orqUrZsGsP49e6K3ThVK1nLutxSyU5j9SaXz9a")",
604
- R"("PUB_K1_1yp8ebBuKZ13orqUrZsGsP49e6K3ThVK1nLutxSyU5j9Tx1r96")");
605
- check_type(context, 0, "public_key", R"("EOS9adaAMuB9v8yX1mZ5PtoB6VFSCeqRGjASd8ZTM6VUkiHL7mue4K")",
606
- R"("PUB_K1_9adaAMuB9v8yX1mZ5PtoB6VFSCeqRGjASd8ZTM6VUkiHLB5XEdw")");
607
- check_type(context, 0, "public_key", R"("EOS69X3383RzBZj41k73CSjUNXM5MYGpnDxyPnWUKPEtYQmTBWz4D")",
608
- R"("PUB_K1_69X3383RzBZj41k73CSjUNXM5MYGpnDxyPnWUKPEtYQmVzqTY7")");
609
- check_type(context, 0, "public_key", R"("EOS7yBtksm8Kkg85r4in4uCbfN77uRwe82apM8jjbhFVDgEgz3w8S")",
610
- R"("PUB_K1_7yBtksm8Kkg85r4in4uCbfN77uRwe82apM8jjbhFVDgEcarGb8")");
611
- check_type(context, 0, "public_key", R"("EOS7WnhaKwHpbSidYuh2DF1qAExTRUtPEdZCaZqt75cKcixuQUtdA")",
612
- R"("PUB_K1_7WnhaKwHpbSidYuh2DF1qAExTRUtPEdZCaZqt75cKcixtU7gEn")");
613
- check_type(context, 0, "public_key", R"("EOS7Bn1YDeZ18w2N9DU4KAJxZDt6hk3L7eUwFRAc1hb5bp6xJwxNV")",
614
- R"("PUB_K1_7Bn1YDeZ18w2N9DU4KAJxZDt6hk3L7eUwFRAc1hb5bp6uEBZA8")");
615
- check_type(context, 0, "public_key", R"("PUB_K1_11111111111111111111111111111111149Mr2R")");
616
- check_type(context, 0, "public_key", R"("PUB_K1_11111111111111111111111115qCHTcgbQwpvP72Uq")");
617
- check_type(context, 0, "public_key", R"("PUB_K1_111111111111111114ZrjxJnU1LA5xSyrWMNuXTrVub2r")");
618
- check_type(context, 0, "public_key", R"("PUB_K1_1111111113diW7pnisfdBvHTXP7wvW5k5Ky1e5DVuF4PizpM")");
619
- check_type(context, 0, "public_key", R"("PUB_K1_11DsZ6Lyr1aXpm9aBqqgV4iFJpNbSw5eE9LLTwNAxqjJgXSdB8")");
620
- check_type(context, 0, "public_key", R"("PUB_K1_12wkBET2rRgE8pahuaczxKbmv7ciehqsne57F9gtzf1PVb7Rf7o")");
621
- check_type(context, 0, "public_key", R"("PUB_K1_1yp8ebBuKZ13orqUrZsGsP49e6K3ThVK1nLutxSyU5j9Tx1r96")");
622
- check_type(context, 0, "public_key", R"("PUB_K1_9adaAMuB9v8yX1mZ5PtoB6VFSCeqRGjASd8ZTM6VUkiHLB5XEdw")");
623
- check_type(context, 0, "public_key", R"("PUB_K1_69X3383RzBZj41k73CSjUNXM5MYGpnDxyPnWUKPEtYQmVzqTY7")");
624
- check_type(context, 0, "public_key", R"("PUB_K1_7yBtksm8Kkg85r4in4uCbfN77uRwe82apM8jjbhFVDgEcarGb8")");
625
- check_type(context, 0, "public_key", R"("PUB_K1_7WnhaKwHpbSidYuh2DF1qAExTRUtPEdZCaZqt75cKcixtU7gEn")");
626
- check_type(context, 0, "public_key", R"("PUB_K1_7Bn1YDeZ18w2N9DU4KAJxZDt6hk3L7eUwFRAc1hb5bp6uEBZA8")");
627
- check_type(context, 0, "public_key", R"("PUB_R1_1111111111111111111111111111111116amPNj")");
628
- check_type(context, 0, "public_key", R"("PUB_R1_67vQGPDMCR4gbqYV3hkfNz3BfzRmmSj27kFDKrwDbaZKtaX36u")");
629
- check_type(context, 0, "public_key", R"("PUB_R1_6FPFZqw5ahYrR9jD96yDbbDNTdKtNqRbze6oTDLntrsANgQKZu")");
630
- check_type(context, 0, "public_key", R"("PUB_R1_7zetsBPJwGQqgmhVjviZUfoBMktHinmTqtLczbQqrBjhaBgi6x")");
631
- check_type(context, 0, "public_key",
632
- R"("PUB_WA_8PPYTWYNkRqrveNAoX7PJWDtSqDUp3c29QGBfr6MD9EaLocaPBmsk5QAHWq4vEQt2")");
633
- check_type(context, 0, "public_key",
634
- R"("PUB_WA_6VFnP5vnq1GjNyMR7S17e2yp6SRoChiborF2LumbnXvMTsPASXykJaBBGLhprXTpk")");
635
- check_error(context, "expected string containing public_key",
636
- [&] { return abieos_json_to_bin(context, 0, "public_key", "true"); });
637
- check_error(context, "unrecognized public key format",
638
- [&] { return abieos_json_to_bin(context, 0, "public_key", R"("foo")"); });
639
- check_type(context, 0, "private_key", R"("PVT_R1_PtoxLPzJZURZmPS4e26pjBiAn41mkkLPrET5qHnwDvbvqFEL6")");
640
- check_type(context, 0, "private_key", R"("PVT_R1_vbRKUuE34hjMVQiePj2FEjM8FvuG7yemzQsmzx89kPS9J8Coz")");
641
- check_type(context, 0, "private_key", R"("5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3")",
642
- R"("PVT_K1_2bfGi9rYsXQSXXTvJbDAPhHLQUojjaNLomdm3cEJ1XTzMqUt3V")");
643
- check_error(context, "expected string containing private_key",
644
- [&] { return abieos_json_to_bin(context, 0, "private_key", "true"); });
645
- check_error(context, "key has invalid size",
646
- [&] { return abieos_json_to_bin(context, 0, "private_key", R"("foo")"); });
647
- check_type(
648
- context, 0, "signature",
649
- R"("SIG_K1_Kg2UKjXTX48gw2wWH4zmsZmWu3yarcfC21Bd9JPj7QoDURqiAacCHmtExPk3syPb2tFLsp1R4ttXLXgr7FYgDvKPC5RCkx")");
650
- check_type(
651
- context, 0, "signature",
652
- R"("SIG_R1_Kfh19CfEcQ6pxkMBz6xe9mtqKuPooaoyatPYWtwXbtwHUHU8YLzxPGvZhkqgnp82J41e9R6r5mcpnxy1wAf1w9Vyo9wybZ")");
653
- check_type(
654
- context, 0, "signature",
655
- R"("SIG_WA_FjWGWXz7AC54NrVWXS8y8DGu1aesCr7oFiFmVg4a1QfNS74JwaVkqkN8xbMD64uvcsmPvtNnA9du6G6nSsWuyT9tM8CQw9mV1BSbWEs8hjF1uFBP1QHAEadvhkZQPU1FTyPMz4jevaHYMQgfMiAf3QoPhPn9RGxzvNph8Zrd6F3pKpZkUe92tGQU8PQvEMa22ELPvdXzxXC6qUKnKVSH4gK7BXw168jb5d3nnWrpQ1yrLTWB4xizEMpN8sTfsgScKKx1QajX2uNUahQEb1cxipQZbVMApifHEUsK45PqsNxfXvb")");
656
- check_type(
657
- context, 0, "signature",
658
- R"("SIG_WA_FejsRu4VrdwoZ27v2D3wmp4Kge46JJSqWsiMgbJapVuuYnPDyZZjJSTggdHUNPMp3zt2fGfAdpWY7ScsohZzWTJ1iTerbab2pNE6Tso7MJRjdMAG56K4fjrASEK6QsUs7rxG9Syp7kstBcq8eZidayrtK9YSH1MCNTAqrDPMbN366vR8q5XeN5BSDmyDsqmjsMMSKWMeEbUi7jNHKLziZY6dKHNqDYqjmDmuXoevxyDRWrNVHjAzvBtfTuVtj2r5tCScdCZ3a7yQ1D2zZvstphB4t5HN9YXw1HGS3yKCY6uRZ2V")");
659
- check_error(context, "expected string containing signature",
660
- [&] { return abieos_json_to_bin(context, 0, "signature", "true"); });
661
- check_error(context, "unrecognized signature format",
662
- [&] { return abieos_json_to_bin(context, 0, "signature", R"("foo")"); });
663
- check_type(context, 0, "symbol_code", R"("A")");
664
- check_type(context, 0, "symbol_code", R"("B")");
665
- check_type(context, 0, "symbol_code", R"("SYS")");
666
- check_error(context, "expected string containing symbol_code",
667
- [&] { return abieos_json_to_bin(context, 0, "symbol_code", "true"); });
668
- check_type(context, 0, "symbol", R"("0,A")");
669
- check_type(context, 0, "symbol", R"("1,Z")");
670
- check_type(context, 0, "symbol", R"("4,SYS")");
671
- check_error(context, "expected string containing symbol",
672
- [&] { return abieos_json_to_bin(context, 0, "symbol", "null"); });
673
- check_type(context, 0, "asset", R"("0 FOO")");
674
- check_type(context, 0, "asset", R"("0.0 FOO")");
675
- check_type(context, 0, "asset", R"("0.00 FOO")");
676
- check_type(context, 0, "asset", R"("0.000 FOO")");
677
- check_type(context, 0, "asset", R"("1.2345 SYS")");
678
- check_type(context, 0, "asset", R"("-1.2345 SYS")");
679
- check_error(context, "expected string containing asset",
680
- [&] { return abieos_json_to_bin(context, 0, "asset", "null"); });
681
- check_type(context, 0, "asset[]", R"([])");
682
- check_type(context, 0, "asset[]", R"(["0 FOO"])");
683
- check_type(context, 0, "asset[]", R"(["0 FOO","0.000 FOO"])");
684
- check_type(context, 0, "asset?", R"(null)");
685
- check_type(context, 0, "asset?", R"("0.123456 SIX")");
686
- check_type(context, 0, "extended_asset", R"({"quantity":"0 FOO","contract":"bar"})");
687
- check_type(context, 0, "extended_asset", R"({"quantity":"0.123456 SIX","contract":"seven"})");
688
-
689
- check_type(context, token, "transfer",
690
- R"({"from":"useraaaaaaaa","to":"useraaaaaaab","quantity":"0.0001 SYS","memo":"test memo"})");
691
- check_type(
692
- context, 0, "transaction",
693
- R"({"expiration":"2009-02-13T23:31:31.000","ref_block_num":1234,"ref_block_prefix":5678,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0,"context_free_actions":[],"actions":[{"account":"eosio.token","name":"transfer","authorization":[{"actor":"useraaaaaaaa","permission":"active"}],"data":"608C31C6187315D6708C31C6187315D60100000000000000045359530000000000"}],"transaction_extensions":[]})");
694
-
695
- check_type( //
696
- context, token, "transfer",
697
- R"({"to":"useraaaaaaab","memo":"test memo","from":"useraaaaaaaa","quantity":"0.0001 SYS"})",
698
- R"({"from":"useraaaaaaaa","to":"useraaaaaaab","quantity":"0.0001 SYS","memo":"test memo"})", false);
699
- check_type(
700
- context, 0, "transaction",
701
- R"({"ref_block_num":1234,"ref_block_prefix":5678,"expiration":"2009-02-13T23:31:31.000","max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0,"context_free_actions":[],"actions":[{"account":"eosio.token","name":"transfer","authorization":[{"actor":"useraaaaaaaa","permission":"active"}],"data":"608C31C6187315D6708C31C6187315D60100000000000000045359530000000000"}],"transaction_extensions":[]})",
702
- R"({"expiration":"2009-02-13T23:31:31.000","ref_block_num":1234,"ref_block_prefix":5678,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0,"context_free_actions":[],"actions":[{"account":"eosio.token","name":"transfer","authorization":[{"actor":"useraaaaaaaa","permission":"active"}],"data":"608C31C6187315D6708C31C6187315D60100000000000000045359530000000000"}],"transaction_extensions":[]})",
703
- false);
704
-
705
- check_error(context, "recursion limit reached", [&] {
706
- return abieos_json_to_bin_reorderable(
707
- context, 0, "int8",
708
- "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
709
- "[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]"
710
- "]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]");
711
- });
712
- check_error(context, "json parse error", [&] { return abieos_json_to_bin_reorderable(context, 0, "int8", "1,2"); });
713
-
714
- check_error(context, "optional (?) and array ([]) don't support nesting",
715
- [&] { return abieos_json_to_bin(context, 0, "int8?[]", ""); });
716
- check_error(context, "optional (?) and array ([]) don't support nesting",
717
- [&] { return abieos_json_to_bin(context, 0, "int8[]?", ""); });
718
- check_error(context, "optional (?) may not contain binary extensions ($)",
719
- [&] { return abieos_json_to_bin(context, 0, "int8$?", ""); });
720
- check_error(context, "array ([]) may not contain binary extensions ($)",
721
- [&] { return abieos_json_to_bin(context, 0, "int8$[]", ""); });
722
- check_error(context, "binary extensions ($) may not contain binary extensions ($)",
723
- [&] { return abieos_json_to_bin(context, 0, "int8$$", ""); });
724
- check_error(context, "unknown type \"fee\"", [&] { return abieos_json_to_bin(context, 0, "fee", ""); });
725
-
726
- check_error(context, "abi has a type with a missing name", [&] {
727
- return abieos_set_abi( //
728
- context, 0, R"({"version":"eosio::abi/1.1","types":[{"new_type_name":"","type":"int8"}]})");
729
- });
730
- check_error(context, "can't use extensions ($) within typedefs", [&] {
731
- return abieos_set_abi( //
732
- context, 0, R"({"version":"eosio::abi/1.1","types":[{"new_type_name":"a","type":"int8$"}]})");
733
- });
734
- check_error(context, "abi redefines type \"a\"", [&] {
735
- return abieos_set_abi(
736
- context, 0,
737
- R"({"version":"eosio::abi/1.1","types":[{"new_type_name":"a","type":"int8"},{"new_type_name":"a","type":"int8"}]})");
738
- });
739
-
740
- check_error(context, "expected object", [&] { return abieos_json_to_bin(context, testAbiName, "s4", "null"); });
741
- check_error(context, "expected object", [&] { return abieos_json_to_bin(context, testAbiName, "s4", "[]"); });
742
- check_error(context, R"(s4: expected field "a1")",
743
- [&] { return abieos_json_to_bin(context, testAbiName, "s4", R"({"foo":7})"); });
744
- check_error(context, R"(s4.a1: expected number or boolean)",
745
- [&] { return abieos_json_to_bin(context, testAbiName, "s4", R"({"a1":[]})"); });
746
- check_error(context, R"(expected variant: ["type", value])",
747
- [&] { return abieos_json_to_bin(context, testAbiName, "v1", "null"); });
748
- check_error(context, R"(<variant>: expected variant: ["type", value])",
749
- [&] { return abieos_json_to_bin(context, testAbiName, "v1", "[]"); });
750
- check_error(context, R"(<variant>: type is not valid for this variant)",
751
- [&] { return abieos_json_to_bin(context, testAbiName, "v1", R"(["x"])"); });
752
- check_error(context, R"(<variant>: expected variant: ["type", value])",
753
- [&] { return abieos_json_to_bin(context, testAbiName, "v1", R"(["int8",7,5])"); });
754
- check_error(context, R"(s5: expected field "x1")",
755
- [&] { return abieos_json_to_bin(context, testAbiName, "s5", R"({})"); });
756
- check_error(context, R"(s5: expected field "x2")",
757
- [&] { return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":5})"); });
758
- check_error(context, R"(s5: expected field "x3")",
759
- [&] { return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":5,"x2":7})"); });
760
- check_error(context, R"(s5.x1: expected number or boolean)",
761
- [&] { return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":null})"); });
762
- check_error(context, R"(s5.x2: expected number or boolean)",
763
- [&] { return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":null})"); });
764
- check_error(context, R"(s5: expected field "x3")",
765
- [&] { return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":10})"); });
766
- check_error(context, R"(s5.x3: expected object)",
767
- [&] { return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":null)"); });
768
- check_error(context, R"(s5.x3: expected field "c1")",
769
- [&] { return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{})"); });
770
- check_error(context, R"(s5.x3: expected field "c2")",
771
- [&] { return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{"c1":4})"); });
772
- check_error(context, R"(s5.x3.c2: expected array)", [&] {
773
- return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":{}})");
774
- });
775
- check_error(context, R"(s5.x3.c2[0]: expected object)", [&] {
776
- return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[7])");
777
- });
778
- check_error(context, R"(s5.x3.c2[0]: expected field "x1")", [&] {
779
- return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{}])");
780
- });
781
- check_error(context, R"(s5.x3.c2[0].x1: expected number or boolean)", [&] {
782
- return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":null}]}} )");
783
- });
784
- check_error(context, R"(s5.x3.c2[0]: expected field "x2")", [&] {
785
- return abieos_json_to_bin(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7}]}} )");
786
- });
787
- check_error(context, R"(s5.x3.c2[0]: expected field "x2")", [&] {
788
- return abieos_json_to_bin(context, testAbiName, "s5",
789
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x3":null}]}} )");
790
- });
791
- check_error(context, R"(s5.x3.c2[0].x2: expected number or boolean)", [&] {
792
- return abieos_json_to_bin(context, testAbiName, "s5",
793
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":null}]}} )");
794
- });
795
- check_error(context, R"(s5.x3.c2[0]: expected field "x3")", [&] {
796
- return abieos_json_to_bin(context, testAbiName, "s5",
797
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true}]}} )");
798
- });
799
- check_error(context, R"(s5.x3.c2[0].x3: expected object)", [&] {
800
- return abieos_json_to_bin(context, testAbiName, "s5",
801
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true,"x3":null}]}} )");
802
- });
803
- check_error(context, R"(s5.x3.c2[1]: expected object)", [&] {
804
- return abieos_json_to_bin(
805
- context, testAbiName, "s5",
806
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true,"x3":{"c1":0,"c2":[],"c3":7}},null]}} )");
807
- });
808
- check_error(context, R"(s5.x3.c2[1]: expected field "x1")", [&] {
809
- return abieos_json_to_bin(
810
- context, testAbiName, "s5",
811
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true,"x3":{"c1":0,"c2":[],"c3":7}},{} ]}} )");
812
- });
813
- check_error(context, R"(s5.x3.c2[1].x1: expected number or boolean)", [&] {
814
- return abieos_json_to_bin(
815
- context, testAbiName, "s5",
816
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true,"x3":{"c1":0,"c2":[],"c3":7}},{"x1":null} ]}} )");
817
- });
818
-
819
- check_error(context, "expected object",
820
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "s4", "null"); });
821
- check_error(context, "expected object",
822
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "s4", "[]"); });
823
- check_error(context, R"(s4.a1: expected number or boolean)",
824
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "s4", R"({"a1":[]})"); });
825
- check_error(context, R"(expected variant: ["type", value])",
826
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "v1", "null"); });
827
- check_error(context, R"(expected variant: ["type", value])",
828
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "v1", "[]"); });
829
- check_error(context, R"(expected variant: ["type", value])",
830
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "v1", R"(["x",7,5])"); });
831
- check_error(context, R"(<variant>: type is not valid for this variant)",
832
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "v1", R"(["x",7])"); });
833
- check_error(context, R"(expected variant: ["type", value])",
834
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "v1", R"(["int8",7,5])"); });
835
- check_error(context, R"(s5: expected field "x1")",
836
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({})"); });
837
- check_error(context, R"(s5: expected field "x2")",
838
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":5})"); });
839
- check_error(context, R"(s5: expected field "x3")",
840
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":5,"x2":7})"); });
841
- check_error(context, R"(s5.x1: expected number or boolean)",
842
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":null})"); });
843
- check_error(context, R"(s5.x2: expected number or boolean)",
844
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":9,"x2":null})"); });
845
- check_error(context, R"(s5: expected field "x3")",
846
- [&] { return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":9,"x2":10})"); });
847
- check_error(context, R"(s5.x3: expected object)", [&] {
848
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":null})");
849
- });
850
- check_error(context, R"(s5.x3: expected field "c1")", [&] {
851
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{}})");
852
- });
853
- check_error(context, R"(s5.x3: expected field "c2")", [&] {
854
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{"c1":4}})");
855
- });
856
- check_error(context, R"(s5.x3.c2: expected array)", [&] {
857
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":{}}})");
858
- });
859
- check_error(context, R"(s5.x3.c2[0]: expected object)", [&] {
860
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5", R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[7]}})");
861
- });
862
- check_error(context, R"(s5.x3.c2[0]: expected field "x1")", [&] {
863
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5",
864
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{}]}})");
865
- });
866
- check_error(context, R"(s5.x3.c2[0].x1: expected number or boolean)", [&] {
867
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5",
868
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":null}]}} )");
869
- });
870
- check_error(context, R"(s5.x3.c2[0]: expected field "x2")", [&] {
871
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5",
872
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7}]}} )");
873
- });
874
- check_error(context, R"(s5.x3.c2[0]: expected field "x2")", [&] {
875
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5",
876
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x3":null}]}} )");
877
- });
878
- check_error(context, R"(s5.x3.c2[0].x2: expected number or boolean)", [&] {
879
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5",
880
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":null}]}} )");
881
- });
882
- check_error(context, R"(s5.x3.c2[0]: expected field "x3")", [&] {
883
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5",
884
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true}]}} )");
885
- });
886
- check_error(context, R"(s5.x3.c2[0].x3: expected object)", [&] {
887
- return abieos_json_to_bin_reorderable(context, testAbiName, "s5",
888
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true,"x3":null}]}} )");
889
- });
890
- check_error(context, R"(s5.x3.c2[1]: expected object)", [&] {
891
- return abieos_json_to_bin_reorderable(
892
- context, testAbiName, "s5",
893
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true,"x3":{"c1":0,"c2":[],"c3":7}},null]}} )");
894
- });
895
- check_error(context, R"(s5.x3.c2[1]: expected field "x1")", [&] {
896
- return abieos_json_to_bin_reorderable(
897
- context, testAbiName, "s5",
898
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true,"x3":{"c1":0,"c2":[],"c3":7}},{} ]}} )");
899
- });
900
- check_error(context, R"(s5.x3.c2[1].x1: expected number or boolean)", [&] {
901
- return abieos_json_to_bin_reorderable(
902
- context, testAbiName, "s5",
903
- R"({"x1":9,"x2":10,"x3":{"c1":4,"c2":[{"x1":7,"x2":true,"x3":{"c1":0,"c2":[],"c3":7}},{"x1":null} ]}} )");
904
- });
905
-
906
- auto testWith = [&](auto& abiName) {
907
- check_type(context, abiName, "v1", R"(["int8",7])");
908
- check_type(context, abiName, "v1", R"(["s1",{"x1":6}])");
909
- check_type(context, abiName, "v1", R"(["s2",{"y1":5,"y2":4}])");
910
-
911
- check_type(context, abiName, "s3", R"({})");
912
- check_type(context, abiName, "s3", R"({"z1":7})");
913
- check_type(context, abiName, "s3", R"({"z1":7,"z2":["int8",6]})");
914
- check_type(context, abiName, "s3", R"({"z1":7,"z2":["int8",6],"z3":{}})", R"({"z1":7,"z2":["int8",6]})");
915
- check_type(context, abiName, "s3", R"({"z1":7,"z2":["int8",6],"z3":{"y1":9}})");
916
- check_type(context, abiName, "s3", R"({"z1":7,"z2":["int8",6],"z3":{"y1":9,"y2":10}})");
917
-
918
- check_type(context, abiName, "s4", R"({})");
919
- check_type(context, abiName, "s4", R"({"a1":null})");
920
- check_type(context, abiName, "s4", R"({"a1":7})");
921
- check_type(context, abiName, "s4", R"({"a1":null,"b1":[]})");
922
- check_type(context, abiName, "s4", R"({"a1":null,"b1":[5,6,7]})");
923
- };
924
-
925
- testWith(testAbiName);
926
- testWith(testHexAbiName);
927
-
928
- abieos_destroy(context);
929
- }
930
-
931
- int main() {
932
- try {
933
- check_types();
934
- printf("\nok\n\n");
935
- return 0;
936
- } catch (std::exception& e) {
937
- printf("error: %s\n", e.what());
938
- return 1;
939
- }
940
- }