Fix val_size BIF tests and improve docs

Improve documentation of "order" BIF, and made the "val_size" tests
more portable.
This commit is contained in:
Daniel Thayer 2012-06-08 15:25:49 -05:00
parent 83dcbd4aa7
commit 18e61fcdfc
4 changed files with 13 additions and 10 deletions

View file

@ -1,2 +0,0 @@
72
72

View file

@ -22,8 +22,7 @@ function myfunc2(a: double, b: double): int
event bro_init()
{
# TODO: these results don't make sense
# Tests without supplying a comparison function
local a1 = vector( 5, 2, 8, 3 );

View file

@ -1,12 +1,16 @@
#
# @TEST-EXEC: bro %INPUT > out
# @TEST-EXEC: btest-diff out
# @TEST-EXEC: bro %INPUT
event bro_init()
{
local a = 1;
local b = T;
local a = T;
local b = 12;
local c: table[string] of addr = { ["a"] = 192.168.0.2, ["b"] = 10.0.0.2 };
if ( val_size(a) > val_size(b) )
exit(1);
if ( val_size(b) > val_size(c) )
exit(1);
print val_size(a);
print val_size(b);
}