zeek/testing/btest/bifs/count_to_addr.bro
Jon Siwek 95ffb1cf27 Quick pass over unit tests, adding -b flag to bro so they run faster.
Doing this made bifs/ ~3x faster and language/ ~2x faster.
2012-11-30 17:44:36 -06:00

20 lines
434 B
Text

#
# @TEST-EXEC: bro -b %INPUT >out
# @TEST-EXEC: btest-diff out
event bro_init()
{
local a = "1";
print count_to_v4_addr(to_count(a));
a = "806716794";
print count_to_v4_addr(to_count(a));
a = "4294967295";
print count_to_v4_addr(to_count(a));
# This *should* fail and return 0.0.0.0 since it's 255.255.255.255 + 1
# Note: How do I check for runtime errors?
a = "4294967296";
print count_to_v4_addr(to_count(a));
}