diff --git a/src/bro.bif b/src/bro.bif index b49c88058a..721d0704f1 100644 --- a/src/bro.bif +++ b/src/bro.bif @@ -1494,6 +1494,8 @@ function sort%(v: any, ...%) : any ## v: The vector whose order to compute. ## ## Returns: A ``vector of count`` with the indices of the ordered elements. +## For example, the elements of *v* in order are (assuming ``o`` +## is the vector returned by ``order``): v[o[0]], v[o[1]], etc. ## ## .. bro:see:: sort function order%(v: any, ...%) : index_vec diff --git a/testing/btest/Baseline/bifs.val_size/out b/testing/btest/Baseline/bifs.val_size/out deleted file mode 100644 index 16b548f269..0000000000 --- a/testing/btest/Baseline/bifs.val_size/out +++ /dev/null @@ -1,2 +0,0 @@ -72 -72 diff --git a/testing/btest/bifs/order.bro b/testing/btest/bifs/order.bro index 5f3260ee3f..333a8acac1 100644 --- a/testing/btest/bifs/order.bro +++ b/testing/btest/bifs/order.bro @@ -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 ); diff --git a/testing/btest/bifs/val_size.bro b/testing/btest/bifs/val_size.bro index b779460b9b..5b2e535c5c 100644 --- a/testing/btest/bifs/val_size.bro +++ b/testing/btest/bifs/val_size.bro @@ -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); }