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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (740) hide show
  1. package/README.md +4 -1
  2. package/dist/abieos.node +0 -0
  3. package/lib/abieos.d.ts +19 -0
  4. package/lib/abieos.d.ts.map +1 -0
  5. package/lib/abieos.js +100 -0
  6. package/lib/abieos.ts +107 -0
  7. package/package.json +13 -8
  8. package/.gitmodules +0 -6
  9. package/.idea/misc.xml +0 -6
  10. package/.idea/modules.xml +0 -8
  11. package/.idea/node-abieos.iml +0 -12
  12. package/.idea/vcs.xml +0 -9
  13. package/.idea/workspace.xml +0 -266
  14. package/CMakeLists.txt +0 -35
  15. package/abieos.d.ts +0 -21
  16. package/abieos.js +0 -59
  17. package/eosio.json +0 -1596
  18. package/external/date/CMakeLists.txt +0 -175
  19. package/external/date/LICENSE.txt +0 -31
  20. package/external/date/README.md +0 -61
  21. package/external/date/compile_fail.sh +0 -16
  22. package/external/date/include/date/chrono_io.h +0 -34
  23. package/external/date/include/date/date.h +0 -8335
  24. package/external/date/include/date/ios.h +0 -50
  25. package/external/date/include/date/islamic.h +0 -3031
  26. package/external/date/include/date/iso_week.h +0 -1745
  27. package/external/date/include/date/julian.h +0 -3046
  28. package/external/date/include/date/ptz.h +0 -592
  29. package/external/date/include/date/tz.h +0 -2760
  30. package/external/date/include/date/tz_private.h +0 -318
  31. package/external/date/src/ios.mm +0 -337
  32. package/external/date/src/tz.cpp +0 -3801
  33. package/external/date/test/clock_cast_test/custom_clock.pass.cpp +0 -213
  34. package/external/date/test/clock_cast_test/deprecated.pass.cpp +0 -90
  35. package/external/date/test/clock_cast_test/local_t.pass.cpp +0 -132
  36. package/external/date/test/clock_cast_test/noncastable.pass.cpp +0 -251
  37. package/external/date/test/clock_cast_test/normal_clocks.pass.cpp +0 -102
  38. package/external/date/test/clock_cast_test/to_sys_return_int.fail.cpp +0 -49
  39. package/external/date/test/clock_cast_test/to_sys_return_reference.fail.cpp +0 -51
  40. package/external/date/test/clock_cast_test/to_sys_return_utc_time.fail.cpp +0 -49
  41. package/external/date/test/date_test/day.pass.cpp +0 -143
  42. package/external/date/test/date_test/daypday.fail.cpp +0 -32
  43. package/external/date/test/date_test/daysmday.fail.cpp +0 -32
  44. package/external/date/test/date_test/daysmweekday.fail.cpp +0 -32
  45. package/external/date/test/date_test/detail/decimal_format_seconds.pass.cpp +0 -145
  46. package/external/date/test/date_test/detail/make_precision.pass.cpp +0 -63
  47. package/external/date/test/date_test/detail/static_pow10.pass.cpp +0 -50
  48. package/external/date/test/date_test/detail/width.pass.cpp +0 -64
  49. package/external/date/test/date_test/durations.pass.cpp +0 -62
  50. package/external/date/test/date_test/durations_output.pass.cpp +0 -328
  51. package/external/date/test/date_test/format/century.pass.cpp +0 -117
  52. package/external/date/test/date_test/format/misc.pass.cpp +0 -52
  53. package/external/date/test/date_test/format/range.pass.cpp +0 -78
  54. package/external/date/test/date_test/format/two_dight_year.pass.cpp +0 -121
  55. package/external/date/test/date_test/last.pass.cpp +0 -34
  56. package/external/date/test/date_test/make_time.pass.cpp +0 -164
  57. package/external/date/test/date_test/month.pass.cpp +0 -181
  58. package/external/date/test/date_test/month_day.pass.cpp +0 -82
  59. package/external/date/test/date_test/month_day_last.pass.cpp +0 -75
  60. package/external/date/test/date_test/month_weekday.pass.cpp +0 -77
  61. package/external/date/test/date_test/month_weekday_last.pass.cpp +0 -77
  62. package/external/date/test/date_test/month_weekday_last_less.fail.cpp +0 -34
  63. package/external/date/test/date_test/month_weekday_less.fail.cpp +0 -34
  64. package/external/date/test/date_test/monthpmonth.fail.cpp +0 -32
  65. package/external/date/test/date_test/months_m_year_month.fail.cpp +0 -33
  66. package/external/date/test/date_test/months_m_year_month_day.fail.cpp +0 -33
  67. package/external/date/test/date_test/monthsmmonth.fail.cpp +0 -32
  68. package/external/date/test/date_test/multi_year_duration_addition.pass.cpp +0 -297
  69. package/external/date/test/date_test/op_div_day_day.fail.cpp +0 -33
  70. package/external/date/test/date_test/op_div_int_month.fail.cpp +0 -33
  71. package/external/date/test/date_test/op_div_int_year.fail.cpp +0 -33
  72. package/external/date/test/date_test/op_div_last_last.fail.cpp +0 -33
  73. package/external/date/test/date_test/op_div_month_day.pass.cpp +0 -41
  74. package/external/date/test/date_test/op_div_month_day_last.pass.cpp +0 -39
  75. package/external/date/test/date_test/op_div_month_day_month_day.fail.cpp +0 -33
  76. package/external/date/test/date_test/op_div_month_month.fail.cpp +0 -33
  77. package/external/date/test/date_test/op_div_month_weekday.pass.cpp +0 -39
  78. package/external/date/test/date_test/op_div_month_weekday_last.pass.cpp +0 -39
  79. package/external/date/test/date_test/op_div_month_year.fail.cpp +0 -33
  80. package/external/date/test/date_test/op_div_survey.pass.cpp +0 -437
  81. package/external/date/test/date_test/op_div_weekday_indexed_weekday_indexed.fail.cpp +0 -33
  82. package/external/date/test/date_test/op_div_weekday_last_weekday_last.fail.cpp +0 -33
  83. package/external/date/test/date_test/op_div_year_month.pass.cpp +0 -35
  84. package/external/date/test/date_test/op_div_year_month_day.pass.cpp +0 -43
  85. package/external/date/test/date_test/op_div_year_month_day_last.pass.cpp +0 -41
  86. package/external/date/test/date_test/op_div_year_month_weekday.pass.cpp +0 -41
  87. package/external/date/test/date_test/op_div_year_month_weekday_last.pass.cpp +0 -41
  88. package/external/date/test/date_test/op_div_year_month_year_month.fail.cpp +0 -33
  89. package/external/date/test/date_test/op_div_year_year.fail.cpp +0 -33
  90. package/external/date/test/date_test/parse.pass.cpp +0 -904
  91. package/external/date/test/date_test/sizeof.pass.cpp +0 -62
  92. package/external/date/test/date_test/time_of_day_hours.pass.cpp +0 -104
  93. package/external/date/test/date_test/time_of_day_microfortnights.pass.cpp +0 -119
  94. package/external/date/test/date_test/time_of_day_milliseconds.pass.cpp +0 -126
  95. package/external/date/test/date_test/time_of_day_minutes.pass.cpp +0 -110
  96. package/external/date/test/date_test/time_of_day_nanoseconds.pass.cpp +0 -126
  97. package/external/date/test/date_test/time_of_day_seconds.pass.cpp +0 -116
  98. package/external/date/test/date_test/weekday.pass.cpp +0 -201
  99. package/external/date/test/date_test/weekday_indexed.pass.cpp +0 -70
  100. package/external/date/test/date_test/weekday_last.pass.cpp +0 -66
  101. package/external/date/test/date_test/weekday_lessthan.fail.cpp +0 -32
  102. package/external/date/test/date_test/weekday_sum.fail.cpp +0 -32
  103. package/external/date/test/date_test/year.pass.cpp +0 -146
  104. package/external/date/test/date_test/year_month.pass.cpp +0 -142
  105. package/external/date/test/date_test/year_month_day.pass.cpp +0 -244
  106. package/external/date/test/date_test/year_month_day_last.pass.cpp +0 -177
  107. package/external/date/test/date_test/year_month_day_m_year_month_day.fail.cpp +0 -33
  108. package/external/date/test/date_test/year_month_day_p_year_month_day.fail.cpp +0 -33
  109. package/external/date/test/date_test/year_month_p_year_month.fail.cpp +0 -33
  110. package/external/date/test/date_test/year_month_weekday.pass.cpp +0 -178
  111. package/external/date/test/date_test/year_month_weekday_last.pass.cpp +0 -169
  112. package/external/date/test/date_test/year_p_year.fail.cpp +0 -32
  113. package/external/date/test/date_test/years_m_year.fail.cpp +0 -32
  114. package/external/date/test/date_test/years_m_year_month.fail.cpp +0 -33
  115. package/external/date/test/date_test/years_m_year_month_day.fail.cpp +0 -33
  116. package/external/date/test/iso_week/last.pass.cpp +0 -34
  117. package/external/date/test/iso_week/lastweek_weekday.pass.cpp +0 -82
  118. package/external/date/test/iso_week/op_div_survey.pass.cpp +0 -196
  119. package/external/date/test/iso_week/weekday.pass.cpp +0 -227
  120. package/external/date/test/iso_week/weekday_lessthan.fail.cpp +0 -32
  121. package/external/date/test/iso_week/weekday_sum.fail.cpp +0 -32
  122. package/external/date/test/iso_week/weeknum.pass.cpp +0 -121
  123. package/external/date/test/iso_week/weeknum_p_weeknum.fail.cpp +0 -32
  124. package/external/date/test/iso_week/weeknum_weekday.pass.cpp +0 -86
  125. package/external/date/test/iso_week/year.pass.cpp +0 -120
  126. package/external/date/test/iso_week/year_lastweek.pass.cpp +0 -97
  127. package/external/date/test/iso_week/year_lastweek_weekday.pass.cpp +0 -129
  128. package/external/date/test/iso_week/year_p_year.fail.cpp +0 -32
  129. package/external/date/test/iso_week/year_weeknum.pass.cpp +0 -97
  130. package/external/date/test/iso_week/year_weeknum_weekday.pass.cpp +0 -139
  131. package/external/date/test/iso_week/years_m_year.fail.cpp +0 -32
  132. package/external/date/test/just.pass.cpp +0 -26
  133. package/external/date/test/testit +0 -177
  134. package/external/date/test/tz_test/OffsetZone.pass.cpp +0 -81
  135. package/external/date/test/tz_test/README.md +0 -22
  136. package/external/date/test/tz_test/tzdata2015e.txt.zip +0 -0
  137. package/external/date/test/tz_test/tzdata2015f.txt.zip +0 -0
  138. package/external/date/test/tz_test/tzdata2016c.txt.zip +0 -0
  139. package/external/date/test/tz_test/tzdata2016d.txt.zip +0 -0
  140. package/external/date/test/tz_test/tzdata2016e.txt.zip +0 -0
  141. package/external/date/test/tz_test/tzdata2016f.txt.zip +0 -0
  142. package/external/date/test/tz_test/validate.cpp +0 -165
  143. package/external/date/test/tz_test/zone.pass.cpp +0 -37
  144. package/external/date/test/tz_test/zoned_time.pass.cpp +0 -464
  145. package/external/date/test_fail.sh +0 -10
  146. package/external/rapidjson/.gitattributes +0 -22
  147. package/external/rapidjson/.gitmodules +0 -3
  148. package/external/rapidjson/.travis.yml +0 -99
  149. package/external/rapidjson/CHANGELOG.md +0 -158
  150. package/external/rapidjson/CMakeLists.txt +0 -221
  151. package/external/rapidjson/CMakeModules/FindGTestSrc.cmake +0 -30
  152. package/external/rapidjson/RapidJSON.pc.in +0 -7
  153. package/external/rapidjson/RapidJSONConfig.cmake.in +0 -15
  154. package/external/rapidjson/RapidJSONConfigVersion.cmake.in +0 -10
  155. package/external/rapidjson/appveyor.yml +0 -54
  156. package/external/rapidjson/bin/data/glossary.json +0 -22
  157. package/external/rapidjson/bin/data/menu.json +0 -27
  158. package/external/rapidjson/bin/data/readme.txt +0 -1
  159. package/external/rapidjson/bin/data/sample.json +0 -3315
  160. package/external/rapidjson/bin/data/webapp.json +0 -88
  161. package/external/rapidjson/bin/data/widget.json +0 -26
  162. package/external/rapidjson/bin/encodings/utf16be.json +0 -0
  163. package/external/rapidjson/bin/encodings/utf16bebom.json +0 -0
  164. package/external/rapidjson/bin/encodings/utf16le.json +0 -0
  165. package/external/rapidjson/bin/encodings/utf16lebom.json +0 -0
  166. package/external/rapidjson/bin/encodings/utf32be.json +0 -0
  167. package/external/rapidjson/bin/encodings/utf32bebom.json +0 -0
  168. package/external/rapidjson/bin/encodings/utf32le.json +0 -0
  169. package/external/rapidjson/bin/encodings/utf32lebom.json +0 -0
  170. package/external/rapidjson/bin/encodings/utf8.json +0 -7
  171. package/external/rapidjson/bin/encodings/utf8bom.json +0 -7
  172. package/external/rapidjson/bin/jsonchecker/fail1.json +0 -1
  173. package/external/rapidjson/bin/jsonchecker/fail10.json +0 -1
  174. package/external/rapidjson/bin/jsonchecker/fail11.json +0 -1
  175. package/external/rapidjson/bin/jsonchecker/fail12.json +0 -1
  176. package/external/rapidjson/bin/jsonchecker/fail13.json +0 -1
  177. package/external/rapidjson/bin/jsonchecker/fail14.json +0 -1
  178. package/external/rapidjson/bin/jsonchecker/fail15.json +0 -1
  179. package/external/rapidjson/bin/jsonchecker/fail16.json +0 -1
  180. package/external/rapidjson/bin/jsonchecker/fail17.json +0 -1
  181. package/external/rapidjson/bin/jsonchecker/fail18.json +0 -1
  182. package/external/rapidjson/bin/jsonchecker/fail19.json +0 -1
  183. package/external/rapidjson/bin/jsonchecker/fail2.json +0 -1
  184. package/external/rapidjson/bin/jsonchecker/fail20.json +0 -1
  185. package/external/rapidjson/bin/jsonchecker/fail21.json +0 -1
  186. package/external/rapidjson/bin/jsonchecker/fail22.json +0 -1
  187. package/external/rapidjson/bin/jsonchecker/fail23.json +0 -1
  188. package/external/rapidjson/bin/jsonchecker/fail24.json +0 -1
  189. package/external/rapidjson/bin/jsonchecker/fail25.json +0 -1
  190. package/external/rapidjson/bin/jsonchecker/fail26.json +0 -1
  191. package/external/rapidjson/bin/jsonchecker/fail27.json +0 -2
  192. package/external/rapidjson/bin/jsonchecker/fail28.json +0 -2
  193. package/external/rapidjson/bin/jsonchecker/fail29.json +0 -1
  194. package/external/rapidjson/bin/jsonchecker/fail3.json +0 -1
  195. package/external/rapidjson/bin/jsonchecker/fail30.json +0 -1
  196. package/external/rapidjson/bin/jsonchecker/fail31.json +0 -1
  197. package/external/rapidjson/bin/jsonchecker/fail32.json +0 -1
  198. package/external/rapidjson/bin/jsonchecker/fail33.json +0 -1
  199. package/external/rapidjson/bin/jsonchecker/fail4.json +0 -1
  200. package/external/rapidjson/bin/jsonchecker/fail5.json +0 -1
  201. package/external/rapidjson/bin/jsonchecker/fail6.json +0 -1
  202. package/external/rapidjson/bin/jsonchecker/fail7.json +0 -1
  203. package/external/rapidjson/bin/jsonchecker/fail8.json +0 -1
  204. package/external/rapidjson/bin/jsonchecker/fail9.json +0 -1
  205. package/external/rapidjson/bin/jsonchecker/pass1.json +0 -58
  206. package/external/rapidjson/bin/jsonchecker/pass2.json +0 -1
  207. package/external/rapidjson/bin/jsonchecker/pass3.json +0 -6
  208. package/external/rapidjson/bin/jsonchecker/readme.txt +0 -3
  209. package/external/rapidjson/bin/types/booleans.json +0 -102
  210. package/external/rapidjson/bin/types/floats.json +0 -102
  211. package/external/rapidjson/bin/types/guids.json +0 -102
  212. package/external/rapidjson/bin/types/integers.json +0 -102
  213. package/external/rapidjson/bin/types/mixed.json +0 -592
  214. package/external/rapidjson/bin/types/nulls.json +0 -102
  215. package/external/rapidjson/bin/types/paragraphs.json +0 -102
  216. package/external/rapidjson/bin/types/readme.txt +0 -1
  217. package/external/rapidjson/contrib/natvis/LICENSE +0 -45
  218. package/external/rapidjson/contrib/natvis/README.md +0 -7
  219. package/external/rapidjson/contrib/natvis/rapidjson.natvis +0 -38
  220. package/external/rapidjson/doc/CMakeLists.txt +0 -27
  221. package/external/rapidjson/doc/Doxyfile.in +0 -2369
  222. package/external/rapidjson/doc/Doxyfile.zh-cn.in +0 -2369
  223. package/external/rapidjson/doc/diagram/architecture.dot +0 -50
  224. package/external/rapidjson/doc/diagram/architecture.png +0 -0
  225. package/external/rapidjson/doc/diagram/insituparsing.dot +0 -65
  226. package/external/rapidjson/doc/diagram/insituparsing.png +0 -0
  227. package/external/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +0 -62
  228. package/external/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
  229. package/external/rapidjson/doc/diagram/move1.dot +0 -47
  230. package/external/rapidjson/doc/diagram/move1.png +0 -0
  231. package/external/rapidjson/doc/diagram/move2.dot +0 -62
  232. package/external/rapidjson/doc/diagram/move2.png +0 -0
  233. package/external/rapidjson/doc/diagram/move3.dot +0 -60
  234. package/external/rapidjson/doc/diagram/move3.png +0 -0
  235. package/external/rapidjson/doc/diagram/normalparsing.dot +0 -56
  236. package/external/rapidjson/doc/diagram/normalparsing.png +0 -0
  237. package/external/rapidjson/doc/diagram/simpledom.dot +0 -54
  238. package/external/rapidjson/doc/diagram/simpledom.png +0 -0
  239. package/external/rapidjson/doc/diagram/tutorial.dot +0 -58
  240. package/external/rapidjson/doc/diagram/tutorial.png +0 -0
  241. package/external/rapidjson/doc/diagram/utilityclass.dot +0 -73
  242. package/external/rapidjson/doc/diagram/utilityclass.png +0 -0
  243. package/external/rapidjson/doc/dom.md +0 -280
  244. package/external/rapidjson/doc/dom.zh-cn.md +0 -284
  245. package/external/rapidjson/doc/encoding.md +0 -146
  246. package/external/rapidjson/doc/encoding.zh-cn.md +0 -152
  247. package/external/rapidjson/doc/faq.md +0 -289
  248. package/external/rapidjson/doc/faq.zh-cn.md +0 -290
  249. package/external/rapidjson/doc/features.md +0 -104
  250. package/external/rapidjson/doc/features.zh-cn.md +0 -103
  251. package/external/rapidjson/doc/internals.md +0 -368
  252. package/external/rapidjson/doc/internals.zh-cn.md +0 -363
  253. package/external/rapidjson/doc/logo/rapidjson.png +0 -0
  254. package/external/rapidjson/doc/logo/rapidjson.svg +0 -119
  255. package/external/rapidjson/doc/misc/DoxygenLayout.xml +0 -194
  256. package/external/rapidjson/doc/misc/doxygenextra.css +0 -274
  257. package/external/rapidjson/doc/misc/footer.html +0 -11
  258. package/external/rapidjson/doc/misc/header.html +0 -24
  259. package/external/rapidjson/doc/npm.md +0 -31
  260. package/external/rapidjson/doc/performance.md +0 -26
  261. package/external/rapidjson/doc/performance.zh-cn.md +0 -26
  262. package/external/rapidjson/doc/pointer.md +0 -234
  263. package/external/rapidjson/doc/pointer.zh-cn.md +0 -234
  264. package/external/rapidjson/doc/sax.md +0 -509
  265. package/external/rapidjson/doc/sax.zh-cn.md +0 -487
  266. package/external/rapidjson/doc/schema.md +0 -505
  267. package/external/rapidjson/doc/schema.zh-cn.md +0 -237
  268. package/external/rapidjson/doc/stream.md +0 -429
  269. package/external/rapidjson/doc/stream.zh-cn.md +0 -429
  270. package/external/rapidjson/doc/tutorial.md +0 -536
  271. package/external/rapidjson/doc/tutorial.zh-cn.md +0 -535
  272. package/external/rapidjson/docker/debian/Dockerfile +0 -8
  273. package/external/rapidjson/example/CMakeLists.txt +0 -45
  274. package/external/rapidjson/example/archiver/archiver.cpp +0 -292
  275. package/external/rapidjson/example/archiver/archiver.h +0 -145
  276. package/external/rapidjson/example/archiver/archivertest.cpp +0 -287
  277. package/external/rapidjson/example/capitalize/capitalize.cpp +0 -67
  278. package/external/rapidjson/example/condense/condense.cpp +0 -32
  279. package/external/rapidjson/example/filterkey/filterkey.cpp +0 -135
  280. package/external/rapidjson/example/filterkeydom/filterkeydom.cpp +0 -170
  281. package/external/rapidjson/example/jsonx/jsonx.cpp +0 -207
  282. package/external/rapidjson/example/lookaheadparser/lookaheadparser.cpp +0 -350
  283. package/external/rapidjson/example/messagereader/messagereader.cpp +0 -105
  284. package/external/rapidjson/example/parsebyparts/parsebyparts.cpp +0 -176
  285. package/external/rapidjson/example/pretty/pretty.cpp +0 -30
  286. package/external/rapidjson/example/prettyauto/prettyauto.cpp +0 -56
  287. package/external/rapidjson/example/schemavalidator/schemavalidator.cpp +0 -78
  288. package/external/rapidjson/example/serialize/serialize.cpp +0 -173
  289. package/external/rapidjson/example/simpledom/simpledom.cpp +0 -29
  290. package/external/rapidjson/example/simplepullreader/simplepullreader.cpp +0 -53
  291. package/external/rapidjson/example/simplereader/simplereader.cpp +0 -42
  292. package/external/rapidjson/example/simplewriter/simplewriter.cpp +0 -36
  293. package/external/rapidjson/example/tutorial/tutorial.cpp +0 -151
  294. package/external/rapidjson/include/rapidjson/allocators.h +0 -284
  295. package/external/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -78
  296. package/external/rapidjson/include/rapidjson/document.h +0 -2646
  297. package/external/rapidjson/include/rapidjson/encodedstream.h +0 -299
  298. package/external/rapidjson/include/rapidjson/encodings.h +0 -716
  299. package/external/rapidjson/include/rapidjson/error/en.h +0 -74
  300. package/external/rapidjson/include/rapidjson/error/error.h +0 -161
  301. package/external/rapidjson/include/rapidjson/filereadstream.h +0 -99
  302. package/external/rapidjson/include/rapidjson/filewritestream.h +0 -104
  303. package/external/rapidjson/include/rapidjson/fwd.h +0 -151
  304. package/external/rapidjson/include/rapidjson/internal/biginteger.h +0 -290
  305. package/external/rapidjson/include/rapidjson/internal/diyfp.h +0 -271
  306. package/external/rapidjson/include/rapidjson/internal/dtoa.h +0 -245
  307. package/external/rapidjson/include/rapidjson/internal/ieee754.h +0 -78
  308. package/external/rapidjson/include/rapidjson/internal/itoa.h +0 -308
  309. package/external/rapidjson/include/rapidjson/internal/meta.h +0 -186
  310. package/external/rapidjson/include/rapidjson/internal/pow10.h +0 -55
  311. package/external/rapidjson/include/rapidjson/internal/regex.h +0 -732
  312. package/external/rapidjson/include/rapidjson/internal/stack.h +0 -231
  313. package/external/rapidjson/include/rapidjson/internal/strfunc.h +0 -69
  314. package/external/rapidjson/include/rapidjson/internal/strtod.h +0 -290
  315. package/external/rapidjson/include/rapidjson/internal/swap.h +0 -46
  316. package/external/rapidjson/include/rapidjson/istreamwrapper.h +0 -113
  317. package/external/rapidjson/include/rapidjson/memorybuffer.h +0 -70
  318. package/external/rapidjson/include/rapidjson/memorystream.h +0 -71
  319. package/external/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -316
  320. package/external/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -300
  321. package/external/rapidjson/include/rapidjson/ostreamwrapper.h +0 -81
  322. package/external/rapidjson/include/rapidjson/pointer.h +0 -1357
  323. package/external/rapidjson/include/rapidjson/prettywriter.h +0 -277
  324. package/external/rapidjson/include/rapidjson/rapidjson.h +0 -654
  325. package/external/rapidjson/include/rapidjson/reader.h +0 -2230
  326. package/external/rapidjson/include/rapidjson/schema.h +0 -2494
  327. package/external/rapidjson/include/rapidjson/stream.h +0 -223
  328. package/external/rapidjson/include/rapidjson/stringbuffer.h +0 -121
  329. package/external/rapidjson/include/rapidjson/writer.h +0 -710
  330. package/external/rapidjson/include_dirs.js +0 -2
  331. package/external/rapidjson/library.json +0 -15
  332. package/external/rapidjson/license.txt +0 -57
  333. package/external/rapidjson/package.json +0 -24
  334. package/external/rapidjson/rapidjson.autopkg +0 -77
  335. package/external/rapidjson/readme.md +0 -160
  336. package/external/rapidjson/readme.zh-cn.md +0 -152
  337. package/external/rapidjson/test/CMakeLists.txt +0 -20
  338. package/external/rapidjson/test/perftest/CMakeLists.txt +0 -28
  339. package/external/rapidjson/test/perftest/misctest.cpp +0 -974
  340. package/external/rapidjson/test/perftest/perftest.cpp +0 -24
  341. package/external/rapidjson/test/perftest/perftest.h +0 -185
  342. package/external/rapidjson/test/perftest/platformtest.cpp +0 -166
  343. package/external/rapidjson/test/perftest/rapidjsontest.cpp +0 -472
  344. package/external/rapidjson/test/perftest/schematest.cpp +0 -223
  345. package/external/rapidjson/test/unittest/CMakeLists.txt +0 -92
  346. package/external/rapidjson/test/unittest/allocatorstest.cpp +0 -100
  347. package/external/rapidjson/test/unittest/bigintegertest.cpp +0 -138
  348. package/external/rapidjson/test/unittest/cursorstreamwrappertest.cpp +0 -115
  349. package/external/rapidjson/test/unittest/documenttest.cpp +0 -672
  350. package/external/rapidjson/test/unittest/dtoatest.cpp +0 -98
  351. package/external/rapidjson/test/unittest/encodedstreamtest.cpp +0 -313
  352. package/external/rapidjson/test/unittest/encodingstest.cpp +0 -451
  353. package/external/rapidjson/test/unittest/filestreamtest.cpp +0 -112
  354. package/external/rapidjson/test/unittest/fwdtest.cpp +0 -230
  355. package/external/rapidjson/test/unittest/istreamwrappertest.cpp +0 -181
  356. package/external/rapidjson/test/unittest/itoatest.cpp +0 -160
  357. package/external/rapidjson/test/unittest/jsoncheckertest.cpp +0 -143
  358. package/external/rapidjson/test/unittest/namespacetest.cpp +0 -70
  359. package/external/rapidjson/test/unittest/ostreamwrappertest.cpp +0 -92
  360. package/external/rapidjson/test/unittest/pointertest.cpp +0 -1529
  361. package/external/rapidjson/test/unittest/prettywritertest.cpp +0 -373
  362. package/external/rapidjson/test/unittest/readertest.cpp +0 -2190
  363. package/external/rapidjson/test/unittest/regextest.cpp +0 -638
  364. package/external/rapidjson/test/unittest/schematest.cpp +0 -2072
  365. package/external/rapidjson/test/unittest/simdtest.cpp +0 -219
  366. package/external/rapidjson/test/unittest/strfunctest.cpp +0 -30
  367. package/external/rapidjson/test/unittest/stringbuffertest.cpp +0 -192
  368. package/external/rapidjson/test/unittest/strtodtest.cpp +0 -132
  369. package/external/rapidjson/test/unittest/unittest.cpp +0 -51
  370. package/external/rapidjson/test/unittest/unittest.h +0 -140
  371. package/external/rapidjson/test/unittest/valuetest.cpp +0 -1851
  372. package/external/rapidjson/test/unittest/writertest.cpp +0 -598
  373. package/external/rapidjson/test/valgrind.supp +0 -17
  374. package/external/rapidjson/thirdparty/gtest/.travis.yml +0 -81
  375. package/external/rapidjson/thirdparty/gtest/BUILD.bazel +0 -175
  376. package/external/rapidjson/thirdparty/gtest/CMakeLists.txt +0 -33
  377. package/external/rapidjson/thirdparty/gtest/CONTRIBUTING.md +0 -160
  378. package/external/rapidjson/thirdparty/gtest/LICENSE +0 -28
  379. package/external/rapidjson/thirdparty/gtest/Makefile.am +0 -14
  380. package/external/rapidjson/thirdparty/gtest/README.md +0 -122
  381. package/external/rapidjson/thirdparty/gtest/WORKSPACE +0 -8
  382. package/external/rapidjson/thirdparty/gtest/appveyor.yml +0 -104
  383. package/external/rapidjson/thirdparty/gtest/ci/build-linux-autotools.sh +0 -44
  384. package/external/rapidjson/thirdparty/gtest/ci/build-linux-bazel.sh +0 -36
  385. package/external/rapidjson/thirdparty/gtest/ci/env-linux.sh +0 -41
  386. package/external/rapidjson/thirdparty/gtest/ci/env-osx.sh +0 -40
  387. package/external/rapidjson/thirdparty/gtest/ci/get-nprocessors.sh +0 -48
  388. package/external/rapidjson/thirdparty/gtest/ci/install-linux.sh +0 -49
  389. package/external/rapidjson/thirdparty/gtest/ci/install-osx.sh +0 -39
  390. package/external/rapidjson/thirdparty/gtest/ci/log-config.sh +0 -51
  391. package/external/rapidjson/thirdparty/gtest/ci/travis.sh +0 -44
  392. package/external/rapidjson/thirdparty/gtest/configure.ac +0 -16
  393. package/external/rapidjson/thirdparty/gtest/googlemock/CHANGES +0 -126
  394. package/external/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +0 -242
  395. package/external/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +0 -40
  396. package/external/rapidjson/thirdparty/gtest/googlemock/LICENSE +0 -28
  397. package/external/rapidjson/thirdparty/gtest/googlemock/Makefile.am +0 -224
  398. package/external/rapidjson/thirdparty/gtest/googlemock/README.md +0 -344
  399. package/external/rapidjson/thirdparty/gtest/googlemock/build-aux/.keep +0 -0
  400. package/external/rapidjson/thirdparty/gtest/googlemock/cmake/gmock.pc.in +0 -9
  401. package/external/rapidjson/thirdparty/gtest/googlemock/cmake/gmock_main.pc.in +0 -9
  402. package/external/rapidjson/thirdparty/gtest/googlemock/configure.ac +0 -146
  403. package/external/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +0 -564
  404. package/external/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +0 -3660
  405. package/external/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +0 -280
  406. package/external/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +0 -15
  407. package/external/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +0 -447
  408. package/external/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +0 -627
  409. package/external/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +0 -19
  410. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +0 -1262
  411. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +0 -147
  412. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +0 -2571
  413. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +0 -833
  414. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +0 -1379
  415. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +0 -347
  416. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +0 -2258
  417. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +0 -675
  418. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +0 -458
  419. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +0 -178
  420. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +0 -5255
  421. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +0 -246
  422. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +0 -91
  423. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +0 -1918
  424. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +0 -95
  425. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +0 -8
  426. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +0 -10
  427. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +0 -38
  428. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +0 -46
  429. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +0 -286
  430. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +0 -136
  431. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +0 -574
  432. package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +0 -87
  433. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +0 -32
  434. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +0 -191
  435. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +0 -15
  436. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +0 -187
  437. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +0 -201
  438. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +0 -46
  439. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +0 -145
  440. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +0 -19
  441. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +0 -151
  442. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +0 -176
  443. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +0 -46
  444. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +0 -145
  445. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +0 -19
  446. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +0 -151
  447. package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +0 -176
  448. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +0 -240
  449. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +0 -203
  450. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +0 -34
  451. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +0 -115
  452. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  453. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +0 -1733
  454. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +0 -227
  455. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +0 -448
  456. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +0 -59
  457. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +0 -287
  458. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +0 -41
  459. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +0 -31
  460. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +0 -303
  461. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +0 -640
  462. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +0 -1387
  463. package/external/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +0 -78
  464. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +0 -47
  465. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +0 -156
  466. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +0 -204
  467. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +0 -573
  468. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +0 -883
  469. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +0 -205
  470. package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +0 -54
  471. package/external/rapidjson/thirdparty/gtest/googlemock/test/BUILD.bazel +0 -123
  472. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +0 -1575
  473. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +0 -428
  474. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +0 -1230
  475. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +0 -647
  476. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +0 -129
  477. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +0 -1341
  478. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +0 -718
  479. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +0 -6767
  480. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +0 -710
  481. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +0 -511
  482. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +0 -43
  483. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +0 -2771
  484. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +0 -51
  485. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +0 -81
  486. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +0 -108
  487. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +0 -100
  488. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +0 -40
  489. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +0 -40
  490. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +0 -691
  491. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +0 -183
  492. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +0 -310
  493. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +0 -317
  494. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +0 -323
  495. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +0 -262
  496. package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +0 -110
  497. package/external/rapidjson/thirdparty/gtest/googletest/CHANGES +0 -157
  498. package/external/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +0 -312
  499. package/external/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +0 -37
  500. package/external/rapidjson/thirdparty/gtest/googletest/LICENSE +0 -28
  501. package/external/rapidjson/thirdparty/gtest/googletest/Makefile.am +0 -339
  502. package/external/rapidjson/thirdparty/gtest/googletest/README.md +0 -341
  503. package/external/rapidjson/thirdparty/gtest/googletest/cmake/gtest.pc.in +0 -9
  504. package/external/rapidjson/thirdparty/gtest/googletest/cmake/gtest_main.pc.in +0 -10
  505. package/external/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +0 -280
  506. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +0 -138
  507. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +0 -54
  508. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +0 -38
  509. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +0 -40
  510. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +0 -82
  511. package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +0 -88
  512. package/external/rapidjson/thirdparty/gtest/googletest/configure.ac +0 -68
  513. package/external/rapidjson/thirdparty/gtest/googletest/docs/Pkgconfig.md +0 -146
  514. package/external/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +0 -177
  515. package/external/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +0 -93
  516. package/external/rapidjson/thirdparty/gtest/googletest/docs/advanced.md +0 -2416
  517. package/external/rapidjson/thirdparty/gtest/googletest/docs/faq.md +0 -1092
  518. package/external/rapidjson/thirdparty/gtest/googletest/docs/primer.md +0 -536
  519. package/external/rapidjson/thirdparty/gtest/googletest/docs/samples.md +0 -14
  520. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +0 -342
  521. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +0 -249
  522. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +0 -1438
  523. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +0 -501
  524. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +0 -1082
  525. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +0 -231
  526. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +0 -179
  527. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +0 -264
  528. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +0 -2332
  529. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +0 -357
  530. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +0 -61
  531. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +0 -70
  532. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
  533. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +0 -45
  534. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -275
  535. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +0 -205
  536. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +0 -1277
  537. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
  538. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5139
  539. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -279
  540. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +0 -723
  541. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +0 -100
  542. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +0 -2687
  543. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +0 -167
  544. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
  545. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
  546. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +0 -3347
  547. package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -313
  548. package/external/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +0 -363
  549. package/external/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +0 -74
  550. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.sln +0 -55
  551. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj +0 -149
  552. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj.filters +0 -18
  553. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.sln +0 -55
  554. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj +0 -149
  555. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj.filters +0 -18
  556. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj +0 -154
  557. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj.filters +0 -18
  558. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj +0 -162
  559. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj.filters +0 -18
  560. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj +0 -199
  561. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters +0 -26
  562. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj +0 -191
  563. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters +0 -26
  564. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj +0 -188
  565. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters +0 -18
  566. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj +0 -180
  567. package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj.filters +0 -18
  568. package/external/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +0 -127
  569. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +0 -68
  570. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +0 -43
  571. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -140
  572. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +0 -154
  573. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +0 -56
  574. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +0 -85
  575. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +0 -110
  576. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +0 -172
  577. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +0 -152
  578. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +0 -46
  579. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +0 -53
  580. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +0 -49
  581. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +0 -199
  582. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +0 -225
  583. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +0 -118
  584. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +0 -174
  585. package/external/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -157
  586. package/external/rapidjson/thirdparty/gtest/googletest/scripts/common.py +0 -83
  587. package/external/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +0 -253
  588. package/external/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +0 -730
  589. package/external/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +0 -274
  590. package/external/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +0 -855
  591. package/external/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +0 -158
  592. package/external/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +0 -1387
  593. package/external/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +0 -78
  594. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +0 -48
  595. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +0 -1536
  596. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +0 -385
  597. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +0 -1175
  598. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +0 -1277
  599. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +0 -458
  600. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +0 -102
  601. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +0 -119
  602. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +0 -5846
  603. package/external/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +0 -38
  604. package/external/rapidjson/thirdparty/gtest/googletest/test/BUILD.bazel +0 -396
  605. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +0 -93
  606. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +0 -1424
  607. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +0 -652
  608. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +0 -154
  609. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +0 -311
  610. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +0 -159
  611. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +0 -213
  612. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +0 -61
  613. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +0 -1110
  614. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +0 -53
  615. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +0 -1303
  616. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +0 -1737
  617. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +0 -208
  618. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +0 -320
  619. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +0 -45
  620. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +0 -380
  621. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +0 -66
  622. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +0 -341
  623. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +0 -47
  624. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_assert_by_exception_test.cc +0 -119
  625. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +0 -210
  626. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +0 -87
  627. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -235
  628. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +0 -311
  629. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +0 -129
  630. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -63
  631. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +0 -119
  632. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -124
  633. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -189
  634. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +0 -638
  635. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -138
  636. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +0 -172
  637. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +0 -46
  638. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_json_outfiles_test.py +0 -162
  639. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_json_output_unittest.py +0 -611
  640. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_json_test_utils.py +0 -60
  641. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +0 -207
  642. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +0 -157
  643. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +0 -45
  644. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +0 -56
  645. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +0 -344
  646. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +0 -1067
  647. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +0 -781
  648. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +0 -2427
  649. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +0 -127
  650. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +0 -57
  651. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +0 -236
  652. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +0 -325
  653. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +0 -103
  654. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +0 -57
  655. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -250
  656. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +0 -318
  657. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test.py +0 -65
  658. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test_.cc +0 -44
  659. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +0 -92
  660. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +0 -171
  661. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +0 -72
  662. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +0 -69
  663. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +0 -43
  664. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +0 -7797
  665. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -48
  666. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -48
  667. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +0 -140
  668. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +0 -378
  669. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -179
  670. package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +0 -196
  671. package/external/rapidjson/thirdparty/gtest/googletest/test/production.cc +0 -36
  672. package/external/rapidjson/thirdparty/gtest/googletest/test/production.h +0 -55
  673. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +0 -30
  674. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +0 -17
  675. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +0 -41
  676. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +0 -32
  677. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +0 -18
  678. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +0 -8
  679. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +0 -30
  680. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +0 -28
  681. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +0 -457
  682. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +0 -62
  683. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +0 -63
  684. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +0 -59
  685. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +0 -68
  686. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +0 -65
  687. package/external/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +0 -100
  688. package/external/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +0 -1182
  689. package/external/rapidjson/travis-doxygen.sh +0 -121
  690. package/include/.clang-format +0 -76
  691. package/include/eosio/abi.hpp +0 -286
  692. package/include/eosio/asset.hpp +0 -458
  693. package/include/eosio/bytes.hpp +0 -27
  694. package/include/eosio/chain_conversions.hpp +0 -450
  695. package/include/eosio/chain_types.hpp +0 -14
  696. package/include/eosio/check.hpp +0 -178
  697. package/include/eosio/convert.hpp +0 -95
  698. package/include/eosio/crypto.hpp +0 -147
  699. package/include/eosio/eosio_outcome.hpp +0 -41
  700. package/include/eosio/fixed_bytes.hpp +0 -246
  701. package/include/eosio/float.hpp +0 -35
  702. package/include/eosio/for_each_field.hpp +0 -48
  703. package/include/eosio/fpconv.c +0 -336
  704. package/include/eosio/fpconv.h +0 -41
  705. package/include/eosio/fpconv.license +0 -23
  706. package/include/eosio/from_bin.hpp +0 -272
  707. package/include/eosio/from_json.hpp +0 -737
  708. package/include/eosio/from_string.hpp +0 -28
  709. package/include/eosio/map_macro.h +0 -64
  710. package/include/eosio/murmur.hpp +0 -55
  711. package/include/eosio/name.hpp +0 -174
  712. package/include/eosio/opaque.hpp +0 -108
  713. package/include/eosio/operators.hpp +0 -71
  714. package/include/eosio/powers.h +0 -76
  715. package/include/eosio/reflection.hpp +0 -61
  716. package/include/eosio/ship_protocol.hpp +0 -850
  717. package/include/eosio/stream.hpp +0 -231
  718. package/include/eosio/symbol.hpp +0 -300
  719. package/include/eosio/time.hpp +0 -264
  720. package/include/eosio/to_bin.hpp +0 -189
  721. package/include/eosio/to_json.hpp +0 -279
  722. package/include/eosio/to_key.hpp +0 -298
  723. package/include/eosio/types.hpp +0 -97
  724. package/include/eosio/varint.hpp +0 -452
  725. package/include/outcome-basic.hpp +0 -6836
  726. package/src/abi.cpp +0 -297
  727. package/src/abieos.cpp +0 -263
  728. package/src/abieos.h +0 -76
  729. package/src/abieos.hpp +0 -1010
  730. package/src/abieos_exception.hpp +0 -89
  731. package/src/abieos_numeric.hpp +0 -94
  732. package/src/abieos_ripemd160.hpp +0 -417
  733. package/src/crypto.cpp +0 -215
  734. package/src/key_test.cpp +0 -218
  735. package/src/main.cpp +0 -242
  736. package/src/reflect_test.cpp +0 -28
  737. package/src/template_test.cpp +0 -240
  738. package/src/test.cpp +0 -940
  739. package/tools/CMakeLists.txt +0 -9
  740. package/tools/name.cpp +0 -86
