Stmt: Introduce assert statement and related hooks

including two hooks called assertion_failure() and assertion_result() for
customization and tracking of assertion results.
This commit is contained in:
Arne Welzel 2023-06-05 19:13:14 +02:00
parent a25b1a9d59
commit 25ea678626
41 changed files with 635 additions and 3 deletions

View file

@ -0,0 +1 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.

View file

@ -0,0 +1,8 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
assertion_result T at <...>/assert-hook.zeek:24: md5_hash("") == "d41d8cd98f00b204e9800998ecf8427e"
assertion_result T at <...>/assert-hook.zeek:29: sha1_hash("") == "da39a3ee5e6b4b0d3255bfef95601890afd80709"
assertion_result F at <...>/assert-hook.zeek:34: sha1_hash("") == "wrong"
assertion_failure at <...>/assert-hook.zeek:34: sha1_hash("") == "wrong"
assertion_result F at <...>/assert-hook.zeek:39: md5_hash("") == "wrong"
assertion_failure at <...>/assert-hook.zeek:39: md5_hash("") == "wrong"
2 of 4 assertions failed