zeek/testing/btest/bifs/to_interval.zeek
Jon Siwek e17487e799 GH-985: Fix descriptions of double_to_interval() return values
The BIF was not returning an IntervalVal which has an overriden
ValDescribe() method that allows for prettier printing like "6.0 secs"
instead of just "6.0".
2020-06-02 16:47:11 -07:00

13 lines
286 B
Text

#
# @TEST-EXEC: zeek -b %INPUT >out
# @TEST-EXEC: btest-diff out
event zeek_init()
{
local a = double_to_interval(1234563.140);
print type_name(a), a;
local b = double_to_interval(-1234563.14);
print type_name(b), b;
local c = double_to_interval(6.0);
print type_name(c), c;
}