@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,2427 +0,0 @@
1
- // Copyright 2006, 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
- // This file is AUTOMATICALLY GENERATED on 01/02/2018 by command
31
- // 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND!
32
-
33
- // Regression test for gtest_pred_impl.h
34
- //
35
- // This file is generated by a script and quite long. If you intend to
36
- // learn how Google Test works by reading its unit tests, read
37
- // gtest_unittest.cc instead.
38
- //
39
- // This is intended as a regression test for the Google Test predicate
40
- // assertions. We compile it as part of the gtest_unittest target
41
- // only to keep the implementation tidy and compact, as it is quite
42
- // involved to set up the stage for testing Google Test using Google
43
- // Test itself.
44
- //
45
- // Currently, gtest_unittest takes ~11 seconds to run in the testing
46
- // daemon. In the future, if it grows too large and needs much more
47
- // time to finish, we should consider separating this file into a
48
- // stand-alone regression test.
49
-
50
- #include <iostream>
51
-
52
- #include "gtest/gtest.h"
53
- #include "gtest/gtest-spi.h"
54
-
55
- // A user-defined data type.
56
- struct Bool {
57
- explicit Bool(int val) : value(val != 0) {}
58
-
59
- bool operator>(int n) const { return value > Bool(n).value; }
60
-
61
- Bool operator+(const Bool& rhs) const { return Bool(value + rhs.value); }
62
-
63
- bool operator==(const Bool& rhs) const { return value == rhs.value; }
64
-
65
- bool value;
66
- };
67
-
68
- // Enables Bool to be used in assertions.
69
- std::ostream& operator<<(std::ostream& os, const Bool& x) {
70
- return os << (x.value ? "true" : "false");
71
- }
72
-
73
- // Sample functions/functors for testing unary predicate assertions.
74
-
75
- // A unary predicate function.
76
- template <typename T1>
77
- bool PredFunction1(T1 v1) {
78
- return v1 > 0;
79
- }
80
-
81
- // The following two functions are needed to circumvent a bug in
82
- // gcc 2.95.3, which sometimes has problem with the above template
83
- // function.
84
- bool PredFunction1Int(int v1) {
85
- return v1 > 0;
86
- }
87
- bool PredFunction1Bool(Bool v1) {
88
- return v1 > 0;
89
- }
90
-
91
- // A unary predicate functor.
92
- struct PredFunctor1 {
93
- template <typename T1>
94
- bool operator()(const T1& v1) {
95
- return v1 > 0;
96
- }
97
- };
98
-
99
- // A unary predicate-formatter function.
100
- template <typename T1>
101
- testing::AssertionResult PredFormatFunction1(const char* e1,
102
- const T1& v1) {
103
- if (PredFunction1(v1))
104
- return testing::AssertionSuccess();
105
-
106
- return testing::AssertionFailure()
107
- << e1
108
- << " is expected to be positive, but evaluates to "
109
- << v1 << ".";
110
- }
111
-
112
- // A unary predicate-formatter functor.
113
- struct PredFormatFunctor1 {
114
- template <typename T1>
115
- testing::AssertionResult operator()(const char* e1,
116
- const T1& v1) const {
117
- return PredFormatFunction1(e1, v1);
118
- }
119
- };
120
-
121
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT1.
122
-
123
- class Predicate1Test : public testing::Test {
124
- protected:
125
- virtual void SetUp() {
126
- expected_to_finish_ = true;
127
- finished_ = false;
128
- n1_ = 0;
129
- }
130
-
131
- virtual void TearDown() {
132
- // Verifies that each of the predicate's arguments was evaluated
133
- // exactly once.
134
- EXPECT_EQ(1, n1_) <<
135
- "The predicate assertion didn't evaluate argument 2 "
136
- "exactly once.";
137
-
138
- // Verifies that the control flow in the test function is expected.
139
- if (expected_to_finish_ && !finished_) {
140
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
141
- } else if (!expected_to_finish_ && finished_) {
142
- FAIL() << "The failed predicate assertion didn't abort the test "
143
- "as expected.";
144
- }
145
- }
146
-
147
- // true iff the test function is expected to run to finish.
148
- static bool expected_to_finish_;
149
-
150
- // true iff the test function did run to finish.
151
- static bool finished_;
152
-
153
- static int n1_;
154
- };
155
-
156
- bool Predicate1Test::expected_to_finish_;
157
- bool Predicate1Test::finished_;
158
- int Predicate1Test::n1_;
159
-
160
- typedef Predicate1Test EXPECT_PRED_FORMAT1Test;
161
- typedef Predicate1Test ASSERT_PRED_FORMAT1Test;
162
- typedef Predicate1Test EXPECT_PRED1Test;
163
- typedef Predicate1Test ASSERT_PRED1Test;
164
-
165
- // Tests a successful EXPECT_PRED1 where the
166
- // predicate-formatter is a function on a built-in type (int).
167
- TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeSuccess) {
168
- EXPECT_PRED1(PredFunction1Int,
169
- ++n1_);
170
- finished_ = true;
171
- }
172
-
173
- // Tests a successful EXPECT_PRED1 where the
174
- // predicate-formatter is a function on a user-defined type (Bool).
175
- TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeSuccess) {
176
- EXPECT_PRED1(PredFunction1Bool,
177
- Bool(++n1_));
178
- finished_ = true;
179
- }
180
-
181
- // Tests a successful EXPECT_PRED1 where the
182
- // predicate-formatter is a functor on a built-in type (int).
183
- TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeSuccess) {
184
- EXPECT_PRED1(PredFunctor1(),
185
- ++n1_);
186
- finished_ = true;
187
- }
188
-
189
- // Tests a successful EXPECT_PRED1 where the
190
- // predicate-formatter is a functor on a user-defined type (Bool).
191
- TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeSuccess) {
192
- EXPECT_PRED1(PredFunctor1(),
193
- Bool(++n1_));
194
- finished_ = true;
195
- }
196
-
197
- // Tests a failed EXPECT_PRED1 where the
198
- // predicate-formatter is a function on a built-in type (int).
199
- TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeFailure) {
200
- EXPECT_NONFATAL_FAILURE({ // NOLINT
201
- EXPECT_PRED1(PredFunction1Int,
202
- n1_++);
203
- finished_ = true;
204
- }, "");
205
- }
206
-
207
- // Tests a failed EXPECT_PRED1 where the
208
- // predicate-formatter is a function on a user-defined type (Bool).
209
- TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeFailure) {
210
- EXPECT_NONFATAL_FAILURE({ // NOLINT
211
- EXPECT_PRED1(PredFunction1Bool,
212
- Bool(n1_++));
213
- finished_ = true;
214
- }, "");
215
- }
216
-
217
- // Tests a failed EXPECT_PRED1 where the
218
- // predicate-formatter is a functor on a built-in type (int).
219
- TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeFailure) {
220
- EXPECT_NONFATAL_FAILURE({ // NOLINT
221
- EXPECT_PRED1(PredFunctor1(),
222
- n1_++);
223
- finished_ = true;
224
- }, "");
225
- }
226
-
227
- // Tests a failed EXPECT_PRED1 where the
228
- // predicate-formatter is a functor on a user-defined type (Bool).
229
- TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeFailure) {
230
- EXPECT_NONFATAL_FAILURE({ // NOLINT
231
- EXPECT_PRED1(PredFunctor1(),
232
- Bool(n1_++));
233
- finished_ = true;
234
- }, "");
235
- }
236
-
237
- // Tests a successful ASSERT_PRED1 where the
238
- // predicate-formatter is a function on a built-in type (int).
239
- TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeSuccess) {
240
- ASSERT_PRED1(PredFunction1Int,
241
- ++n1_);
242
- finished_ = true;
243
- }
244
-
245
- // Tests a successful ASSERT_PRED1 where the
246
- // predicate-formatter is a function on a user-defined type (Bool).
247
- TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeSuccess) {
248
- ASSERT_PRED1(PredFunction1Bool,
249
- Bool(++n1_));
250
- finished_ = true;
251
- }
252
-
253
- // Tests a successful ASSERT_PRED1 where the
254
- // predicate-formatter is a functor on a built-in type (int).
255
- TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeSuccess) {
256
- ASSERT_PRED1(PredFunctor1(),
257
- ++n1_);
258
- finished_ = true;
259
- }
260
-
261
- // Tests a successful ASSERT_PRED1 where the
262
- // predicate-formatter is a functor on a user-defined type (Bool).
263
- TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeSuccess) {
264
- ASSERT_PRED1(PredFunctor1(),
265
- Bool(++n1_));
266
- finished_ = true;
267
- }
268
-
269
- // Tests a failed ASSERT_PRED1 where the
270
- // predicate-formatter is a function on a built-in type (int).
271
- TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeFailure) {
272
- expected_to_finish_ = false;
273
- EXPECT_FATAL_FAILURE({ // NOLINT
274
- ASSERT_PRED1(PredFunction1Int,
275
- n1_++);
276
- finished_ = true;
277
- }, "");
278
- }
279
-
280
- // Tests a failed ASSERT_PRED1 where the
281
- // predicate-formatter is a function on a user-defined type (Bool).
282
- TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeFailure) {
283
- expected_to_finish_ = false;
284
- EXPECT_FATAL_FAILURE({ // NOLINT
285
- ASSERT_PRED1(PredFunction1Bool,
286
- Bool(n1_++));
287
- finished_ = true;
288
- }, "");
289
- }
290
-
291
- // Tests a failed ASSERT_PRED1 where the
292
- // predicate-formatter is a functor on a built-in type (int).
293
- TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeFailure) {
294
- expected_to_finish_ = false;
295
- EXPECT_FATAL_FAILURE({ // NOLINT
296
- ASSERT_PRED1(PredFunctor1(),
297
- n1_++);
298
- finished_ = true;
299
- }, "");
300
- }
301
-
302
- // Tests a failed ASSERT_PRED1 where the
303
- // predicate-formatter is a functor on a user-defined type (Bool).
304
- TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeFailure) {
305
- expected_to_finish_ = false;
306
- EXPECT_FATAL_FAILURE({ // NOLINT
307
- ASSERT_PRED1(PredFunctor1(),
308
- Bool(n1_++));
309
- finished_ = true;
310
- }, "");
311
- }
312
-
313
- // Tests a successful EXPECT_PRED_FORMAT1 where the
314
- // predicate-formatter is a function on a built-in type (int).
315
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) {
316
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
317
- ++n1_);
318
- finished_ = true;
319
- }
320
-
321
- // Tests a successful EXPECT_PRED_FORMAT1 where the
322
- // predicate-formatter is a function on a user-defined type (Bool).
323
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) {
324
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
325
- Bool(++n1_));
326
- finished_ = true;
327
- }
328
-
329
- // Tests a successful EXPECT_PRED_FORMAT1 where the
330
- // predicate-formatter is a functor on a built-in type (int).
331
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) {
332
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
333
- ++n1_);
334
- finished_ = true;
335
- }
336
-
337
- // Tests a successful EXPECT_PRED_FORMAT1 where the
338
- // predicate-formatter is a functor on a user-defined type (Bool).
339
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) {
340
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
341
- Bool(++n1_));
342
- finished_ = true;
343
- }
344
-
345
- // Tests a failed EXPECT_PRED_FORMAT1 where the
346
- // predicate-formatter is a function on a built-in type (int).
347
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) {
348
- EXPECT_NONFATAL_FAILURE({ // NOLINT
349
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
350
- n1_++);
351
- finished_ = true;
352
- }, "");
353
- }
354
-
355
- // Tests a failed EXPECT_PRED_FORMAT1 where the
356
- // predicate-formatter is a function on a user-defined type (Bool).
357
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) {
358
- EXPECT_NONFATAL_FAILURE({ // NOLINT
359
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
360
- Bool(n1_++));
361
- finished_ = true;
362
- }, "");
363
- }
364
-
365
- // Tests a failed EXPECT_PRED_FORMAT1 where the
366
- // predicate-formatter is a functor on a built-in type (int).
367
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) {
368
- EXPECT_NONFATAL_FAILURE({ // NOLINT
369
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
370
- n1_++);
371
- finished_ = true;
372
- }, "");
373
- }
374
-
375
- // Tests a failed EXPECT_PRED_FORMAT1 where the
376
- // predicate-formatter is a functor on a user-defined type (Bool).
377
- TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) {
378
- EXPECT_NONFATAL_FAILURE({ // NOLINT
379
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
380
- Bool(n1_++));
381
- finished_ = true;
382
- }, "");
383
- }
384
-
385
- // Tests a successful ASSERT_PRED_FORMAT1 where the
386
- // predicate-formatter is a function on a built-in type (int).
387
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) {
388
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
389
- ++n1_);
390
- finished_ = true;
391
- }
392
-
393
- // Tests a successful ASSERT_PRED_FORMAT1 where the
394
- // predicate-formatter is a function on a user-defined type (Bool).
395
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) {
396
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
397
- Bool(++n1_));
398
- finished_ = true;
399
- }
400
-
401
- // Tests a successful ASSERT_PRED_FORMAT1 where the
402
- // predicate-formatter is a functor on a built-in type (int).
403
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) {
404
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
405
- ++n1_);
406
- finished_ = true;
407
- }
408
-
409
- // Tests a successful ASSERT_PRED_FORMAT1 where the
410
- // predicate-formatter is a functor on a user-defined type (Bool).
411
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) {
412
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
413
- Bool(++n1_));
414
- finished_ = true;
415
- }
416
-
417
- // Tests a failed ASSERT_PRED_FORMAT1 where the
418
- // predicate-formatter is a function on a built-in type (int).
419
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) {
420
- expected_to_finish_ = false;
421
- EXPECT_FATAL_FAILURE({ // NOLINT
422
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
423
- n1_++);
424
- finished_ = true;
425
- }, "");
426
- }
427
-
428
- // Tests a failed ASSERT_PRED_FORMAT1 where the
429
- // predicate-formatter is a function on a user-defined type (Bool).
430
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) {
431
- expected_to_finish_ = false;
432
- EXPECT_FATAL_FAILURE({ // NOLINT
433
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
434
- Bool(n1_++));
435
- finished_ = true;
436
- }, "");
437
- }
438
-
439
- // Tests a failed ASSERT_PRED_FORMAT1 where the
440
- // predicate-formatter is a functor on a built-in type (int).
441
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) {
442
- expected_to_finish_ = false;
443
- EXPECT_FATAL_FAILURE({ // NOLINT
444
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
445
- n1_++);
446
- finished_ = true;
447
- }, "");
448
- }
449
-
450
- // Tests a failed ASSERT_PRED_FORMAT1 where the
451
- // predicate-formatter is a functor on a user-defined type (Bool).
452
- TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) {
453
- expected_to_finish_ = false;
454
- EXPECT_FATAL_FAILURE({ // NOLINT
455
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
456
- Bool(n1_++));
457
- finished_ = true;
458
- }, "");
459
- }
460
- // Sample functions/functors for testing binary predicate assertions.
461
-
462
- // A binary predicate function.
463
- template <typename T1, typename T2>
464
- bool PredFunction2(T1 v1, T2 v2) {
465
- return v1 + v2 > 0;
466
- }
467
-
468
- // The following two functions are needed to circumvent a bug in
469
- // gcc 2.95.3, which sometimes has problem with the above template
470
- // function.
471
- bool PredFunction2Int(int v1, int v2) {
472
- return v1 + v2 > 0;
473
- }
474
- bool PredFunction2Bool(Bool v1, Bool v2) {
475
- return v1 + v2 > 0;
476
- }
477
-
478
- // A binary predicate functor.
479
- struct PredFunctor2 {
480
- template <typename T1, typename T2>
481
- bool operator()(const T1& v1,
482
- const T2& v2) {
483
- return v1 + v2 > 0;
484
- }
485
- };
486
-
487
- // A binary predicate-formatter function.
488
- template <typename T1, typename T2>
489
- testing::AssertionResult PredFormatFunction2(const char* e1,
490
- const char* e2,
491
- const T1& v1,
492
- const T2& v2) {
493
- if (PredFunction2(v1, v2))
494
- return testing::AssertionSuccess();
495
-
496
- return testing::AssertionFailure()
497
- << e1 << " + " << e2
498
- << " is expected to be positive, but evaluates to "
499
- << v1 + v2 << ".";
500
- }
501
-
502
- // A binary predicate-formatter functor.
503
- struct PredFormatFunctor2 {
504
- template <typename T1, typename T2>
505
- testing::AssertionResult operator()(const char* e1,
506
- const char* e2,
507
- const T1& v1,
508
- const T2& v2) const {
509
- return PredFormatFunction2(e1, e2, v1, v2);
510
- }
511
- };
512
-
513
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT2.
514
-
515
- class Predicate2Test : public testing::Test {
516
- protected:
517
- virtual void SetUp() {
518
- expected_to_finish_ = true;
519
- finished_ = false;
520
- n1_ = n2_ = 0;
521
- }
522
-
523
- virtual void TearDown() {
524
- // Verifies that each of the predicate's arguments was evaluated
525
- // exactly once.
526
- EXPECT_EQ(1, n1_) <<
527
- "The predicate assertion didn't evaluate argument 2 "
528
- "exactly once.";
529
- EXPECT_EQ(1, n2_) <<
530
- "The predicate assertion didn't evaluate argument 3 "
531
- "exactly once.";
532
-
533
- // Verifies that the control flow in the test function is expected.
534
- if (expected_to_finish_ && !finished_) {
535
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
536
- } else if (!expected_to_finish_ && finished_) {
537
- FAIL() << "The failed predicate assertion didn't abort the test "
538
- "as expected.";
539
- }
540
- }
541
-
542
- // true iff the test function is expected to run to finish.
543
- static bool expected_to_finish_;
544
-
545
- // true iff the test function did run to finish.
546
- static bool finished_;
547
-
548
- static int n1_;
549
- static int n2_;
550
- };
551
-
552
- bool Predicate2Test::expected_to_finish_;
553
- bool Predicate2Test::finished_;
554
- int Predicate2Test::n1_;
555
- int Predicate2Test::n2_;
556
-
557
- typedef Predicate2Test EXPECT_PRED_FORMAT2Test;
558
- typedef Predicate2Test ASSERT_PRED_FORMAT2Test;
559
- typedef Predicate2Test EXPECT_PRED2Test;
560
- typedef Predicate2Test ASSERT_PRED2Test;
561
-
562
- // Tests a successful EXPECT_PRED2 where the
563
- // predicate-formatter is a function on a built-in type (int).
564
- TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeSuccess) {
565
- EXPECT_PRED2(PredFunction2Int,
566
- ++n1_,
567
- ++n2_);
568
- finished_ = true;
569
- }
570
-
571
- // Tests a successful EXPECT_PRED2 where the
572
- // predicate-formatter is a function on a user-defined type (Bool).
573
- TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeSuccess) {
574
- EXPECT_PRED2(PredFunction2Bool,
575
- Bool(++n1_),
576
- Bool(++n2_));
577
- finished_ = true;
578
- }
579
-
580
- // Tests a successful EXPECT_PRED2 where the
581
- // predicate-formatter is a functor on a built-in type (int).
582
- TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeSuccess) {
583
- EXPECT_PRED2(PredFunctor2(),
584
- ++n1_,
585
- ++n2_);
586
- finished_ = true;
587
- }
588
-
589
- // Tests a successful EXPECT_PRED2 where the
590
- // predicate-formatter is a functor on a user-defined type (Bool).
591
- TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeSuccess) {
592
- EXPECT_PRED2(PredFunctor2(),
593
- Bool(++n1_),
594
- Bool(++n2_));
595
- finished_ = true;
596
- }
597
-
598
- // Tests a failed EXPECT_PRED2 where the
599
- // predicate-formatter is a function on a built-in type (int).
600
- TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeFailure) {
601
- EXPECT_NONFATAL_FAILURE({ // NOLINT
602
- EXPECT_PRED2(PredFunction2Int,
603
- n1_++,
604
- n2_++);
605
- finished_ = true;
606
- }, "");
607
- }
608
-
609
- // Tests a failed EXPECT_PRED2 where the
610
- // predicate-formatter is a function on a user-defined type (Bool).
611
- TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeFailure) {
612
- EXPECT_NONFATAL_FAILURE({ // NOLINT
613
- EXPECT_PRED2(PredFunction2Bool,
614
- Bool(n1_++),
615
- Bool(n2_++));
616
- finished_ = true;
617
- }, "");
618
- }
619
-
620
- // Tests a failed EXPECT_PRED2 where the
621
- // predicate-formatter is a functor on a built-in type (int).
622
- TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeFailure) {
623
- EXPECT_NONFATAL_FAILURE({ // NOLINT
624
- EXPECT_PRED2(PredFunctor2(),
625
- n1_++,
626
- n2_++);
627
- finished_ = true;
628
- }, "");
629
- }
630
-
631
- // Tests a failed EXPECT_PRED2 where the
632
- // predicate-formatter is a functor on a user-defined type (Bool).
633
- TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeFailure) {
634
- EXPECT_NONFATAL_FAILURE({ // NOLINT
635
- EXPECT_PRED2(PredFunctor2(),
636
- Bool(n1_++),
637
- Bool(n2_++));
638
- finished_ = true;
639
- }, "");
640
- }
641
-
642
- // Tests a successful ASSERT_PRED2 where the
643
- // predicate-formatter is a function on a built-in type (int).
644
- TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeSuccess) {
645
- ASSERT_PRED2(PredFunction2Int,
646
- ++n1_,
647
- ++n2_);
648
- finished_ = true;
649
- }
650
-
651
- // Tests a successful ASSERT_PRED2 where the
652
- // predicate-formatter is a function on a user-defined type (Bool).
653
- TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeSuccess) {
654
- ASSERT_PRED2(PredFunction2Bool,
655
- Bool(++n1_),
656
- Bool(++n2_));
657
- finished_ = true;
658
- }
659
-
660
- // Tests a successful ASSERT_PRED2 where the
661
- // predicate-formatter is a functor on a built-in type (int).
662
- TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeSuccess) {
663
- ASSERT_PRED2(PredFunctor2(),
664
- ++n1_,
665
- ++n2_);
666
- finished_ = true;
667
- }
668
-
669
- // Tests a successful ASSERT_PRED2 where the
670
- // predicate-formatter is a functor on a user-defined type (Bool).
671
- TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeSuccess) {
672
- ASSERT_PRED2(PredFunctor2(),
673
- Bool(++n1_),
674
- Bool(++n2_));
675
- finished_ = true;
676
- }
677
-
678
- // Tests a failed ASSERT_PRED2 where the
679
- // predicate-formatter is a function on a built-in type (int).
680
- TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeFailure) {
681
- expected_to_finish_ = false;
682
- EXPECT_FATAL_FAILURE({ // NOLINT
683
- ASSERT_PRED2(PredFunction2Int,
684
- n1_++,
685
- n2_++);
686
- finished_ = true;
687
- }, "");
688
- }
689
-
690
- // Tests a failed ASSERT_PRED2 where the
691
- // predicate-formatter is a function on a user-defined type (Bool).
692
- TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeFailure) {
693
- expected_to_finish_ = false;
694
- EXPECT_FATAL_FAILURE({ // NOLINT
695
- ASSERT_PRED2(PredFunction2Bool,
696
- Bool(n1_++),
697
- Bool(n2_++));
698
- finished_ = true;
699
- }, "");
700
- }
701
-
702
- // Tests a failed ASSERT_PRED2 where the
703
- // predicate-formatter is a functor on a built-in type (int).
704
- TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeFailure) {
705
- expected_to_finish_ = false;
706
- EXPECT_FATAL_FAILURE({ // NOLINT
707
- ASSERT_PRED2(PredFunctor2(),
708
- n1_++,
709
- n2_++);
710
- finished_ = true;
711
- }, "");
712
- }
713
-
714
- // Tests a failed ASSERT_PRED2 where the
715
- // predicate-formatter is a functor on a user-defined type (Bool).
716
- TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeFailure) {
717
- expected_to_finish_ = false;
718
- EXPECT_FATAL_FAILURE({ // NOLINT
719
- ASSERT_PRED2(PredFunctor2(),
720
- Bool(n1_++),
721
- Bool(n2_++));
722
- finished_ = true;
723
- }, "");
724
- }
725
-
726
- // Tests a successful EXPECT_PRED_FORMAT2 where the
727
- // predicate-formatter is a function on a built-in type (int).
728
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) {
729
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
730
- ++n1_,
731
- ++n2_);
732
- finished_ = true;
733
- }
734
-
735
- // Tests a successful EXPECT_PRED_FORMAT2 where the
736
- // predicate-formatter is a function on a user-defined type (Bool).
737
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) {
738
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
739
- Bool(++n1_),
740
- Bool(++n2_));
741
- finished_ = true;
742
- }
743
-
744
- // Tests a successful EXPECT_PRED_FORMAT2 where the
745
- // predicate-formatter is a functor on a built-in type (int).
746
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) {
747
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
748
- ++n1_,
749
- ++n2_);
750
- finished_ = true;
751
- }
752
-
753
- // Tests a successful EXPECT_PRED_FORMAT2 where the
754
- // predicate-formatter is a functor on a user-defined type (Bool).
755
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) {
756
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
757
- Bool(++n1_),
758
- Bool(++n2_));
759
- finished_ = true;
760
- }
761
-
762
- // Tests a failed EXPECT_PRED_FORMAT2 where the
763
- // predicate-formatter is a function on a built-in type (int).
764
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) {
765
- EXPECT_NONFATAL_FAILURE({ // NOLINT
766
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
767
- n1_++,
768
- n2_++);
769
- finished_ = true;
770
- }, "");
771
- }
772
-
773
- // Tests a failed EXPECT_PRED_FORMAT2 where the
774
- // predicate-formatter is a function on a user-defined type (Bool).
775
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) {
776
- EXPECT_NONFATAL_FAILURE({ // NOLINT
777
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
778
- Bool(n1_++),
779
- Bool(n2_++));
780
- finished_ = true;
781
- }, "");
782
- }
783
-
784
- // Tests a failed EXPECT_PRED_FORMAT2 where the
785
- // predicate-formatter is a functor on a built-in type (int).
786
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) {
787
- EXPECT_NONFATAL_FAILURE({ // NOLINT
788
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
789
- n1_++,
790
- n2_++);
791
- finished_ = true;
792
- }, "");
793
- }
794
-
795
- // Tests a failed EXPECT_PRED_FORMAT2 where the
796
- // predicate-formatter is a functor on a user-defined type (Bool).
797
- TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) {
798
- EXPECT_NONFATAL_FAILURE({ // NOLINT
799
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
800
- Bool(n1_++),
801
- Bool(n2_++));
802
- finished_ = true;
803
- }, "");
804
- }
805
-
806
- // Tests a successful ASSERT_PRED_FORMAT2 where the
807
- // predicate-formatter is a function on a built-in type (int).
808
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) {
809
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
810
- ++n1_,
811
- ++n2_);
812
- finished_ = true;
813
- }
814
-
815
- // Tests a successful ASSERT_PRED_FORMAT2 where the
816
- // predicate-formatter is a function on a user-defined type (Bool).
817
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) {
818
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
819
- Bool(++n1_),
820
- Bool(++n2_));
821
- finished_ = true;
822
- }
823
-
824
- // Tests a successful ASSERT_PRED_FORMAT2 where the
825
- // predicate-formatter is a functor on a built-in type (int).
826
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) {
827
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
828
- ++n1_,
829
- ++n2_);
830
- finished_ = true;
831
- }
832
-
833
- // Tests a successful ASSERT_PRED_FORMAT2 where the
834
- // predicate-formatter is a functor on a user-defined type (Bool).
835
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) {
836
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
837
- Bool(++n1_),
838
- Bool(++n2_));
839
- finished_ = true;
840
- }
841
-
842
- // Tests a failed ASSERT_PRED_FORMAT2 where the
843
- // predicate-formatter is a function on a built-in type (int).
844
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) {
845
- expected_to_finish_ = false;
846
- EXPECT_FATAL_FAILURE({ // NOLINT
847
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
848
- n1_++,
849
- n2_++);
850
- finished_ = true;
851
- }, "");
852
- }
853
-
854
- // Tests a failed ASSERT_PRED_FORMAT2 where the
855
- // predicate-formatter is a function on a user-defined type (Bool).
856
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) {
857
- expected_to_finish_ = false;
858
- EXPECT_FATAL_FAILURE({ // NOLINT
859
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
860
- Bool(n1_++),
861
- Bool(n2_++));
862
- finished_ = true;
863
- }, "");
864
- }
865
-
866
- // Tests a failed ASSERT_PRED_FORMAT2 where the
867
- // predicate-formatter is a functor on a built-in type (int).
868
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) {
869
- expected_to_finish_ = false;
870
- EXPECT_FATAL_FAILURE({ // NOLINT
871
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
872
- n1_++,
873
- n2_++);
874
- finished_ = true;
875
- }, "");
876
- }
877
-
878
- // Tests a failed ASSERT_PRED_FORMAT2 where the
879
- // predicate-formatter is a functor on a user-defined type (Bool).
880
- TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) {
881
- expected_to_finish_ = false;
882
- EXPECT_FATAL_FAILURE({ // NOLINT
883
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
884
- Bool(n1_++),
885
- Bool(n2_++));
886
- finished_ = true;
887
- }, "");
888
- }
889
- // Sample functions/functors for testing ternary predicate assertions.
890
-
891
- // A ternary predicate function.
892
- template <typename T1, typename T2, typename T3>
893
- bool PredFunction3(T1 v1, T2 v2, T3 v3) {
894
- return v1 + v2 + v3 > 0;
895
- }
896
-
897
- // The following two functions are needed to circumvent a bug in
898
- // gcc 2.95.3, which sometimes has problem with the above template
899
- // function.
900
- bool PredFunction3Int(int v1, int v2, int v3) {
901
- return v1 + v2 + v3 > 0;
902
- }
903
- bool PredFunction3Bool(Bool v1, Bool v2, Bool v3) {
904
- return v1 + v2 + v3 > 0;
905
- }
906
-
907
- // A ternary predicate functor.
908
- struct PredFunctor3 {
909
- template <typename T1, typename T2, typename T3>
910
- bool operator()(const T1& v1,
911
- const T2& v2,
912
- const T3& v3) {
913
- return v1 + v2 + v3 > 0;
914
- }
915
- };
916
-
917
- // A ternary predicate-formatter function.
918
- template <typename T1, typename T2, typename T3>
919
- testing::AssertionResult PredFormatFunction3(const char* e1,
920
- const char* e2,
921
- const char* e3,
922
- const T1& v1,
923
- const T2& v2,
924
- const T3& v3) {
925
- if (PredFunction3(v1, v2, v3))
926
- return testing::AssertionSuccess();
927
-
928
- return testing::AssertionFailure()
929
- << e1 << " + " << e2 << " + " << e3
930
- << " is expected to be positive, but evaluates to "
931
- << v1 + v2 + v3 << ".";
932
- }
933
-
934
- // A ternary predicate-formatter functor.
935
- struct PredFormatFunctor3 {
936
- template <typename T1, typename T2, typename T3>
937
- testing::AssertionResult operator()(const char* e1,
938
- const char* e2,
939
- const char* e3,
940
- const T1& v1,
941
- const T2& v2,
942
- const T3& v3) const {
943
- return PredFormatFunction3(e1, e2, e3, v1, v2, v3);
944
- }
945
- };
946
-
947
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT3.
948
-
949
- class Predicate3Test : public testing::Test {
950
- protected:
951
- virtual void SetUp() {
952
- expected_to_finish_ = true;
953
- finished_ = false;
954
- n1_ = n2_ = n3_ = 0;
955
- }
956
-
957
- virtual void TearDown() {
958
- // Verifies that each of the predicate's arguments was evaluated
959
- // exactly once.
960
- EXPECT_EQ(1, n1_) <<
961
- "The predicate assertion didn't evaluate argument 2 "
962
- "exactly once.";
963
- EXPECT_EQ(1, n2_) <<
964
- "The predicate assertion didn't evaluate argument 3 "
965
- "exactly once.";
966
- EXPECT_EQ(1, n3_) <<
967
- "The predicate assertion didn't evaluate argument 4 "
968
- "exactly once.";
969
-
970
- // Verifies that the control flow in the test function is expected.
971
- if (expected_to_finish_ && !finished_) {
972
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
973
- } else if (!expected_to_finish_ && finished_) {
974
- FAIL() << "The failed predicate assertion didn't abort the test "
975
- "as expected.";
976
- }
977
- }
978
-
979
- // true iff the test function is expected to run to finish.
980
- static bool expected_to_finish_;
981
-
982
- // true iff the test function did run to finish.
983
- static bool finished_;
984
-
985
- static int n1_;
986
- static int n2_;
987
- static int n3_;
988
- };
989
-
990
- bool Predicate3Test::expected_to_finish_;
991
- bool Predicate3Test::finished_;
992
- int Predicate3Test::n1_;
993
- int Predicate3Test::n2_;
994
- int Predicate3Test::n3_;
995
-
996
- typedef Predicate3Test EXPECT_PRED_FORMAT3Test;
997
- typedef Predicate3Test ASSERT_PRED_FORMAT3Test;
998
- typedef Predicate3Test EXPECT_PRED3Test;
999
- typedef Predicate3Test ASSERT_PRED3Test;
1000
-
1001
- // Tests a successful EXPECT_PRED3 where the
1002
- // predicate-formatter is a function on a built-in type (int).
1003
- TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeSuccess) {
1004
- EXPECT_PRED3(PredFunction3Int,
1005
- ++n1_,
1006
- ++n2_,
1007
- ++n3_);
1008
- finished_ = true;
1009
- }
1010
-
1011
- // Tests a successful EXPECT_PRED3 where the
1012
- // predicate-formatter is a function on a user-defined type (Bool).
1013
- TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeSuccess) {
1014
- EXPECT_PRED3(PredFunction3Bool,
1015
- Bool(++n1_),
1016
- Bool(++n2_),
1017
- Bool(++n3_));
1018
- finished_ = true;
1019
- }
1020
-
1021
- // Tests a successful EXPECT_PRED3 where the
1022
- // predicate-formatter is a functor on a built-in type (int).
1023
- TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeSuccess) {
1024
- EXPECT_PRED3(PredFunctor3(),
1025
- ++n1_,
1026
- ++n2_,
1027
- ++n3_);
1028
- finished_ = true;
1029
- }
1030
-
1031
- // Tests a successful EXPECT_PRED3 where the
1032
- // predicate-formatter is a functor on a user-defined type (Bool).
1033
- TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeSuccess) {
1034
- EXPECT_PRED3(PredFunctor3(),
1035
- Bool(++n1_),
1036
- Bool(++n2_),
1037
- Bool(++n3_));
1038
- finished_ = true;
1039
- }
1040
-
1041
- // Tests a failed EXPECT_PRED3 where the
1042
- // predicate-formatter is a function on a built-in type (int).
1043
- TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeFailure) {
1044
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1045
- EXPECT_PRED3(PredFunction3Int,
1046
- n1_++,
1047
- n2_++,
1048
- n3_++);
1049
- finished_ = true;
1050
- }, "");
1051
- }
1052
-
1053
- // Tests a failed EXPECT_PRED3 where the
1054
- // predicate-formatter is a function on a user-defined type (Bool).
1055
- TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeFailure) {
1056
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1057
- EXPECT_PRED3(PredFunction3Bool,
1058
- Bool(n1_++),
1059
- Bool(n2_++),
1060
- Bool(n3_++));
1061
- finished_ = true;
1062
- }, "");
1063
- }
1064
-
1065
- // Tests a failed EXPECT_PRED3 where the
1066
- // predicate-formatter is a functor on a built-in type (int).
1067
- TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeFailure) {
1068
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1069
- EXPECT_PRED3(PredFunctor3(),
1070
- n1_++,
1071
- n2_++,
1072
- n3_++);
1073
- finished_ = true;
1074
- }, "");
1075
- }
1076
-
1077
- // Tests a failed EXPECT_PRED3 where the
1078
- // predicate-formatter is a functor on a user-defined type (Bool).
1079
- TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeFailure) {
1080
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1081
- EXPECT_PRED3(PredFunctor3(),
1082
- Bool(n1_++),
1083
- Bool(n2_++),
1084
- Bool(n3_++));
1085
- finished_ = true;
1086
- }, "");
1087
- }
1088
-
1089
- // Tests a successful ASSERT_PRED3 where the
1090
- // predicate-formatter is a function on a built-in type (int).
1091
- TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeSuccess) {
1092
- ASSERT_PRED3(PredFunction3Int,
1093
- ++n1_,
1094
- ++n2_,
1095
- ++n3_);
1096
- finished_ = true;
1097
- }
1098
-
1099
- // Tests a successful ASSERT_PRED3 where the
1100
- // predicate-formatter is a function on a user-defined type (Bool).
1101
- TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeSuccess) {
1102
- ASSERT_PRED3(PredFunction3Bool,
1103
- Bool(++n1_),
1104
- Bool(++n2_),
1105
- Bool(++n3_));
1106
- finished_ = true;
1107
- }
1108
-
1109
- // Tests a successful ASSERT_PRED3 where the
1110
- // predicate-formatter is a functor on a built-in type (int).
1111
- TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeSuccess) {
1112
- ASSERT_PRED3(PredFunctor3(),
1113
- ++n1_,
1114
- ++n2_,
1115
- ++n3_);
1116
- finished_ = true;
1117
- }
1118
-
1119
- // Tests a successful ASSERT_PRED3 where the
1120
- // predicate-formatter is a functor on a user-defined type (Bool).
1121
- TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeSuccess) {
1122
- ASSERT_PRED3(PredFunctor3(),
1123
- Bool(++n1_),
1124
- Bool(++n2_),
1125
- Bool(++n3_));
1126
- finished_ = true;
1127
- }
1128
-
1129
- // Tests a failed ASSERT_PRED3 where the
1130
- // predicate-formatter is a function on a built-in type (int).
1131
- TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeFailure) {
1132
- expected_to_finish_ = false;
1133
- EXPECT_FATAL_FAILURE({ // NOLINT
1134
- ASSERT_PRED3(PredFunction3Int,
1135
- n1_++,
1136
- n2_++,
1137
- n3_++);
1138
- finished_ = true;
1139
- }, "");
1140
- }
1141
-
1142
- // Tests a failed ASSERT_PRED3 where the
1143
- // predicate-formatter is a function on a user-defined type (Bool).
1144
- TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeFailure) {
1145
- expected_to_finish_ = false;
1146
- EXPECT_FATAL_FAILURE({ // NOLINT
1147
- ASSERT_PRED3(PredFunction3Bool,
1148
- Bool(n1_++),
1149
- Bool(n2_++),
1150
- Bool(n3_++));
1151
- finished_ = true;
1152
- }, "");
1153
- }
1154
-
1155
- // Tests a failed ASSERT_PRED3 where the
1156
- // predicate-formatter is a functor on a built-in type (int).
1157
- TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeFailure) {
1158
- expected_to_finish_ = false;
1159
- EXPECT_FATAL_FAILURE({ // NOLINT
1160
- ASSERT_PRED3(PredFunctor3(),
1161
- n1_++,
1162
- n2_++,
1163
- n3_++);
1164
- finished_ = true;
1165
- }, "");
1166
- }
1167
-
1168
- // Tests a failed ASSERT_PRED3 where the
1169
- // predicate-formatter is a functor on a user-defined type (Bool).
1170
- TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeFailure) {
1171
- expected_to_finish_ = false;
1172
- EXPECT_FATAL_FAILURE({ // NOLINT
1173
- ASSERT_PRED3(PredFunctor3(),
1174
- Bool(n1_++),
1175
- Bool(n2_++),
1176
- Bool(n3_++));
1177
- finished_ = true;
1178
- }, "");
1179
- }
1180
-
1181
- // Tests a successful EXPECT_PRED_FORMAT3 where the
1182
- // predicate-formatter is a function on a built-in type (int).
1183
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) {
1184
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
1185
- ++n1_,
1186
- ++n2_,
1187
- ++n3_);
1188
- finished_ = true;
1189
- }
1190
-
1191
- // Tests a successful EXPECT_PRED_FORMAT3 where the
1192
- // predicate-formatter is a function on a user-defined type (Bool).
1193
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) {
1194
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
1195
- Bool(++n1_),
1196
- Bool(++n2_),
1197
- Bool(++n3_));
1198
- finished_ = true;
1199
- }
1200
-
1201
- // Tests a successful EXPECT_PRED_FORMAT3 where the
1202
- // predicate-formatter is a functor on a built-in type (int).
1203
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) {
1204
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
1205
- ++n1_,
1206
- ++n2_,
1207
- ++n3_);
1208
- finished_ = true;
1209
- }
1210
-
1211
- // Tests a successful EXPECT_PRED_FORMAT3 where the
1212
- // predicate-formatter is a functor on a user-defined type (Bool).
1213
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) {
1214
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
1215
- Bool(++n1_),
1216
- Bool(++n2_),
1217
- Bool(++n3_));
1218
- finished_ = true;
1219
- }
1220
-
1221
- // Tests a failed EXPECT_PRED_FORMAT3 where the
1222
- // predicate-formatter is a function on a built-in type (int).
1223
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) {
1224
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1225
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
1226
- n1_++,
1227
- n2_++,
1228
- n3_++);
1229
- finished_ = true;
1230
- }, "");
1231
- }
1232
-
1233
- // Tests a failed EXPECT_PRED_FORMAT3 where the
1234
- // predicate-formatter is a function on a user-defined type (Bool).
1235
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) {
1236
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1237
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
1238
- Bool(n1_++),
1239
- Bool(n2_++),
1240
- Bool(n3_++));
1241
- finished_ = true;
1242
- }, "");
1243
- }
1244
-
1245
- // Tests a failed EXPECT_PRED_FORMAT3 where the
1246
- // predicate-formatter is a functor on a built-in type (int).
1247
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) {
1248
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1249
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
1250
- n1_++,
1251
- n2_++,
1252
- n3_++);
1253
- finished_ = true;
1254
- }, "");
1255
- }
1256
-
1257
- // Tests a failed EXPECT_PRED_FORMAT3 where the
1258
- // predicate-formatter is a functor on a user-defined type (Bool).
1259
- TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) {
1260
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1261
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
1262
- Bool(n1_++),
1263
- Bool(n2_++),
1264
- Bool(n3_++));
1265
- finished_ = true;
1266
- }, "");
1267
- }
1268
-
1269
- // Tests a successful ASSERT_PRED_FORMAT3 where the
1270
- // predicate-formatter is a function on a built-in type (int).
1271
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) {
1272
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
1273
- ++n1_,
1274
- ++n2_,
1275
- ++n3_);
1276
- finished_ = true;
1277
- }
1278
-
1279
- // Tests a successful ASSERT_PRED_FORMAT3 where the
1280
- // predicate-formatter is a function on a user-defined type (Bool).
1281
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) {
1282
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
1283
- Bool(++n1_),
1284
- Bool(++n2_),
1285
- Bool(++n3_));
1286
- finished_ = true;
1287
- }
1288
-
1289
- // Tests a successful ASSERT_PRED_FORMAT3 where the
1290
- // predicate-formatter is a functor on a built-in type (int).
1291
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) {
1292
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
1293
- ++n1_,
1294
- ++n2_,
1295
- ++n3_);
1296
- finished_ = true;
1297
- }
1298
-
1299
- // Tests a successful ASSERT_PRED_FORMAT3 where the
1300
- // predicate-formatter is a functor on a user-defined type (Bool).
1301
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) {
1302
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
1303
- Bool(++n1_),
1304
- Bool(++n2_),
1305
- Bool(++n3_));
1306
- finished_ = true;
1307
- }
1308
-
1309
- // Tests a failed ASSERT_PRED_FORMAT3 where the
1310
- // predicate-formatter is a function on a built-in type (int).
1311
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) {
1312
- expected_to_finish_ = false;
1313
- EXPECT_FATAL_FAILURE({ // NOLINT
1314
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
1315
- n1_++,
1316
- n2_++,
1317
- n3_++);
1318
- finished_ = true;
1319
- }, "");
1320
- }
1321
-
1322
- // Tests a failed ASSERT_PRED_FORMAT3 where the
1323
- // predicate-formatter is a function on a user-defined type (Bool).
1324
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) {
1325
- expected_to_finish_ = false;
1326
- EXPECT_FATAL_FAILURE({ // NOLINT
1327
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
1328
- Bool(n1_++),
1329
- Bool(n2_++),
1330
- Bool(n3_++));
1331
- finished_ = true;
1332
- }, "");
1333
- }
1334
-
1335
- // Tests a failed ASSERT_PRED_FORMAT3 where the
1336
- // predicate-formatter is a functor on a built-in type (int).
1337
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) {
1338
- expected_to_finish_ = false;
1339
- EXPECT_FATAL_FAILURE({ // NOLINT
1340
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
1341
- n1_++,
1342
- n2_++,
1343
- n3_++);
1344
- finished_ = true;
1345
- }, "");
1346
- }
1347
-
1348
- // Tests a failed ASSERT_PRED_FORMAT3 where the
1349
- // predicate-formatter is a functor on a user-defined type (Bool).
1350
- TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) {
1351
- expected_to_finish_ = false;
1352
- EXPECT_FATAL_FAILURE({ // NOLINT
1353
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
1354
- Bool(n1_++),
1355
- Bool(n2_++),
1356
- Bool(n3_++));
1357
- finished_ = true;
1358
- }, "");
1359
- }
1360
- // Sample functions/functors for testing 4-ary predicate assertions.
1361
-
1362
- // A 4-ary predicate function.
1363
- template <typename T1, typename T2, typename T3, typename T4>
1364
- bool PredFunction4(T1 v1, T2 v2, T3 v3, T4 v4) {
1365
- return v1 + v2 + v3 + v4 > 0;
1366
- }
1367
-
1368
- // The following two functions are needed to circumvent a bug in
1369
- // gcc 2.95.3, which sometimes has problem with the above template
1370
- // function.
1371
- bool PredFunction4Int(int v1, int v2, int v3, int v4) {
1372
- return v1 + v2 + v3 + v4 > 0;
1373
- }
1374
- bool PredFunction4Bool(Bool v1, Bool v2, Bool v3, Bool v4) {
1375
- return v1 + v2 + v3 + v4 > 0;
1376
- }
1377
-
1378
- // A 4-ary predicate functor.
1379
- struct PredFunctor4 {
1380
- template <typename T1, typename T2, typename T3, typename T4>
1381
- bool operator()(const T1& v1,
1382
- const T2& v2,
1383
- const T3& v3,
1384
- const T4& v4) {
1385
- return v1 + v2 + v3 + v4 > 0;
1386
- }
1387
- };
1388
-
1389
- // A 4-ary predicate-formatter function.
1390
- template <typename T1, typename T2, typename T3, typename T4>
1391
- testing::AssertionResult PredFormatFunction4(const char* e1,
1392
- const char* e2,
1393
- const char* e3,
1394
- const char* e4,
1395
- const T1& v1,
1396
- const T2& v2,
1397
- const T3& v3,
1398
- const T4& v4) {
1399
- if (PredFunction4(v1, v2, v3, v4))
1400
- return testing::AssertionSuccess();
1401
-
1402
- return testing::AssertionFailure()
1403
- << e1 << " + " << e2 << " + " << e3 << " + " << e4
1404
- << " is expected to be positive, but evaluates to "
1405
- << v1 + v2 + v3 + v4 << ".";
1406
- }
1407
-
1408
- // A 4-ary predicate-formatter functor.
1409
- struct PredFormatFunctor4 {
1410
- template <typename T1, typename T2, typename T3, typename T4>
1411
- testing::AssertionResult operator()(const char* e1,
1412
- const char* e2,
1413
- const char* e3,
1414
- const char* e4,
1415
- const T1& v1,
1416
- const T2& v2,
1417
- const T3& v3,
1418
- const T4& v4) const {
1419
- return PredFormatFunction4(e1, e2, e3, e4, v1, v2, v3, v4);
1420
- }
1421
- };
1422
-
1423
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT4.
1424
-
1425
- class Predicate4Test : public testing::Test {
1426
- protected:
1427
- virtual void SetUp() {
1428
- expected_to_finish_ = true;
1429
- finished_ = false;
1430
- n1_ = n2_ = n3_ = n4_ = 0;
1431
- }
1432
-
1433
- virtual void TearDown() {
1434
- // Verifies that each of the predicate's arguments was evaluated
1435
- // exactly once.
1436
- EXPECT_EQ(1, n1_) <<
1437
- "The predicate assertion didn't evaluate argument 2 "
1438
- "exactly once.";
1439
- EXPECT_EQ(1, n2_) <<
1440
- "The predicate assertion didn't evaluate argument 3 "
1441
- "exactly once.";
1442
- EXPECT_EQ(1, n3_) <<
1443
- "The predicate assertion didn't evaluate argument 4 "
1444
- "exactly once.";
1445
- EXPECT_EQ(1, n4_) <<
1446
- "The predicate assertion didn't evaluate argument 5 "
1447
- "exactly once.";
1448
-
1449
- // Verifies that the control flow in the test function is expected.
1450
- if (expected_to_finish_ && !finished_) {
1451
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
1452
- } else if (!expected_to_finish_ && finished_) {
1453
- FAIL() << "The failed predicate assertion didn't abort the test "
1454
- "as expected.";
1455
- }
1456
- }
1457
-
1458
- // true iff the test function is expected to run to finish.
1459
- static bool expected_to_finish_;
1460
-
1461
- // true iff the test function did run to finish.
1462
- static bool finished_;
1463
-
1464
- static int n1_;
1465
- static int n2_;
1466
- static int n3_;
1467
- static int n4_;
1468
- };
1469
-
1470
- bool Predicate4Test::expected_to_finish_;
1471
- bool Predicate4Test::finished_;
1472
- int Predicate4Test::n1_;
1473
- int Predicate4Test::n2_;
1474
- int Predicate4Test::n3_;
1475
- int Predicate4Test::n4_;
1476
-
1477
- typedef Predicate4Test EXPECT_PRED_FORMAT4Test;
1478
- typedef Predicate4Test ASSERT_PRED_FORMAT4Test;
1479
- typedef Predicate4Test EXPECT_PRED4Test;
1480
- typedef Predicate4Test ASSERT_PRED4Test;
1481
-
1482
- // Tests a successful EXPECT_PRED4 where the
1483
- // predicate-formatter is a function on a built-in type (int).
1484
- TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeSuccess) {
1485
- EXPECT_PRED4(PredFunction4Int,
1486
- ++n1_,
1487
- ++n2_,
1488
- ++n3_,
1489
- ++n4_);
1490
- finished_ = true;
1491
- }
1492
-
1493
- // Tests a successful EXPECT_PRED4 where the
1494
- // predicate-formatter is a function on a user-defined type (Bool).
1495
- TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeSuccess) {
1496
- EXPECT_PRED4(PredFunction4Bool,
1497
- Bool(++n1_),
1498
- Bool(++n2_),
1499
- Bool(++n3_),
1500
- Bool(++n4_));
1501
- finished_ = true;
1502
- }
1503
-
1504
- // Tests a successful EXPECT_PRED4 where the
1505
- // predicate-formatter is a functor on a built-in type (int).
1506
- TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeSuccess) {
1507
- EXPECT_PRED4(PredFunctor4(),
1508
- ++n1_,
1509
- ++n2_,
1510
- ++n3_,
1511
- ++n4_);
1512
- finished_ = true;
1513
- }
1514
-
1515
- // Tests a successful EXPECT_PRED4 where the
1516
- // predicate-formatter is a functor on a user-defined type (Bool).
1517
- TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeSuccess) {
1518
- EXPECT_PRED4(PredFunctor4(),
1519
- Bool(++n1_),
1520
- Bool(++n2_),
1521
- Bool(++n3_),
1522
- Bool(++n4_));
1523
- finished_ = true;
1524
- }
1525
-
1526
- // Tests a failed EXPECT_PRED4 where the
1527
- // predicate-formatter is a function on a built-in type (int).
1528
- TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeFailure) {
1529
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1530
- EXPECT_PRED4(PredFunction4Int,
1531
- n1_++,
1532
- n2_++,
1533
- n3_++,
1534
- n4_++);
1535
- finished_ = true;
1536
- }, "");
1537
- }
1538
-
1539
- // Tests a failed EXPECT_PRED4 where the
1540
- // predicate-formatter is a function on a user-defined type (Bool).
1541
- TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeFailure) {
1542
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1543
- EXPECT_PRED4(PredFunction4Bool,
1544
- Bool(n1_++),
1545
- Bool(n2_++),
1546
- Bool(n3_++),
1547
- Bool(n4_++));
1548
- finished_ = true;
1549
- }, "");
1550
- }
1551
-
1552
- // Tests a failed EXPECT_PRED4 where the
1553
- // predicate-formatter is a functor on a built-in type (int).
1554
- TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeFailure) {
1555
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1556
- EXPECT_PRED4(PredFunctor4(),
1557
- n1_++,
1558
- n2_++,
1559
- n3_++,
1560
- n4_++);
1561
- finished_ = true;
1562
- }, "");
1563
- }
1564
-
1565
- // Tests a failed EXPECT_PRED4 where the
1566
- // predicate-formatter is a functor on a user-defined type (Bool).
1567
- TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeFailure) {
1568
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1569
- EXPECT_PRED4(PredFunctor4(),
1570
- Bool(n1_++),
1571
- Bool(n2_++),
1572
- Bool(n3_++),
1573
- Bool(n4_++));
1574
- finished_ = true;
1575
- }, "");
1576
- }
1577
-
1578
- // Tests a successful ASSERT_PRED4 where the
1579
- // predicate-formatter is a function on a built-in type (int).
1580
- TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeSuccess) {
1581
- ASSERT_PRED4(PredFunction4Int,
1582
- ++n1_,
1583
- ++n2_,
1584
- ++n3_,
1585
- ++n4_);
1586
- finished_ = true;
1587
- }
1588
-
1589
- // Tests a successful ASSERT_PRED4 where the
1590
- // predicate-formatter is a function on a user-defined type (Bool).
1591
- TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeSuccess) {
1592
- ASSERT_PRED4(PredFunction4Bool,
1593
- Bool(++n1_),
1594
- Bool(++n2_),
1595
- Bool(++n3_),
1596
- Bool(++n4_));
1597
- finished_ = true;
1598
- }
1599
-
1600
- // Tests a successful ASSERT_PRED4 where the
1601
- // predicate-formatter is a functor on a built-in type (int).
1602
- TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeSuccess) {
1603
- ASSERT_PRED4(PredFunctor4(),
1604
- ++n1_,
1605
- ++n2_,
1606
- ++n3_,
1607
- ++n4_);
1608
- finished_ = true;
1609
- }
1610
-
1611
- // Tests a successful ASSERT_PRED4 where the
1612
- // predicate-formatter is a functor on a user-defined type (Bool).
1613
- TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeSuccess) {
1614
- ASSERT_PRED4(PredFunctor4(),
1615
- Bool(++n1_),
1616
- Bool(++n2_),
1617
- Bool(++n3_),
1618
- Bool(++n4_));
1619
- finished_ = true;
1620
- }
1621
-
1622
- // Tests a failed ASSERT_PRED4 where the
1623
- // predicate-formatter is a function on a built-in type (int).
1624
- TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeFailure) {
1625
- expected_to_finish_ = false;
1626
- EXPECT_FATAL_FAILURE({ // NOLINT
1627
- ASSERT_PRED4(PredFunction4Int,
1628
- n1_++,
1629
- n2_++,
1630
- n3_++,
1631
- n4_++);
1632
- finished_ = true;
1633
- }, "");
1634
- }
1635
-
1636
- // Tests a failed ASSERT_PRED4 where the
1637
- // predicate-formatter is a function on a user-defined type (Bool).
1638
- TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeFailure) {
1639
- expected_to_finish_ = false;
1640
- EXPECT_FATAL_FAILURE({ // NOLINT
1641
- ASSERT_PRED4(PredFunction4Bool,
1642
- Bool(n1_++),
1643
- Bool(n2_++),
1644
- Bool(n3_++),
1645
- Bool(n4_++));
1646
- finished_ = true;
1647
- }, "");
1648
- }
1649
-
1650
- // Tests a failed ASSERT_PRED4 where the
1651
- // predicate-formatter is a functor on a built-in type (int).
1652
- TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeFailure) {
1653
- expected_to_finish_ = false;
1654
- EXPECT_FATAL_FAILURE({ // NOLINT
1655
- ASSERT_PRED4(PredFunctor4(),
1656
- n1_++,
1657
- n2_++,
1658
- n3_++,
1659
- n4_++);
1660
- finished_ = true;
1661
- }, "");
1662
- }
1663
-
1664
- // Tests a failed ASSERT_PRED4 where the
1665
- // predicate-formatter is a functor on a user-defined type (Bool).
1666
- TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeFailure) {
1667
- expected_to_finish_ = false;
1668
- EXPECT_FATAL_FAILURE({ // NOLINT
1669
- ASSERT_PRED4(PredFunctor4(),
1670
- Bool(n1_++),
1671
- Bool(n2_++),
1672
- Bool(n3_++),
1673
- Bool(n4_++));
1674
- finished_ = true;
1675
- }, "");
1676
- }
1677
-
1678
- // Tests a successful EXPECT_PRED_FORMAT4 where the
1679
- // predicate-formatter is a function on a built-in type (int).
1680
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) {
1681
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
1682
- ++n1_,
1683
- ++n2_,
1684
- ++n3_,
1685
- ++n4_);
1686
- finished_ = true;
1687
- }
1688
-
1689
- // Tests a successful EXPECT_PRED_FORMAT4 where the
1690
- // predicate-formatter is a function on a user-defined type (Bool).
1691
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) {
1692
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
1693
- Bool(++n1_),
1694
- Bool(++n2_),
1695
- Bool(++n3_),
1696
- Bool(++n4_));
1697
- finished_ = true;
1698
- }
1699
-
1700
- // Tests a successful EXPECT_PRED_FORMAT4 where the
1701
- // predicate-formatter is a functor on a built-in type (int).
1702
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) {
1703
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
1704
- ++n1_,
1705
- ++n2_,
1706
- ++n3_,
1707
- ++n4_);
1708
- finished_ = true;
1709
- }
1710
-
1711
- // Tests a successful EXPECT_PRED_FORMAT4 where the
1712
- // predicate-formatter is a functor on a user-defined type (Bool).
1713
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) {
1714
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
1715
- Bool(++n1_),
1716
- Bool(++n2_),
1717
- Bool(++n3_),
1718
- Bool(++n4_));
1719
- finished_ = true;
1720
- }
1721
-
1722
- // Tests a failed EXPECT_PRED_FORMAT4 where the
1723
- // predicate-formatter is a function on a built-in type (int).
1724
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) {
1725
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1726
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
1727
- n1_++,
1728
- n2_++,
1729
- n3_++,
1730
- n4_++);
1731
- finished_ = true;
1732
- }, "");
1733
- }
1734
-
1735
- // Tests a failed EXPECT_PRED_FORMAT4 where the
1736
- // predicate-formatter is a function on a user-defined type (Bool).
1737
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) {
1738
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1739
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
1740
- Bool(n1_++),
1741
- Bool(n2_++),
1742
- Bool(n3_++),
1743
- Bool(n4_++));
1744
- finished_ = true;
1745
- }, "");
1746
- }
1747
-
1748
- // Tests a failed EXPECT_PRED_FORMAT4 where the
1749
- // predicate-formatter is a functor on a built-in type (int).
1750
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) {
1751
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1752
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
1753
- n1_++,
1754
- n2_++,
1755
- n3_++,
1756
- n4_++);
1757
- finished_ = true;
1758
- }, "");
1759
- }
1760
-
1761
- // Tests a failed EXPECT_PRED_FORMAT4 where the
1762
- // predicate-formatter is a functor on a user-defined type (Bool).
1763
- TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) {
1764
- EXPECT_NONFATAL_FAILURE({ // NOLINT
1765
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
1766
- Bool(n1_++),
1767
- Bool(n2_++),
1768
- Bool(n3_++),
1769
- Bool(n4_++));
1770
- finished_ = true;
1771
- }, "");
1772
- }
1773
-
1774
- // Tests a successful ASSERT_PRED_FORMAT4 where the
1775
- // predicate-formatter is a function on a built-in type (int).
1776
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) {
1777
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
1778
- ++n1_,
1779
- ++n2_,
1780
- ++n3_,
1781
- ++n4_);
1782
- finished_ = true;
1783
- }
1784
-
1785
- // Tests a successful ASSERT_PRED_FORMAT4 where the
1786
- // predicate-formatter is a function on a user-defined type (Bool).
1787
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) {
1788
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
1789
- Bool(++n1_),
1790
- Bool(++n2_),
1791
- Bool(++n3_),
1792
- Bool(++n4_));
1793
- finished_ = true;
1794
- }
1795
-
1796
- // Tests a successful ASSERT_PRED_FORMAT4 where the
1797
- // predicate-formatter is a functor on a built-in type (int).
1798
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) {
1799
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
1800
- ++n1_,
1801
- ++n2_,
1802
- ++n3_,
1803
- ++n4_);
1804
- finished_ = true;
1805
- }
1806
-
1807
- // Tests a successful ASSERT_PRED_FORMAT4 where the
1808
- // predicate-formatter is a functor on a user-defined type (Bool).
1809
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) {
1810
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
1811
- Bool(++n1_),
1812
- Bool(++n2_),
1813
- Bool(++n3_),
1814
- Bool(++n4_));
1815
- finished_ = true;
1816
- }
1817
-
1818
- // Tests a failed ASSERT_PRED_FORMAT4 where the
1819
- // predicate-formatter is a function on a built-in type (int).
1820
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) {
1821
- expected_to_finish_ = false;
1822
- EXPECT_FATAL_FAILURE({ // NOLINT
1823
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
1824
- n1_++,
1825
- n2_++,
1826
- n3_++,
1827
- n4_++);
1828
- finished_ = true;
1829
- }, "");
1830
- }
1831
-
1832
- // Tests a failed ASSERT_PRED_FORMAT4 where the
1833
- // predicate-formatter is a function on a user-defined type (Bool).
1834
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) {
1835
- expected_to_finish_ = false;
1836
- EXPECT_FATAL_FAILURE({ // NOLINT
1837
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
1838
- Bool(n1_++),
1839
- Bool(n2_++),
1840
- Bool(n3_++),
1841
- Bool(n4_++));
1842
- finished_ = true;
1843
- }, "");
1844
- }
1845
-
1846
- // Tests a failed ASSERT_PRED_FORMAT4 where the
1847
- // predicate-formatter is a functor on a built-in type (int).
1848
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) {
1849
- expected_to_finish_ = false;
1850
- EXPECT_FATAL_FAILURE({ // NOLINT
1851
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
1852
- n1_++,
1853
- n2_++,
1854
- n3_++,
1855
- n4_++);
1856
- finished_ = true;
1857
- }, "");
1858
- }
1859
-
1860
- // Tests a failed ASSERT_PRED_FORMAT4 where the
1861
- // predicate-formatter is a functor on a user-defined type (Bool).
1862
- TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) {
1863
- expected_to_finish_ = false;
1864
- EXPECT_FATAL_FAILURE({ // NOLINT
1865
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
1866
- Bool(n1_++),
1867
- Bool(n2_++),
1868
- Bool(n3_++),
1869
- Bool(n4_++));
1870
- finished_ = true;
1871
- }, "");
1872
- }
1873
- // Sample functions/functors for testing 5-ary predicate assertions.
1874
-
1875
- // A 5-ary predicate function.
1876
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
1877
- bool PredFunction5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
1878
- return v1 + v2 + v3 + v4 + v5 > 0;
1879
- }
1880
-
1881
- // The following two functions are needed to circumvent a bug in
1882
- // gcc 2.95.3, which sometimes has problem with the above template
1883
- // function.
1884
- bool PredFunction5Int(int v1, int v2, int v3, int v4, int v5) {
1885
- return v1 + v2 + v3 + v4 + v5 > 0;
1886
- }
1887
- bool PredFunction5Bool(Bool v1, Bool v2, Bool v3, Bool v4, Bool v5) {
1888
- return v1 + v2 + v3 + v4 + v5 > 0;
1889
- }
1890
-
1891
- // A 5-ary predicate functor.
1892
- struct PredFunctor5 {
1893
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
1894
- bool operator()(const T1& v1,
1895
- const T2& v2,
1896
- const T3& v3,
1897
- const T4& v4,
1898
- const T5& v5) {
1899
- return v1 + v2 + v3 + v4 + v5 > 0;
1900
- }
1901
- };
1902
-
1903
- // A 5-ary predicate-formatter function.
1904
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
1905
- testing::AssertionResult PredFormatFunction5(const char* e1,
1906
- const char* e2,
1907
- const char* e3,
1908
- const char* e4,
1909
- const char* e5,
1910
- const T1& v1,
1911
- const T2& v2,
1912
- const T3& v3,
1913
- const T4& v4,
1914
- const T5& v5) {
1915
- if (PredFunction5(v1, v2, v3, v4, v5))
1916
- return testing::AssertionSuccess();
1917
-
1918
- return testing::AssertionFailure()
1919
- << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5
1920
- << " is expected to be positive, but evaluates to "
1921
- << v1 + v2 + v3 + v4 + v5 << ".";
1922
- }
1923
-
1924
- // A 5-ary predicate-formatter functor.
1925
- struct PredFormatFunctor5 {
1926
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
1927
- testing::AssertionResult operator()(const char* e1,
1928
- const char* e2,
1929
- const char* e3,
1930
- const char* e4,
1931
- const char* e5,
1932
- const T1& v1,
1933
- const T2& v2,
1934
- const T3& v3,
1935
- const T4& v4,
1936
- const T5& v5) const {
1937
- return PredFormatFunction5(e1, e2, e3, e4, e5, v1, v2, v3, v4, v5);
1938
- }
1939
- };
1940
-
1941
- // Tests for {EXPECT|ASSERT}_PRED_FORMAT5.
1942
-
1943
- class Predicate5Test : public testing::Test {
1944
- protected:
1945
- virtual void SetUp() {
1946
- expected_to_finish_ = true;
1947
- finished_ = false;
1948
- n1_ = n2_ = n3_ = n4_ = n5_ = 0;
1949
- }
1950
-
1951
- virtual void TearDown() {
1952
- // Verifies that each of the predicate's arguments was evaluated
1953
- // exactly once.
1954
- EXPECT_EQ(1, n1_) <<
1955
- "The predicate assertion didn't evaluate argument 2 "
1956
- "exactly once.";
1957
- EXPECT_EQ(1, n2_) <<
1958
- "The predicate assertion didn't evaluate argument 3 "
1959
- "exactly once.";
1960
- EXPECT_EQ(1, n3_) <<
1961
- "The predicate assertion didn't evaluate argument 4 "
1962
- "exactly once.";
1963
- EXPECT_EQ(1, n4_) <<
1964
- "The predicate assertion didn't evaluate argument 5 "
1965
- "exactly once.";
1966
- EXPECT_EQ(1, n5_) <<
1967
- "The predicate assertion didn't evaluate argument 6 "
1968
- "exactly once.";
1969
-
1970
- // Verifies that the control flow in the test function is expected.
1971
- if (expected_to_finish_ && !finished_) {
1972
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
1973
- } else if (!expected_to_finish_ && finished_) {
1974
- FAIL() << "The failed predicate assertion didn't abort the test "
1975
- "as expected.";
1976
- }
1977
- }
1978
-
1979
- // true iff the test function is expected to run to finish.
1980
- static bool expected_to_finish_;
1981
-
1982
- // true iff the test function did run to finish.
1983
- static bool finished_;
1984
-
1985
- static int n1_;
1986
- static int n2_;
1987
- static int n3_;
1988
- static int n4_;
1989
- static int n5_;
1990
- };
1991
-
1992
- bool Predicate5Test::expected_to_finish_;
1993
- bool Predicate5Test::finished_;
1994
- int Predicate5Test::n1_;
1995
- int Predicate5Test::n2_;
1996
- int Predicate5Test::n3_;
1997
- int Predicate5Test::n4_;
1998
- int Predicate5Test::n5_;
1999
-
2000
- typedef Predicate5Test EXPECT_PRED_FORMAT5Test;
2001
- typedef Predicate5Test ASSERT_PRED_FORMAT5Test;
2002
- typedef Predicate5Test EXPECT_PRED5Test;
2003
- typedef Predicate5Test ASSERT_PRED5Test;
2004
-
2005
- // Tests a successful EXPECT_PRED5 where the
2006
- // predicate-formatter is a function on a built-in type (int).
2007
- TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeSuccess) {
2008
- EXPECT_PRED5(PredFunction5Int,
2009
- ++n1_,
2010
- ++n2_,
2011
- ++n3_,
2012
- ++n4_,
2013
- ++n5_);
2014
- finished_ = true;
2015
- }
2016
-
2017
- // Tests a successful EXPECT_PRED5 where the
2018
- // predicate-formatter is a function on a user-defined type (Bool).
2019
- TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeSuccess) {
2020
- EXPECT_PRED5(PredFunction5Bool,
2021
- Bool(++n1_),
2022
- Bool(++n2_),
2023
- Bool(++n3_),
2024
- Bool(++n4_),
2025
- Bool(++n5_));
2026
- finished_ = true;
2027
- }
2028
-
2029
- // Tests a successful EXPECT_PRED5 where the
2030
- // predicate-formatter is a functor on a built-in type (int).
2031
- TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeSuccess) {
2032
- EXPECT_PRED5(PredFunctor5(),
2033
- ++n1_,
2034
- ++n2_,
2035
- ++n3_,
2036
- ++n4_,
2037
- ++n5_);
2038
- finished_ = true;
2039
- }
2040
-
2041
- // Tests a successful EXPECT_PRED5 where the
2042
- // predicate-formatter is a functor on a user-defined type (Bool).
2043
- TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeSuccess) {
2044
- EXPECT_PRED5(PredFunctor5(),
2045
- Bool(++n1_),
2046
- Bool(++n2_),
2047
- Bool(++n3_),
2048
- Bool(++n4_),
2049
- Bool(++n5_));
2050
- finished_ = true;
2051
- }
2052
-
2053
- // Tests a failed EXPECT_PRED5 where the
2054
- // predicate-formatter is a function on a built-in type (int).
2055
- TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeFailure) {
2056
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2057
- EXPECT_PRED5(PredFunction5Int,
2058
- n1_++,
2059
- n2_++,
2060
- n3_++,
2061
- n4_++,
2062
- n5_++);
2063
- finished_ = true;
2064
- }, "");
2065
- }
2066
-
2067
- // Tests a failed EXPECT_PRED5 where the
2068
- // predicate-formatter is a function on a user-defined type (Bool).
2069
- TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeFailure) {
2070
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2071
- EXPECT_PRED5(PredFunction5Bool,
2072
- Bool(n1_++),
2073
- Bool(n2_++),
2074
- Bool(n3_++),
2075
- Bool(n4_++),
2076
- Bool(n5_++));
2077
- finished_ = true;
2078
- }, "");
2079
- }
2080
-
2081
- // Tests a failed EXPECT_PRED5 where the
2082
- // predicate-formatter is a functor on a built-in type (int).
2083
- TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeFailure) {
2084
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2085
- EXPECT_PRED5(PredFunctor5(),
2086
- n1_++,
2087
- n2_++,
2088
- n3_++,
2089
- n4_++,
2090
- n5_++);
2091
- finished_ = true;
2092
- }, "");
2093
- }
2094
-
2095
- // Tests a failed EXPECT_PRED5 where the
2096
- // predicate-formatter is a functor on a user-defined type (Bool).
2097
- TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeFailure) {
2098
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2099
- EXPECT_PRED5(PredFunctor5(),
2100
- Bool(n1_++),
2101
- Bool(n2_++),
2102
- Bool(n3_++),
2103
- Bool(n4_++),
2104
- Bool(n5_++));
2105
- finished_ = true;
2106
- }, "");
2107
- }
2108
-
2109
- // Tests a successful ASSERT_PRED5 where the
2110
- // predicate-formatter is a function on a built-in type (int).
2111
- TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeSuccess) {
2112
- ASSERT_PRED5(PredFunction5Int,
2113
- ++n1_,
2114
- ++n2_,
2115
- ++n3_,
2116
- ++n4_,
2117
- ++n5_);
2118
- finished_ = true;
2119
- }
2120
-
2121
- // Tests a successful ASSERT_PRED5 where the
2122
- // predicate-formatter is a function on a user-defined type (Bool).
2123
- TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeSuccess) {
2124
- ASSERT_PRED5(PredFunction5Bool,
2125
- Bool(++n1_),
2126
- Bool(++n2_),
2127
- Bool(++n3_),
2128
- Bool(++n4_),
2129
- Bool(++n5_));
2130
- finished_ = true;
2131
- }
2132
-
2133
- // Tests a successful ASSERT_PRED5 where the
2134
- // predicate-formatter is a functor on a built-in type (int).
2135
- TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeSuccess) {
2136
- ASSERT_PRED5(PredFunctor5(),
2137
- ++n1_,
2138
- ++n2_,
2139
- ++n3_,
2140
- ++n4_,
2141
- ++n5_);
2142
- finished_ = true;
2143
- }
2144
-
2145
- // Tests a successful ASSERT_PRED5 where the
2146
- // predicate-formatter is a functor on a user-defined type (Bool).
2147
- TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeSuccess) {
2148
- ASSERT_PRED5(PredFunctor5(),
2149
- Bool(++n1_),
2150
- Bool(++n2_),
2151
- Bool(++n3_),
2152
- Bool(++n4_),
2153
- Bool(++n5_));
2154
- finished_ = true;
2155
- }
2156
-
2157
- // Tests a failed ASSERT_PRED5 where the
2158
- // predicate-formatter is a function on a built-in type (int).
2159
- TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeFailure) {
2160
- expected_to_finish_ = false;
2161
- EXPECT_FATAL_FAILURE({ // NOLINT
2162
- ASSERT_PRED5(PredFunction5Int,
2163
- n1_++,
2164
- n2_++,
2165
- n3_++,
2166
- n4_++,
2167
- n5_++);
2168
- finished_ = true;
2169
- }, "");
2170
- }
2171
-
2172
- // Tests a failed ASSERT_PRED5 where the
2173
- // predicate-formatter is a function on a user-defined type (Bool).
2174
- TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeFailure) {
2175
- expected_to_finish_ = false;
2176
- EXPECT_FATAL_FAILURE({ // NOLINT
2177
- ASSERT_PRED5(PredFunction5Bool,
2178
- Bool(n1_++),
2179
- Bool(n2_++),
2180
- Bool(n3_++),
2181
- Bool(n4_++),
2182
- Bool(n5_++));
2183
- finished_ = true;
2184
- }, "");
2185
- }
2186
-
2187
- // Tests a failed ASSERT_PRED5 where the
2188
- // predicate-formatter is a functor on a built-in type (int).
2189
- TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeFailure) {
2190
- expected_to_finish_ = false;
2191
- EXPECT_FATAL_FAILURE({ // NOLINT
2192
- ASSERT_PRED5(PredFunctor5(),
2193
- n1_++,
2194
- n2_++,
2195
- n3_++,
2196
- n4_++,
2197
- n5_++);
2198
- finished_ = true;
2199
- }, "");
2200
- }
2201
-
2202
- // Tests a failed ASSERT_PRED5 where the
2203
- // predicate-formatter is a functor on a user-defined type (Bool).
2204
- TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeFailure) {
2205
- expected_to_finish_ = false;
2206
- EXPECT_FATAL_FAILURE({ // NOLINT
2207
- ASSERT_PRED5(PredFunctor5(),
2208
- Bool(n1_++),
2209
- Bool(n2_++),
2210
- Bool(n3_++),
2211
- Bool(n4_++),
2212
- Bool(n5_++));
2213
- finished_ = true;
2214
- }, "");
2215
- }
2216
-
2217
- // Tests a successful EXPECT_PRED_FORMAT5 where the
2218
- // predicate-formatter is a function on a built-in type (int).
2219
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) {
2220
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
2221
- ++n1_,
2222
- ++n2_,
2223
- ++n3_,
2224
- ++n4_,
2225
- ++n5_);
2226
- finished_ = true;
2227
- }
2228
-
2229
- // Tests a successful EXPECT_PRED_FORMAT5 where the
2230
- // predicate-formatter is a function on a user-defined type (Bool).
2231
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) {
2232
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
2233
- Bool(++n1_),
2234
- Bool(++n2_),
2235
- Bool(++n3_),
2236
- Bool(++n4_),
2237
- Bool(++n5_));
2238
- finished_ = true;
2239
- }
2240
-
2241
- // Tests a successful EXPECT_PRED_FORMAT5 where the
2242
- // predicate-formatter is a functor on a built-in type (int).
2243
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) {
2244
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
2245
- ++n1_,
2246
- ++n2_,
2247
- ++n3_,
2248
- ++n4_,
2249
- ++n5_);
2250
- finished_ = true;
2251
- }
2252
-
2253
- // Tests a successful EXPECT_PRED_FORMAT5 where the
2254
- // predicate-formatter is a functor on a user-defined type (Bool).
2255
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) {
2256
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
2257
- Bool(++n1_),
2258
- Bool(++n2_),
2259
- Bool(++n3_),
2260
- Bool(++n4_),
2261
- Bool(++n5_));
2262
- finished_ = true;
2263
- }
2264
-
2265
- // Tests a failed EXPECT_PRED_FORMAT5 where the
2266
- // predicate-formatter is a function on a built-in type (int).
2267
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) {
2268
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2269
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
2270
- n1_++,
2271
- n2_++,
2272
- n3_++,
2273
- n4_++,
2274
- n5_++);
2275
- finished_ = true;
2276
- }, "");
2277
- }
2278
-
2279
- // Tests a failed EXPECT_PRED_FORMAT5 where the
2280
- // predicate-formatter is a function on a user-defined type (Bool).
2281
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) {
2282
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2283
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
2284
- Bool(n1_++),
2285
- Bool(n2_++),
2286
- Bool(n3_++),
2287
- Bool(n4_++),
2288
- Bool(n5_++));
2289
- finished_ = true;
2290
- }, "");
2291
- }
2292
-
2293
- // Tests a failed EXPECT_PRED_FORMAT5 where the
2294
- // predicate-formatter is a functor on a built-in type (int).
2295
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) {
2296
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2297
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
2298
- n1_++,
2299
- n2_++,
2300
- n3_++,
2301
- n4_++,
2302
- n5_++);
2303
- finished_ = true;
2304
- }, "");
2305
- }
2306
-
2307
- // Tests a failed EXPECT_PRED_FORMAT5 where the
2308
- // predicate-formatter is a functor on a user-defined type (Bool).
2309
- TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) {
2310
- EXPECT_NONFATAL_FAILURE({ // NOLINT
2311
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
2312
- Bool(n1_++),
2313
- Bool(n2_++),
2314
- Bool(n3_++),
2315
- Bool(n4_++),
2316
- Bool(n5_++));
2317
- finished_ = true;
2318
- }, "");
2319
- }
2320
-
2321
- // Tests a successful ASSERT_PRED_FORMAT5 where the
2322
- // predicate-formatter is a function on a built-in type (int).
2323
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) {
2324
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
2325
- ++n1_,
2326
- ++n2_,
2327
- ++n3_,
2328
- ++n4_,
2329
- ++n5_);
2330
- finished_ = true;
2331
- }
2332
-
2333
- // Tests a successful ASSERT_PRED_FORMAT5 where the
2334
- // predicate-formatter is a function on a user-defined type (Bool).
2335
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) {
2336
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
2337
- Bool(++n1_),
2338
- Bool(++n2_),
2339
- Bool(++n3_),
2340
- Bool(++n4_),
2341
- Bool(++n5_));
2342
- finished_ = true;
2343
- }
2344
-
2345
- // Tests a successful ASSERT_PRED_FORMAT5 where the
2346
- // predicate-formatter is a functor on a built-in type (int).
2347
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) {
2348
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
2349
- ++n1_,
2350
- ++n2_,
2351
- ++n3_,
2352
- ++n4_,
2353
- ++n5_);
2354
- finished_ = true;
2355
- }
2356
-
2357
- // Tests a successful ASSERT_PRED_FORMAT5 where the
2358
- // predicate-formatter is a functor on a user-defined type (Bool).
2359
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) {
2360
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
2361
- Bool(++n1_),
2362
- Bool(++n2_),
2363
- Bool(++n3_),
2364
- Bool(++n4_),
2365
- Bool(++n5_));
2366
- finished_ = true;
2367
- }
2368
-
2369
- // Tests a failed ASSERT_PRED_FORMAT5 where the
2370
- // predicate-formatter is a function on a built-in type (int).
2371
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) {
2372
- expected_to_finish_ = false;
2373
- EXPECT_FATAL_FAILURE({ // NOLINT
2374
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
2375
- n1_++,
2376
- n2_++,
2377
- n3_++,
2378
- n4_++,
2379
- n5_++);
2380
- finished_ = true;
2381
- }, "");
2382
- }
2383
-
2384
- // Tests a failed ASSERT_PRED_FORMAT5 where the
2385
- // predicate-formatter is a function on a user-defined type (Bool).
2386
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) {
2387
- expected_to_finish_ = false;
2388
- EXPECT_FATAL_FAILURE({ // NOLINT
2389
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
2390
- Bool(n1_++),
2391
- Bool(n2_++),
2392
- Bool(n3_++),
2393
- Bool(n4_++),
2394
- Bool(n5_++));
2395
- finished_ = true;
2396
- }, "");
2397
- }
2398
-
2399
- // Tests a failed ASSERT_PRED_FORMAT5 where the
2400
- // predicate-formatter is a functor on a built-in type (int).
2401
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) {
2402
- expected_to_finish_ = false;
2403
- EXPECT_FATAL_FAILURE({ // NOLINT
2404
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
2405
- n1_++,
2406
- n2_++,
2407
- n3_++,
2408
- n4_++,
2409
- n5_++);
2410
- finished_ = true;
2411
- }, "");
2412
- }
2413
-
2414
- // Tests a failed ASSERT_PRED_FORMAT5 where the
2415
- // predicate-formatter is a functor on a user-defined type (Bool).
2416
- TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) {
2417
- expected_to_finish_ = false;
2418
- EXPECT_FATAL_FAILURE({ // NOLINT
2419
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
2420
- Bool(n1_++),
2421
- Bool(n2_++),
2422
- Bool(n3_++),
2423
- Bool(n4_++),
2424
- Bool(n5_++));
2425
- finished_ = true;
2426
- }, "");
2427
- }