Fix bifs.to_count and bifs.to_int btests under ZAM

This commit is contained in:
Tim Wojtulewicz 2025-02-20 17:24:50 -07:00
parent bcecc6ea51
commit caeae0b777
3 changed files with 18 additions and 1 deletions

View file

@ -471,7 +471,7 @@ static std::unordered_map<std::string, unsigned int> func_attrs = {
{"to_addr", ATTR_IDEMPOTENT}, // can error
{"to_count", ATTR_IDEMPOTENT}, // can error
{"to_double", ATTR_IDEMPOTENT}, // can error
{"to_int", ATTR_FOLDABLE},
{"to_int", ATTR_IDEMPOTENT}, // can error
{"to_json", ATTR_FOLDABLE},
{"to_lower", ATTR_FOLDABLE},
{"to_port", ATTR_IDEMPOTENT}, // can error

View file

@ -0,0 +1,4 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
error in <...>/to_count.zeek, line 8: bad conversion to count (int_to_count(-2) and -2)
error in <...>/to_count.zeek, line 20: bad conversion to count (to_count() and )
error in <...>/to_count.zeek, line 25: bad conversion to count (to_count(not a count) and not a count)

View file

@ -0,0 +1,13 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
0
2
3
4
7
0
18446744073709551611
205
206
0
123
9223372036854775808 and 9223372036854775808 are the same