@@ -1,1277 +0,0 @@
1
- // Copyright 2008, Google Inc.
2
- // All rights reserved.
3
- //
4
- // Redistribution and use in source and binary forms, with or without
5
- // modification, are permitted provided that the following conditions are
6
- // met:
7
- //
8
- // * Redistributions of source code must retain the above copyright
9
- // notice, this list of conditions and the following disclaimer.
10
- // * Redistributions in binary form must reproduce the above
11
- // copyright notice, this list of conditions and the following disclaimer
12
- // in the documentation and/or other materials provided with the
13
- // distribution.
14
- // * Neither the name of Google Inc. nor the names of its
15
- // contributors may be used to endorse or promote products derived from
16
- // this software without specific prior written permission.
17
- //
18
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
- //
30
- // Author: wan@google.com (Zhanyong Wan)
31
-
32
- #include "gtest/internal/gtest-port.h"
33
-
34
- #include <limits.h>
35
- #include <stdlib.h>
36
- #include <stdio.h>
37
- #include <string.h>
38
- #include <fstream>
39
-
40
- #if GTEST_OS_WINDOWS
41
- # include <windows.h>
42
- # include <io.h>
43
- # include <sys/stat.h>
44
- # include <map> // Used in ThreadLocal.
45
- #else
46
- # include <unistd.h>
47
- #endif // GTEST_OS_WINDOWS
48
-
49
- #if GTEST_OS_MAC
50
- # include <mach/mach_init.h>
51
- # include <mach/task.h>
52
- # include <mach/vm_map.h>
53
- #endif // GTEST_OS_MAC
54
-
55
- #if GTEST_OS_QNX
56
- # include <devctl.h>
57
- # include <fcntl.h>
58
- # include <sys/procfs.h>
59
- #endif // GTEST_OS_QNX
60
-
61
- #if GTEST_OS_AIX
62
- # include <procinfo.h>
63
- # include <sys/types.h>
64
- #endif // GTEST_OS_AIX
65
-
66
- #if GTEST_OS_FUCHSIA
67
- # include <zircon/process.h>
68
- # include <zircon/syscalls.h>
69
- #endif // GTEST_OS_FUCHSIA
70
-
71
- #include "gtest/gtest-spi.h"
72
- #include "gtest/gtest-message.h"
73
- #include "gtest/internal/gtest-internal.h"
74
- #include "gtest/internal/gtest-string.h"
75
- #include "src/gtest-internal-inl.h"
76
-
77
- namespace testing {
78
- namespace internal {
79
-
80
- #if defined(_MSC_VER) || defined(__BORLANDC__)
81
- // MSVC and C++Builder do not provide a definition of STDERR_FILENO.
82
- const int kStdOutFileno = 1;
83
- const int kStdErrFileno = 2;
84
- #else
85
- const int kStdOutFileno = STDOUT_FILENO;
86
- const int kStdErrFileno = STDERR_FILENO;
87
- #endif // _MSC_VER
88
-
89
- #if GTEST_OS_LINUX
90
-
91
- namespace {
92
- template <typename T>
93
- T ReadProcFileField(const std::string& filename, int field) {
94
- std::string dummy;
95
- std::ifstream file(filename.c_str());
96
- while (field-- > 0) {
97
- file >> dummy;
98
- }
99
- T output = 0;
100
- file >> output;
101
- return output;
102
- }
103
- } // namespace
104
-
105
- // Returns the number of active threads, or 0 when there is an error.
106
- size_t GetThreadCount() {
107
- const std::string filename =
108
- (Message() << "/proc/" << getpid() << "/stat").GetString();
109
- return ReadProcFileField<int>(filename, 19);
110
- }
111
-
112
- #elif GTEST_OS_MAC
113
-
114
- size_t GetThreadCount() {
115
- const task_t task = mach_task_self();
116
- mach_msg_type_number_t thread_count;
117
- thread_act_array_t thread_list;
118
- const kern_return_t status = task_threads(task, &thread_list, &thread_count);
119
- if (status == KERN_SUCCESS) {
120
- // task_threads allocates resources in thread_list and we need to free them
121
- // to avoid leaks.
122
- vm_deallocate(task,
123
- reinterpret_cast<vm_address_t>(thread_list),
124
- sizeof(thread_t) * thread_count);
125
- return static_cast<size_t>(thread_count);
126
- } else {
127
- return 0;
128
- }
129
- }
130
-
131
- #elif GTEST_OS_QNX
132
-
133
- // Returns the number of threads running in the process, or 0 to indicate that
134
- // we cannot detect it.
135
- size_t GetThreadCount() {
136
- const int fd = open("/proc/self/as", O_RDONLY);
137
- if (fd < 0) {
138
- return 0;
139
- }
140
- procfs_info process_info;
141
- const int status =
142
- devctl(fd, DCMD_PROC_INFO, &process_info, sizeof(process_info), NULL);
143
- close(fd);
144
- if (status == EOK) {
145
- return static_cast<size_t>(process_info.num_threads);
146
- } else {
147
- return 0;
148
- }
149
- }
150
-
151
- #elif GTEST_OS_AIX
152
-
153
- size_t GetThreadCount() {
154
- struct procentry64 entry;
155
- pid_t pid = getpid();
156
- int status = getprocs64(&entry, sizeof(entry), NULL, 0, &pid, 1);
157
- if (status == 1) {
158
- return entry.pi_thcount;
159
- } else {
160
- return 0;
161
- }
162
- }
163
-
164
- #elif GTEST_OS_FUCHSIA
165
-
166
- size_t GetThreadCount() {
167
- int dummy_buffer;
168
- size_t avail;
169
- zx_status_t status = zx_object_get_info(
170
- zx_process_self(),
171
- ZX_INFO_PROCESS_THREADS,
172
- &dummy_buffer,
173
- 0,
174
- nullptr,
175
- &avail);
176
- if (status == ZX_OK) {
177
- return avail;
178
- } else {
179
- return 0;
180
- }
181
- }
182
-
183
- #else
184
-
185
- size_t GetThreadCount() {
186
- // There's no portable way to detect the number of threads, so we just
187
- // return 0 to indicate that we cannot detect it.
188
- return 0;
189
- }
190
-
191
- #endif // GTEST_OS_LINUX
192
-
193
- #if GTEST_IS_THREADSAFE && GTEST_OS_WINDOWS
194
-
195
- void SleepMilliseconds(int n) {
196
- ::Sleep(n);
197
- }
198
-
199
- AutoHandle::AutoHandle()
200
- : handle_(INVALID_HANDLE_VALUE) {}
201
-
202
- AutoHandle::AutoHandle(Handle handle)
203
- : handle_(handle) {}
204
-
205
- AutoHandle::~AutoHandle() {
206
- Reset();
207
- }
208
-
209
- AutoHandle::Handle AutoHandle::Get() const {
210
- return handle_;
211
- }
212
-
213
- void AutoHandle::Reset() {
214
- Reset(INVALID_HANDLE_VALUE);
215
- }
216
-
217
- void AutoHandle::Reset(HANDLE handle) {
218
- // Resetting with the same handle we already own is invalid.
219
- if (handle_ != handle) {
220
- if (IsCloseable()) {
221
- ::CloseHandle(handle_);
222
- }
223
- handle_ = handle;
224
- } else {
225
- GTEST_CHECK_(!IsCloseable())
226
- << "Resetting a valid handle to itself is likely a programmer error "
227
- "and thus not allowed.";
228
- }
229
- }
230
-
231
- bool AutoHandle::IsCloseable() const {
232
- // Different Windows APIs may use either of these values to represent an
233
- // invalid handle.
234
- return handle_ != NULL && handle_ != INVALID_HANDLE_VALUE;
235
- }
236
-
237
- Notification::Notification()
238
- : event_(::CreateEvent(NULL, // Default security attributes.
239
- TRUE, // Do not reset automatically.
240
- FALSE, // Initially unset.
241
- NULL)) { // Anonymous event.
242
- GTEST_CHECK_(event_.Get() != NULL);
243
- }
244
-
245
- void Notification::Notify() {
246
- GTEST_CHECK_(::SetEvent(event_.Get()) != FALSE);
247
- }
248
-
249
- void Notification::WaitForNotification() {
250
- GTEST_CHECK_(
251
- ::WaitForSingleObject(event_.Get(), INFINITE) == WAIT_OBJECT_0);
252
- }
253
-
254
- Mutex::Mutex()
255
- : owner_thread_id_(0),
256
- type_(kDynamic),
257
- critical_section_init_phase_(0),
258
- critical_section_(new CRITICAL_SECTION) {
259
- ::InitializeCriticalSection(critical_section_);
260
- }
261
-
262
- Mutex::~Mutex() {
263
- // Static mutexes are leaked intentionally. It is not thread-safe to try
264
- // to clean them up.
265
- // TODO(yukawa): Switch to Slim Reader/Writer (SRW) Locks, which requires
266
- // nothing to clean it up but is available only on Vista and later.
267
- // http://msdn.microsoft.com/en-us/library/windows/desktop/aa904937.aspx
268
- if (type_ == kDynamic) {
269
- ::DeleteCriticalSection(critical_section_);
270
- delete critical_section_;
271
- critical_section_ = NULL;
272
- }
273
- }
274
-
275
- void Mutex::Lock() {
276
- ThreadSafeLazyInit();
277
- ::EnterCriticalSection(critical_section_);
278
- owner_thread_id_ = ::GetCurrentThreadId();
279
- }
280
-
281
- void Mutex::Unlock() {
282
- ThreadSafeLazyInit();
283
- // We don't protect writing to owner_thread_id_ here, as it's the
284
- // caller's responsibility to ensure that the current thread holds the
285
- // mutex when this is called.
286
- owner_thread_id_ = 0;
287
- ::LeaveCriticalSection(critical_section_);
288
- }
289
-
290
- // Does nothing if the current thread holds the mutex. Otherwise, crashes
291
- // with high probability.
292
- void Mutex::AssertHeld() {
293
- ThreadSafeLazyInit();
294
- GTEST_CHECK_(owner_thread_id_ == ::GetCurrentThreadId())
295
- << "The current thread is not holding the mutex @" << this;
296
- }
297
-
298
- // Initializes owner_thread_id_ and critical_section_ in static mutexes.
299
- void Mutex::ThreadSafeLazyInit() {
300
- // Dynamic mutexes are initialized in the constructor.
301
- if (type_ == kStatic) {
302
- switch (
303
- ::InterlockedCompareExchange(&critical_section_init_phase_, 1L, 0L)) {
304
- case 0:
305
- // If critical_section_init_phase_ was 0 before the exchange, we
306
- // are the first to test it and need to perform the initialization.
307
- owner_thread_id_ = 0;
308
- critical_section_ = new CRITICAL_SECTION;
309
- ::InitializeCriticalSection(critical_section_);
310
- // Updates the critical_section_init_phase_ to 2 to signal
311
- // initialization complete.
312
- GTEST_CHECK_(::InterlockedCompareExchange(
313
- &critical_section_init_phase_, 2L, 1L) ==
314
- 1L);
315
- break;
316
- case 1:
317
- // Somebody else is already initializing the mutex; spin until they
318
- // are done.
319
- while (::InterlockedCompareExchange(&critical_section_init_phase_,
320
- 2L,
321
- 2L) != 2L) {
322
- // Possibly yields the rest of the thread's time slice to other
323
- // threads.
324
- ::Sleep(0);
325
- }
326
- break;
327
-
328
- case 2:
329
- break; // The mutex is already initialized and ready for use.
330
-
331
- default:
332
- GTEST_CHECK_(false)
333
- << "Unexpected value of critical_section_init_phase_ "
334
- << "while initializing a static mutex.";
335
- }
336
- }
337
- }
338
-
339
- namespace {
340
-
341
- class ThreadWithParamSupport : public ThreadWithParamBase {
342
- public:
343
- static HANDLE CreateThread(Runnable* runnable,
344
- Notification* thread_can_start) {
345
- ThreadMainParam* param = new ThreadMainParam(runnable, thread_can_start);
346
- DWORD thread_id;
347
- // TODO(yukawa): Consider to use _beginthreadex instead.
348
- HANDLE thread_handle = ::CreateThread(
349
- NULL, // Default security.
350
- 0, // Default stack size.
351
- &ThreadWithParamSupport::ThreadMain,
352
- param, // Parameter to ThreadMainStatic
353
- 0x0, // Default creation flags.
354
- &thread_id); // Need a valid pointer for the call to work under Win98.
355
- GTEST_CHECK_(thread_handle != NULL) << "CreateThread failed with error "
356
- << ::GetLastError() << ".";
357
- if (thread_handle == NULL) {
358
- delete param;
359
- }
360
- return thread_handle;
361
- }
362
-
363
- private:
364
- struct ThreadMainParam {
365
- ThreadMainParam(Runnable* runnable, Notification* thread_can_start)
366
- : runnable_(runnable),
367
- thread_can_start_(thread_can_start) {
368
- }
369
- scoped_ptr<Runnable> runnable_;
370
- // Does not own.
371
- Notification* thread_can_start_;
372
- };
373
-
374
- static DWORD WINAPI ThreadMain(void* ptr) {
375
- // Transfers ownership.
376
- scoped_ptr<ThreadMainParam> param(static_cast<ThreadMainParam*>(ptr));
377
- if (param->thread_can_start_ != NULL)
378
- param->thread_can_start_->WaitForNotification();
379
- param->runnable_->Run();
380
- return 0;
381
- }
382
-
383
- // Prohibit instantiation.
384
- ThreadWithParamSupport();
385
-
386
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParamSupport);
387
- };
388
-
389
- } // namespace
390
-
391
- ThreadWithParamBase::ThreadWithParamBase(Runnable *runnable,
392
- Notification* thread_can_start)
393
- : thread_(ThreadWithParamSupport::CreateThread(runnable,
394
- thread_can_start)) {
395
- }
396
-
397
- ThreadWithParamBase::~ThreadWithParamBase() {
398
- Join();
399
- }
400
-
401
- void ThreadWithParamBase::Join() {
402
- GTEST_CHECK_(::WaitForSingleObject(thread_.Get(), INFINITE) == WAIT_OBJECT_0)
403
- << "Failed to join the thread with error " << ::GetLastError() << ".";
404
- }
405
-
406
- // Maps a thread to a set of ThreadIdToThreadLocals that have values
407
- // instantiated on that thread and notifies them when the thread exits. A
408
- // ThreadLocal instance is expected to persist until all threads it has
409
- // values on have terminated.
410
- class ThreadLocalRegistryImpl {
411
- public:
412
- // Registers thread_local_instance as having value on the current thread.
413
- // Returns a value that can be used to identify the thread from other threads.
414
- static ThreadLocalValueHolderBase* GetValueOnCurrentThread(
415
- const ThreadLocalBase* thread_local_instance) {
416
- DWORD current_thread = ::GetCurrentThreadId();
417
- MutexLock lock(&mutex_);
418
- ThreadIdToThreadLocals* const thread_to_thread_locals =
419
- GetThreadLocalsMapLocked();
420
- ThreadIdToThreadLocals::iterator thread_local_pos =
421
- thread_to_thread_locals->find(current_thread);
422
- if (thread_local_pos == thread_to_thread_locals->end()) {
423
- thread_local_pos = thread_to_thread_locals->insert(
424
- std::make_pair(current_thread, ThreadLocalValues())).first;
425
- StartWatcherThreadFor(current_thread);
426
- }
427
- ThreadLocalValues& thread_local_values = thread_local_pos->second;
428
- ThreadLocalValues::iterator value_pos =
429
- thread_local_values.find(thread_local_instance);
430
- if (value_pos == thread_local_values.end()) {
431
- value_pos =
432
- thread_local_values
433
- .insert(std::make_pair(
434
- thread_local_instance,
435
- linked_ptr<ThreadLocalValueHolderBase>(
436
- thread_local_instance->NewValueForCurrentThread())))
437
- .first;
438
- }
439
- return value_pos->second.get();
440
- }
441
-
442
- static void OnThreadLocalDestroyed(
443
- const ThreadLocalBase* thread_local_instance) {
444
- std::vector<linked_ptr<ThreadLocalValueHolderBase> > value_holders;
445
- // Clean up the ThreadLocalValues data structure while holding the lock, but
446
- // defer the destruction of the ThreadLocalValueHolderBases.
447
- {
448
- MutexLock lock(&mutex_);
449
- ThreadIdToThreadLocals* const thread_to_thread_locals =
450
- GetThreadLocalsMapLocked();
451
- for (ThreadIdToThreadLocals::iterator it =
452
- thread_to_thread_locals->begin();
453
- it != thread_to_thread_locals->end();
454
- ++it) {
455
- ThreadLocalValues& thread_local_values = it->second;
456
- ThreadLocalValues::iterator value_pos =
457
- thread_local_values.find(thread_local_instance);
458
- if (value_pos != thread_local_values.end()) {
459
- value_holders.push_back(value_pos->second);
460
- thread_local_values.erase(value_pos);
461
- // This 'if' can only be successful at most once, so theoretically we
462
- // could break out of the loop here, but we don't bother doing so.
463
- }
464
- }
465
- }
466
- // Outside the lock, let the destructor for 'value_holders' deallocate the
467
- // ThreadLocalValueHolderBases.
468
- }
469
-
470
- static void OnThreadExit(DWORD thread_id) {
471
- GTEST_CHECK_(thread_id != 0) << ::GetLastError();
472
- std::vector<linked_ptr<ThreadLocalValueHolderBase> > value_holders;
473
- // Clean up the ThreadIdToThreadLocals data structure while holding the
474
- // lock, but defer the destruction of the ThreadLocalValueHolderBases.
475
- {
476
- MutexLock lock(&mutex_);
477
- ThreadIdToThreadLocals* const thread_to_thread_locals =
478
- GetThreadLocalsMapLocked();
479
- ThreadIdToThreadLocals::iterator thread_local_pos =
480
- thread_to_thread_locals->find(thread_id);
481
- if (thread_local_pos != thread_to_thread_locals->end()) {
482
- ThreadLocalValues& thread_local_values = thread_local_pos->second;
483
- for (ThreadLocalValues::iterator value_pos =
484
- thread_local_values.begin();
485
- value_pos != thread_local_values.end();
486
- ++value_pos) {
487
- value_holders.push_back(value_pos->second);
488
- }
489
- thread_to_thread_locals->erase(thread_local_pos);
490
- }
491
- }
492
- // Outside the lock, let the destructor for 'value_holders' deallocate the
493
- // ThreadLocalValueHolderBases.
494
- }
495
-
496
- private:
497
- // In a particular thread, maps a ThreadLocal object to its value.
498
- typedef std::map<const ThreadLocalBase*,
499
- linked_ptr<ThreadLocalValueHolderBase> > ThreadLocalValues;
500
- // Stores all ThreadIdToThreadLocals having values in a thread, indexed by
501
- // thread's ID.
502
- typedef std::map<DWORD, ThreadLocalValues> ThreadIdToThreadLocals;
503
-
504
- // Holds the thread id and thread handle that we pass from
505
- // StartWatcherThreadFor to WatcherThreadFunc.
506
- typedef std::pair<DWORD, HANDLE> ThreadIdAndHandle;
507
-
508
- static void StartWatcherThreadFor(DWORD thread_id) {
509
- // The returned handle will be kept in thread_map and closed by
510
- // watcher_thread in WatcherThreadFunc.
511
- HANDLE thread = ::OpenThread(SYNCHRONIZE | THREAD_QUERY_INFORMATION,
512
- FALSE,
513
- thread_id);
514
- GTEST_CHECK_(thread != NULL);
515
- // We need to pass a valid thread ID pointer into CreateThread for it
516
- // to work correctly under Win98.
517
- DWORD watcher_thread_id;
518
- HANDLE watcher_thread = ::CreateThread(
519
- NULL, // Default security.
520
- 0, // Default stack size
521
- &ThreadLocalRegistryImpl::WatcherThreadFunc,
522
- reinterpret_cast<LPVOID>(new ThreadIdAndHandle(thread_id, thread)),
523
- CREATE_SUSPENDED,
524
- &watcher_thread_id);
525
- GTEST_CHECK_(watcher_thread != NULL);
526
- // Give the watcher thread the same priority as ours to avoid being
527
- // blocked by it.
528
- ::SetThreadPriority(watcher_thread,
529
- ::GetThreadPriority(::GetCurrentThread()));
530
- ::ResumeThread(watcher_thread);
531
- ::CloseHandle(watcher_thread);
532
- }
533
-
534
- // Monitors exit from a given thread and notifies those
535
- // ThreadIdToThreadLocals about thread termination.
536
- static DWORD WINAPI WatcherThreadFunc(LPVOID param) {
537
- const ThreadIdAndHandle* tah =
538
- reinterpret_cast<const ThreadIdAndHandle*>(param);
539
- GTEST_CHECK_(
540
- ::WaitForSingleObject(tah->second, INFINITE) == WAIT_OBJECT_0);
541
- OnThreadExit(tah->first);
542
- ::CloseHandle(tah->second);
543
- delete tah;
544
- return 0;
545
- }
546
-
547
- // Returns map of thread local instances.
548
- static ThreadIdToThreadLocals* GetThreadLocalsMapLocked() {
549
- mutex_.AssertHeld();
550
- static ThreadIdToThreadLocals* map = new ThreadIdToThreadLocals;
551
- return map;
552
- }
553
-
554
- // Protects access to GetThreadLocalsMapLocked() and its return value.
555
- static Mutex mutex_;
556
- // Protects access to GetThreadMapLocked() and its return value.
557
- static Mutex thread_map_mutex_;
558
- };
559
-
560
- Mutex ThreadLocalRegistryImpl::mutex_(Mutex::kStaticMutex);
561
- Mutex ThreadLocalRegistryImpl::thread_map_mutex_(Mutex::kStaticMutex);
562
-
563
- ThreadLocalValueHolderBase* ThreadLocalRegistry::GetValueOnCurrentThread(
564
- const ThreadLocalBase* thread_local_instance) {
565
- return ThreadLocalRegistryImpl::GetValueOnCurrentThread(
566
- thread_local_instance);
567
- }
568
-
569
- void ThreadLocalRegistry::OnThreadLocalDestroyed(
570
- const ThreadLocalBase* thread_local_instance) {
571
- ThreadLocalRegistryImpl::OnThreadLocalDestroyed(thread_local_instance);
572
- }
573
-
574
- #endif // GTEST_IS_THREADSAFE && GTEST_OS_WINDOWS
575
-
576
- #if GTEST_USES_POSIX_RE
577
-
578
- // Implements RE. Currently only needed for death tests.
579
-
580
- RE::~RE() {
581
- if (is_valid_) {
582
- // regfree'ing an invalid regex might crash because the content
583
- // of the regex is undefined. Since the regex's are essentially
584
- // the same, one cannot be valid (or invalid) without the other
585
- // being so too.
586
- regfree(&partial_regex_);
587
- regfree(&full_regex_);
588
- }
589
- free(const_cast<char*>(pattern_));
590
- }
591
-
592
- // Returns true iff regular expression re matches the entire str.
593
- bool RE::FullMatch(const char* str, const RE& re) {
594
- if (!re.is_valid_) return false;
595
-
596
- regmatch_t match;
597
- return regexec(&re.full_regex_, str, 1, &match, 0) == 0;
598
- }
599
-
600
- // Returns true iff regular expression re matches a substring of str
601
- // (including str itself).
602
- bool RE::PartialMatch(const char* str, const RE& re) {
603
- if (!re.is_valid_) return false;
604
-
605
- regmatch_t match;
606
- return regexec(&re.partial_regex_, str, 1, &match, 0) == 0;
607
- }
608
-
609
- // Initializes an RE from its string representation.
610
- void RE::Init(const char* regex) {
611
- pattern_ = posix::StrDup(regex);
612
-
613
- // Reserves enough bytes to hold the regular expression used for a
614
- // full match.
615
- const size_t full_regex_len = strlen(regex) + 10;
616
- char* const full_pattern = new char[full_regex_len];
617
-
618
- snprintf(full_pattern, full_regex_len, "^(%s)$", regex);
619
- is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0;
620
- // We want to call regcomp(&partial_regex_, ...) even if the
621
- // previous expression returns false. Otherwise partial_regex_ may
622
- // not be properly initialized can may cause trouble when it's
623
- // freed.
624
- //
625
- // Some implementation of POSIX regex (e.g. on at least some
626
- // versions of Cygwin) doesn't accept the empty string as a valid
627
- // regex. We change it to an equivalent form "()" to be safe.
628
- if (is_valid_) {
629
- const char* const partial_regex = (*regex == '\0') ? "()" : regex;
630
- is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0;
631
- }
632
- EXPECT_TRUE(is_valid_)
633
- << "Regular expression \"" << regex
634
- << "\" is not a valid POSIX Extended regular expression.";
635
-
636
- delete[] full_pattern;
637
- }
638
-
639
- #elif GTEST_USES_SIMPLE_RE
640
-
641
- // Returns true iff ch appears anywhere in str (excluding the
642
- // terminating '\0' character).
643
- bool IsInSet(char ch, const char* str) {
644
- return ch != '\0' && strchr(str, ch) != NULL;
645
- }
646
-
647
- // Returns true iff ch belongs to the given classification. Unlike
648
- // similar functions in <ctype.h>, these aren't affected by the
649
- // current locale.
650
- bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
651
- bool IsAsciiPunct(char ch) {
652
- return IsInSet(ch, "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~");
653
- }
654
- bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
655
- bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
656
- bool IsAsciiWordChar(char ch) {
657
- return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') ||
658
- ('0' <= ch && ch <= '9') || ch == '_';
659
- }
660
-
661
- // Returns true iff "\\c" is a supported escape sequence.
662
- bool IsValidEscape(char c) {
663
- return (IsAsciiPunct(c) || IsInSet(c, "dDfnrsStvwW"));
664
- }
665
-
666
- // Returns true iff the given atom (specified by escaped and pattern)
667
- // matches ch. The result is undefined if the atom is invalid.
668
- bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
669
- if (escaped) { // "\\p" where p is pattern_char.
670
- switch (pattern_char) {
671
- case 'd': return IsAsciiDigit(ch);
672
- case 'D': return !IsAsciiDigit(ch);
673
- case 'f': return ch == '\f';
674
- case 'n': return ch == '\n';
675
- case 'r': return ch == '\r';
676
- case 's': return IsAsciiWhiteSpace(ch);
677
- case 'S': return !IsAsciiWhiteSpace(ch);
678
- case 't': return ch == '\t';
679
- case 'v': return ch == '\v';
680
- case 'w': return IsAsciiWordChar(ch);
681
- case 'W': return !IsAsciiWordChar(ch);
682
- }
683
- return IsAsciiPunct(pattern_char) && pattern_char == ch;
684
- }
685
-
686
- return (pattern_char == '.' && ch != '\n') || pattern_char == ch;
687
- }
688
-
689
- // Helper function used by ValidateRegex() to format error messages.
690
- static std::string FormatRegexSyntaxError(const char* regex, int index) {
691
- return (Message() << "Syntax error at index " << index
692
- << " in simple regular expression \"" << regex << "\": ").GetString();
693
- }
694
-
695
- // Generates non-fatal failures and returns false if regex is invalid;
696
- // otherwise returns true.
697
- bool ValidateRegex(const char* regex) {
698
- if (regex == NULL) {
699
- // TODO(wan@google.com): fix the source file location in the
700
- // assertion failures to match where the regex is used in user
701
- // code.
702
- ADD_FAILURE() << "NULL is not a valid simple regular expression.";
703
- return false;
704
- }
705
-
706
- bool is_valid = true;
707
-
708
- // True iff ?, *, or + can follow the previous atom.
709
- bool prev_repeatable = false;
710
- for (int i = 0; regex[i]; i++) {
711
- if (regex[i] == '\\') { // An escape sequence
712
- i++;
713
- if (regex[i] == '\0') {
714
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)
715
- << "'\\' cannot appear at the end.";
716
- return false;
717
- }
718
-
719
- if (!IsValidEscape(regex[i])) {
720
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)
721
- << "invalid escape sequence \"\\" << regex[i] << "\".";
722
- is_valid = false;
723
- }
724
- prev_repeatable = true;
725
- } else { // Not an escape sequence.
726
- const char ch = regex[i];
727
-
728
- if (ch == '^' && i > 0) {
729
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
730
- << "'^' can only appear at the beginning.";
731
- is_valid = false;
732
- } else if (ch == '$' && regex[i + 1] != '\0') {
733
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
734
- << "'$' can only appear at the end.";
735
- is_valid = false;
736
- } else if (IsInSet(ch, "()[]{}|")) {
737
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
738
- << "'" << ch << "' is unsupported.";
739
- is_valid = false;
740
- } else if (IsRepeat(ch) && !prev_repeatable) {
741
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
742
- << "'" << ch << "' can only follow a repeatable token.";
743
- is_valid = false;
744
- }
745
-
746
- prev_repeatable = !IsInSet(ch, "^$?*+");
747
- }
748
- }
749
-
750
- return is_valid;
751
- }
752
-
753
- // Matches a repeated regex atom followed by a valid simple regular
754
- // expression. The regex atom is defined as c if escaped is false,
755
- // or \c otherwise. repeat is the repetition meta character (?, *,
756
- // or +). The behavior is undefined if str contains too many
757
- // characters to be indexable by size_t, in which case the test will
758
- // probably time out anyway. We are fine with this limitation as
759
- // std::string has it too.
760
- bool MatchRepetitionAndRegexAtHead(
761
- bool escaped, char c, char repeat, const char* regex,
762
- const char* str) {
763
- const size_t min_count = (repeat == '+') ? 1 : 0;
764
- const size_t max_count = (repeat == '?') ? 1 :
765
- static_cast<size_t>(-1) - 1;
766
- // We cannot call numeric_limits::max() as it conflicts with the
767
- // max() macro on Windows.
768
-
769
- for (size_t i = 0; i <= max_count; ++i) {
770
- // We know that the atom matches each of the first i characters in str.
771
- if (i >= min_count && MatchRegexAtHead(regex, str + i)) {
772
- // We have enough matches at the head, and the tail matches too.
773
- // Since we only care about *whether* the pattern matches str
774
- // (as opposed to *how* it matches), there is no need to find a
775
- // greedy match.
776
- return true;
777
- }
778
- if (str[i] == '\0' || !AtomMatchesChar(escaped, c, str[i]))
779
- return false;
780
- }
781
- return false;
782
- }
783
-
784
- // Returns true iff regex matches a prefix of str. regex must be a
785
- // valid simple regular expression and not start with "^", or the
786
- // result is undefined.
787
- bool MatchRegexAtHead(const char* regex, const char* str) {
788
- if (*regex == '\0') // An empty regex matches a prefix of anything.
789
- return true;
790
-
791
- // "$" only matches the end of a string. Note that regex being
792
- // valid guarantees that there's nothing after "$" in it.
793
- if (*regex == '$')
794
- return *str == '\0';
795
-
796
- // Is the first thing in regex an escape sequence?
797
- const bool escaped = *regex == '\\';
798
- if (escaped)
799
- ++regex;
800
- if (IsRepeat(regex[1])) {
801
- // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so
802
- // here's an indirect recursion. It terminates as the regex gets
803
- // shorter in each recursion.
804
- return MatchRepetitionAndRegexAtHead(
805
- escaped, regex[0], regex[1], regex + 2, str);
806
- } else {
807
- // regex isn't empty, isn't "$", and doesn't start with a
808
- // repetition. We match the first atom of regex with the first
809
- // character of str and recurse.
810
- return (*str != '\0') && AtomMatchesChar(escaped, *regex, *str) &&
811
- MatchRegexAtHead(regex + 1, str + 1);
812
- }
813
- }
814
-
815
- // Returns true iff regex matches any substring of str. regex must be
816
- // a valid simple regular expression, or the result is undefined.
817
- //
818
- // The algorithm is recursive, but the recursion depth doesn't exceed
819
- // the regex length, so we won't need to worry about running out of
820
- // stack space normally. In rare cases the time complexity can be
821
- // exponential with respect to the regex length + the string length,
822
- // but usually it's must faster (often close to linear).
823
- bool MatchRegexAnywhere(const char* regex, const char* str) {
824
- if (regex == NULL || str == NULL)
825
- return false;
826
-
827
- if (*regex == '^')
828
- return MatchRegexAtHead(regex + 1, str);
829
-
830
- // A successful match can be anywhere in str.
831
- do {
832
- if (MatchRegexAtHead(regex, str))
833
- return true;
834
- } while (*str++ != '\0');
835
- return false;
836
- }
837
-
838
- // Implements the RE class.
839
-
840
- RE::~RE() {
841
- free(const_cast<char*>(pattern_));
842
- free(const_cast<char*>(full_pattern_));
843
- }
844
-
845
- // Returns true iff regular expression re matches the entire str.
846
- bool RE::FullMatch(const char* str, const RE& re) {
847
- return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str);
848
- }
849
-
850
- // Returns true iff regular expression re matches a substring of str
851
- // (including str itself).
852
- bool RE::PartialMatch(const char* str, const RE& re) {
853
- return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str);
854
- }
855
-
856
- // Initializes an RE from its string representation.
857
- void RE::Init(const char* regex) {
858
- pattern_ = full_pattern_ = NULL;
859
- if (regex != NULL) {
860
- pattern_ = posix::StrDup(regex);
861
- }
862
-
863
- is_valid_ = ValidateRegex(regex);
864
- if (!is_valid_) {
865
- // No need to calculate the full pattern when the regex is invalid.
866
- return;
867
- }
868
-
869
- const size_t len = strlen(regex);
870
- // Reserves enough bytes to hold the regular expression used for a
871
- // full match: we need space to prepend a '^', append a '$', and
872
- // terminate the string with '\0'.
873
- char* buffer = static_cast<char*>(malloc(len + 3));
874
- full_pattern_ = buffer;
875
-
876
- if (*regex != '^')
877
- *buffer++ = '^'; // Makes sure full_pattern_ starts with '^'.
878
-
879
- // We don't use snprintf or strncpy, as they trigger a warning when
880
- // compiled with VC++ 8.0.
881
- memcpy(buffer, regex, len);
882
- buffer += len;
883
-
884
- if (len == 0 || regex[len - 1] != '$')
885
- *buffer++ = '$'; // Makes sure full_pattern_ ends with '$'.
886
-
887
- *buffer = '\0';
888
- }
889
-
890
- #endif // GTEST_USES_POSIX_RE
891
-
892
- const char kUnknownFile[] = "unknown file";
893
-
894
- // Formats a source file path and a line number as they would appear
895
- // in an error message from the compiler used to compile this code.
896
- GTEST_API_ ::std::string FormatFileLocation(const char* file, int line) {
897
- const std::string file_name(file == NULL ? kUnknownFile : file);
898
-
899
- if (line < 0) {
900
- return file_name + ":";
901
- }
902
- #ifdef _MSC_VER
903
- return file_name + "(" + StreamableToString(line) + "):";
904
- #else
905
- return file_name + ":" + StreamableToString(line) + ":";
906
- #endif // _MSC_VER
907
- }
908
-
909
- // Formats a file location for compiler-independent XML output.
910
- // Although this function is not platform dependent, we put it next to
911
- // FormatFileLocation in order to contrast the two functions.
912
- // Note that FormatCompilerIndependentFileLocation() does NOT append colon
913
- // to the file location it produces, unlike FormatFileLocation().
914
- GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
915
- const char* file, int line) {
916
- const std::string file_name(file == NULL ? kUnknownFile : file);
917
-
918
- if (line < 0)
919
- return file_name;
920
- else
921
- return file_name + ":" + StreamableToString(line);
922
- }
923
-
924
- GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)
925
- : severity_(severity) {
926
- const char* const marker =
927
- severity == GTEST_INFO ? "[ INFO ]" :
928
- severity == GTEST_WARNING ? "[WARNING]" :
929
- severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]";
930
- GetStream() << ::std::endl << marker << " "
931
- << FormatFileLocation(file, line).c_str() << ": ";
932
- }
933
-
934
- // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
935
- GTestLog::~GTestLog() {
936
- GetStream() << ::std::endl;
937
- if (severity_ == GTEST_FATAL) {
938
- fflush(stderr);
939
- posix::Abort();
940
- }
941
- }
942
-
943
- // Disable Microsoft deprecation warnings for POSIX functions called from
944
- // this class (creat, dup, dup2, and close)
945
- GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)
946
-
947
- #if GTEST_HAS_STREAM_REDIRECTION
948
-
949
- // Object that captures an output stream (stdout/stderr).
950
- class CapturedStream {
951
- public:
952
- // The ctor redirects the stream to a temporary file.
953
- explicit CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
954
- # if GTEST_OS_WINDOWS
955
- char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT
956
- char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT
957
-
958
- ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);
959
- const UINT success = ::GetTempFileNameA(temp_dir_path,
960
- "gtest_redir",
961
- 0, // Generate unique file name.
962
- temp_file_path);
963
- GTEST_CHECK_(success != 0)
964
- << "Unable to create a temporary file in " << temp_dir_path;
965
- const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);
966
- GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file "
967
- << temp_file_path;
968
- filename_ = temp_file_path;
969
- # else
970
- // There's no guarantee that a test has write access to the current
971
- // directory, so we create the temporary file in the /tmp directory
972
- // instead. We use /tmp on most systems, and /sdcard on Android.
973
- // That's because Android doesn't have /tmp.
974
- # if GTEST_OS_LINUX_ANDROID
975
- // Note: Android applications are expected to call the framework's
976
- // Context.getExternalStorageDirectory() method through JNI to get
977
- // the location of the world-writable SD Card directory. However,
978
- // this requires a Context handle, which cannot be retrieved
979
- // globally from native code. Doing so also precludes running the
980
- // code as part of a regular standalone executable, which doesn't
981
- // run in a Dalvik process (e.g. when running it through 'adb shell').
982
- //
983
- // The location /sdcard is directly accessible from native code
984
- // and is the only location (unofficially) supported by the Android
985
- // team. It's generally a symlink to the real SD Card mount point
986
- // which can be /mnt/sdcard, /mnt/sdcard0, /system/media/sdcard, or
987
- // other OEM-customized locations. Never rely on these, and always
988
- // use /sdcard.
989
- char name_template[] = "/sdcard/gtest_captured_stream.XXXXXX";
990
- # else
991
- char name_template[] = "/tmp/captured_stream.XXXXXX";
992
- # endif // GTEST_OS_LINUX_ANDROID
993
- const int captured_fd = mkstemp(name_template);
994
- filename_ = name_template;
995
- # endif // GTEST_OS_WINDOWS
996
- fflush(NULL);
997
- dup2(captured_fd, fd_);
998
- close(captured_fd);
999
- }
1000
-
1001
- ~CapturedStream() {
1002
- remove(filename_.c_str());
1003
- }
1004
-
1005
- std::string GetCapturedString() {
1006
- if (uncaptured_fd_ != -1) {
1007
- // Restores the original stream.
1008
- fflush(NULL);
1009
- dup2(uncaptured_fd_, fd_);
1010
- close(uncaptured_fd_);
1011
- uncaptured_fd_ = -1;
1012
- }
1013
-
1014
- FILE* const file = posix::FOpen(filename_.c_str(), "r");
1015
- const std::string content = ReadEntireFile(file);
1016
- posix::FClose(file);
1017
- return content;
1018
- }
1019
-
1020
- private:
1021
- const int fd_; // A stream to capture.
1022
- int uncaptured_fd_;
1023
- // Name of the temporary file holding the stderr output.
1024
- ::std::string filename_;
1025
-
1026
- GTEST_DISALLOW_COPY_AND_ASSIGN_(CapturedStream);
1027
- };
1028
-
1029
- GTEST_DISABLE_MSC_WARNINGS_POP_()
1030
-
1031
- static CapturedStream* g_captured_stderr = NULL;
1032
- static CapturedStream* g_captured_stdout = NULL;
1033
-
1034
- // Starts capturing an output stream (stdout/stderr).
1035
- static void CaptureStream(int fd, const char* stream_name,
1036
- CapturedStream** stream) {
1037
- if (*stream != NULL) {
1038
- GTEST_LOG_(FATAL) << "Only one " << stream_name
1039
- << " capturer can exist at a time.";
1040
- }
1041
- *stream = new CapturedStream(fd);
1042
- }
1043
-
1044
- // Stops capturing the output stream and returns the captured string.
1045
- static std::string GetCapturedStream(CapturedStream** captured_stream) {
1046
- const std::string content = (*captured_stream)->GetCapturedString();
1047
-
1048
- delete *captured_stream;
1049
- *captured_stream = NULL;
1050
-
1051
- return content;
1052
- }
1053
-
1054
- // Starts capturing stdout.
1055
- void CaptureStdout() {
1056
- CaptureStream(kStdOutFileno, "stdout", &g_captured_stdout);
1057
- }
1058
-
1059
- // Starts capturing stderr.
1060
- void CaptureStderr() {
1061
- CaptureStream(kStdErrFileno, "stderr", &g_captured_stderr);
1062
- }
1063
-
1064
- // Stops capturing stdout and returns the captured string.
1065
- std::string GetCapturedStdout() {
1066
- return GetCapturedStream(&g_captured_stdout);
1067
- }
1068
-
1069
- // Stops capturing stderr and returns the captured string.
1070
- std::string GetCapturedStderr() {
1071
- return GetCapturedStream(&g_captured_stderr);
1072
- }
1073
-
1074
- #endif // GTEST_HAS_STREAM_REDIRECTION
1075
-
1076
-
1077
-
1078
-
1079
-
1080
- size_t GetFileSize(FILE* file) {
1081
- fseek(file, 0, SEEK_END);
1082
- return static_cast<size_t>(ftell(file));
1083
- }
1084
-
1085
- std::string ReadEntireFile(FILE* file) {
1086
- const size_t file_size = GetFileSize(file);
1087
- char* const buffer = new char[file_size];
1088
-
1089
- size_t bytes_last_read = 0; // # of bytes read in the last fread()
1090
- size_t bytes_read = 0; // # of bytes read so far
1091
-
1092
- fseek(file, 0, SEEK_SET);
1093
-
1094
- // Keeps reading the file until we cannot read further or the
1095
- // pre-determined file size is reached.
1096
- do {
1097
- bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file);
1098
- bytes_read += bytes_last_read;
1099
- } while (bytes_last_read > 0 && bytes_read < file_size);
1100
-
1101
- const std::string content(buffer, bytes_read);
1102
- delete[] buffer;
1103
-
1104
- return content;
1105
- }
1106
-
1107
- #if GTEST_HAS_DEATH_TEST
1108
- static const std::vector<std::string>* g_injected_test_argvs = NULL; // Owned.
1109
-
1110
- std::vector<std::string> GetInjectableArgvs() {
1111
- if (g_injected_test_argvs != NULL) {
1112
- return *g_injected_test_argvs;
1113
- }
1114
- return GetArgvs();
1115
- }
1116
-
1117
- void SetInjectableArgvs(const std::vector<std::string>* new_argvs) {
1118
- if (g_injected_test_argvs != new_argvs) delete g_injected_test_argvs;
1119
- g_injected_test_argvs = new_argvs;
1120
- }
1121
-
1122
- void SetInjectableArgvs(const std::vector<std::string>& new_argvs) {
1123
- SetInjectableArgvs(
1124
- new std::vector<std::string>(new_argvs.begin(), new_argvs.end()));
1125
- }
1126
-
1127
- #if GTEST_HAS_GLOBAL_STRING
1128
- void SetInjectableArgvs(const std::vector< ::string>& new_argvs) {
1129
- SetInjectableArgvs(
1130
- new std::vector<std::string>(new_argvs.begin(), new_argvs.end()));
1131
- }
1132
- #endif // GTEST_HAS_GLOBAL_STRING
1133
-
1134
- void ClearInjectableArgvs() {
1135
- delete g_injected_test_argvs;
1136
- g_injected_test_argvs = NULL;
1137
- }
1138
- #endif // GTEST_HAS_DEATH_TEST
1139
-
1140
- #if GTEST_OS_WINDOWS_MOBILE
1141
- namespace posix {
1142
- void Abort() {
1143
- DebugBreak();
1144
- TerminateProcess(GetCurrentProcess(), 1);
1145
- }
1146
- } // namespace posix
1147
- #endif // GTEST_OS_WINDOWS_MOBILE
1148
-
1149
- // Returns the name of the environment variable corresponding to the
1150
- // given flag. For example, FlagToEnvVar("foo") will return
1151
- // "GTEST_FOO" in the open-source version.
1152
- static std::string FlagToEnvVar(const char* flag) {
1153
- const std::string full_flag =
1154
- (Message() << GTEST_FLAG_PREFIX_ << flag).GetString();
1155
-
1156
- Message env_var;
1157
- for (size_t i = 0; i != full_flag.length(); i++) {
1158
- env_var << ToUpper(full_flag.c_str()[i]);
1159
- }
1160
-
1161
- return env_var.GetString();
1162
- }
1163
-
1164
- // Parses 'str' for a 32-bit signed integer. If successful, writes
1165
- // the result to *value and returns true; otherwise leaves *value
1166
- // unchanged and returns false.
1167
- bool ParseInt32(const Message& src_text, const char* str, Int32* value) {
1168
- // Parses the environment variable as a decimal integer.
1169
- char* end = NULL;
1170
- const long long_value = strtol(str, &end, 10); // NOLINT
1171
-
1172
- // Has strtol() consumed all characters in the string?
1173
- if (*end != '\0') {
1174
- // No - an invalid character was encountered.
1175
- Message msg;
1176
- msg << "WARNING: " << src_text
1177
- << " is expected to be a 32-bit integer, but actually"
1178
- << " has value \"" << str << "\".\n";
1179
- printf("%s", msg.GetString().c_str());
1180
- fflush(stdout);
1181
- return false;
1182
- }
1183
-
1184
- // Is the parsed value in the range of an Int32?
1185
- const Int32 result = static_cast<Int32>(long_value);
1186
- if (long_value == LONG_MAX || long_value == LONG_MIN ||
1187
- // The parsed value overflows as a long. (strtol() returns
1188
- // LONG_MAX or LONG_MIN when the input overflows.)
1189
- result != long_value
1190
- // The parsed value overflows as an Int32.
1191
- ) {
1192
- Message msg;
1193
- msg << "WARNING: " << src_text
1194
- << " is expected to be a 32-bit integer, but actually"
1195
- << " has value " << str << ", which overflows.\n";
1196
- printf("%s", msg.GetString().c_str());
1197
- fflush(stdout);
1198
- return false;
1199
- }
1200
-
1201
- *value = result;
1202
- return true;
1203
- }
1204
-
1205
- // Reads and returns the Boolean environment variable corresponding to
1206
- // the given flag; if it's not set, returns default_value.
1207
- //
1208
- // The value is considered true iff it's not "0".
1209
- bool BoolFromGTestEnv(const char* flag, bool default_value) {
1210
- #if defined(GTEST_GET_BOOL_FROM_ENV_)
1211
- return GTEST_GET_BOOL_FROM_ENV_(flag, default_value);
1212
- #else
1213
- const std::string env_var = FlagToEnvVar(flag);
1214
- const char* const string_value = posix::GetEnv(env_var.c_str());
1215
- return string_value == NULL ?
1216
- default_value : strcmp(string_value, "0") != 0;
1217
- #endif // defined(GTEST_GET_BOOL_FROM_ENV_)
1218
- }
1219
-
1220
- // Reads and returns a 32-bit integer stored in the environment
1221
- // variable corresponding to the given flag; if it isn't set or
1222
- // doesn't represent a valid 32-bit integer, returns default_value.
1223
- Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
1224
- #if defined(GTEST_GET_INT32_FROM_ENV_)
1225
- return GTEST_GET_INT32_FROM_ENV_(flag, default_value);
1226
- #else
1227
- const std::string env_var = FlagToEnvVar(flag);
1228
- const char* const string_value = posix::GetEnv(env_var.c_str());
1229
- if (string_value == NULL) {
1230
- // The environment variable is not set.
1231
- return default_value;
1232
- }
1233
-
1234
- Int32 result = default_value;
1235
- if (!ParseInt32(Message() << "Environment variable " << env_var,
1236
- string_value, &result)) {
1237
- printf("The default value %s is used.\n",
1238
- (Message() << default_value).GetString().c_str());
1239
- fflush(stdout);
1240
- return default_value;
1241
- }
1242
-
1243
- return result;
1244
- #endif // defined(GTEST_GET_INT32_FROM_ENV_)
1245
- }
1246
-
1247
- // As a special case for the 'output' flag, if GTEST_OUTPUT is not
1248
- // set, we look for XML_OUTPUT_FILE, which is set by the Bazel build
1249
- // system. The value of XML_OUTPUT_FILE is a filename without the
1250
- // "xml:" prefix of GTEST_OUTPUT.
1251
- // Note that this is meant to be called at the call site so it does
1252
- // not check that the flag is 'output'
1253
- // In essence this checks an env variable called XML_OUTPUT_FILE
1254
- // and if it is set we prepend "xml:" to its value, if it not set we return ""
1255
- std::string OutputFlagAlsoCheckEnvVar(){
1256
- std::string default_value_for_output_flag = "";
1257
- const char* xml_output_file_env = posix::GetEnv("XML_OUTPUT_FILE");
1258
- if (NULL != xml_output_file_env) {
1259
- default_value_for_output_flag = std::string("xml:") + xml_output_file_env;
1260
- }
1261
- return default_value_for_output_flag;
1262
- }
1263
-
1264
- // Reads and returns the string environment variable corresponding to
1265
- // the given flag; if it's not set, returns default_value.
1266
- const char* StringFromGTestEnv(const char* flag, const char* default_value) {
1267
- #if defined(GTEST_GET_STRING_FROM_ENV_)
1268
- return GTEST_GET_STRING_FROM_ENV_(flag, default_value);
1269
- #else
1270
- const std::string env_var = FlagToEnvVar(flag);
1271
- const char* const value = posix::GetEnv(env_var.c_str());
1272
- return value == NULL ? default_value : value;
1273
- #endif // defined(GTEST_GET_STRING_FROM_ENV_)
1274
- }
1275
-
1276
- } // namespace internal
1277
- } // namespace testing