diff --git a/testing/btest/Baseline/bifs.to_port/out b/testing/btest/Baseline/bifs.to_port/out index fb8a536abb..79796d605e 100644 --- a/testing/btest/Baseline/bifs.to_port/out +++ b/testing/btest/Baseline/bifs.to_port/out @@ -1,6 +1,7 @@ 123/tcp 123/udp 123/icmp +0/unknown 256/tcp 256/udp 256/icmp diff --git a/testing/btest/Baseline/bifs.type_name/out b/testing/btest/Baseline/bifs.type_name/out index 610ee304fd..2c5cb408f9 100644 --- a/testing/btest/Baseline/bifs.type_name/out +++ b/testing/btest/Baseline/bifs.type_name/out @@ -1,5 +1,6 @@ string count +int double bool time @@ -18,3 +19,8 @@ set[string] table[count] of string table[string] of count record { c:count; s:string; } +function(aa:int; bb:int;) : bool +function() : any +function() : void +file of string +event() diff --git a/testing/btest/bifs/to_port.bro b/testing/btest/bifs/to_port.bro index 39a0cbed6b..382bf5d333 100644 --- a/testing/btest/bifs/to_port.bro +++ b/testing/btest/bifs/to_port.bro @@ -7,6 +7,7 @@ event bro_init() print to_port("123/tcp"); print to_port("123/udp"); print to_port("123/icmp"); + print to_port("not a port"); local a: transport_proto = tcp; local b: transport_proto = udp; diff --git a/testing/btest/bifs/type_name.bro b/testing/btest/bifs/type_name.bro index a8c51ef69d..531962e3f5 100644 --- a/testing/btest/bifs/type_name.bro +++ b/testing/btest/bifs/type_name.bro @@ -13,24 +13,29 @@ event bro_init() { local a = "foo"; local b = 3; - local c = 3.14; - local d = T; - local e = current_time(); - local f = 5hr; - local g = /^foo|bar/; - local h = Blue; - local i = 123/tcp; - local j = 192.168.0.2; - local k = [fe80::1]; - local l = 192.168.0.0/16; - local m = [fe80:1234::]/32; - local n = vector( 1, 2, 3); - local o = vector( "bro", "test"); - local p = set( 1, 2, 3); - local q = set( "this", "test"); - local r: table[count] of string = { [1] = "test", [2] = "bro" }; - local s: table[string] of count = { ["a"] = 5, ["b"] = 3 }; - local t: myrecord = [ $c = 2, $s = "another test" ]; + local c = -3; + local d = 3.14; + local e = T; + local f = current_time(); + local g = 5hr; + local h = /^foo|bar/; + local i = Blue; + local j = 123/tcp; + local k = 192.168.0.2; + local l = [fe80::1]; + local m = 192.168.0.0/16; + local n = [fe80:1234::]/32; + local o = vector( 1, 2, 3); + local p: vector of string = vector( "bro", "test" ); + local q = set( 1, 2, 3); + local r = set( "this", "test"); + local s: table[count] of string = { [1] = "test", [2] = "bro" }; + local t: table[string] of count = { ["a"] = 5, ["b"] = 3 }; + local u: myrecord = [ $c = 2, $s = "another test" ]; + local v = function(aa: int, bb: int): bool { return aa < bb; }; + local w = function(): any { }; + local x = function() { }; + local y = open("deleteme"); print type_name(a); print type_name(b); @@ -52,5 +57,10 @@ event bro_init() print type_name(r); print type_name(s); print type_name(t); - + print type_name(u); + print type_name(v); + print type_name(w); + print type_name(x); + print type_name(y); + print type_name(bro_init); }