mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Merge remote-tracking branch 'origin/topic/johanna/1095-just-get-rid-of-it'
* origin/topic/johanna/1095-just-get-rid-of-it: Re-add TYPE_COUNTER without function and deprecation marker. Completely remove all traces of the COUNTER type.
This commit is contained in:
commit
22b401f52f
26 changed files with 24 additions and 69 deletions
|
@ -1,5 +1,4 @@
|
|||
type inference (PASS)
|
||||
counter alias (PASS)
|
||||
hexadecimal (PASS)
|
||||
inequality operator (PASS)
|
||||
relational operator (PASS)
|
||||
|
@ -19,9 +18,6 @@ bitwise and (PASS)
|
|||
bitwise and (PASS)
|
||||
bitwise or (PASS)
|
||||
bitwise or (PASS)
|
||||
bitwise or (PASS)
|
||||
bitwise xor (PASS)
|
||||
bitwise xor (PASS)
|
||||
bitwise xor (PASS)
|
||||
bitwise complement (PASS)
|
||||
bitwise complement (PASS)
|
||||
|
|
|
@ -15,16 +15,12 @@ event zeek_init()
|
|||
local c4: count = 255;
|
||||
local c5: count = 18446744073709551615; # maximum allowed value
|
||||
local c6: count = 0xffffffffffffffff; # maximum allowed value
|
||||
local c7: counter = 5;
|
||||
local c8 = 1;
|
||||
local c7 = 1;
|
||||
|
||||
# Type inference test
|
||||
|
||||
test_case( "type inference", type_name(c8) == "count" );
|
||||
test_case( "type inference", type_name(c7) == "count" );
|
||||
|
||||
# Counter alias test
|
||||
|
||||
test_case( "counter alias", c2 == c7 );
|
||||
|
||||
# Test various constant representations
|
||||
|
||||
|
@ -49,13 +45,10 @@ event zeek_init()
|
|||
test_case( "assignment operator", c2 == 6 );
|
||||
test_case( "bitwise and", c2 & 0x4 == 0x4 );
|
||||
test_case( "bitwise and", c4 & 0x4 == 0x4 );
|
||||
test_case( "bitwise and", c8 & 0x4 == 0x0 );
|
||||
test_case( "bitwise and", c7 & 0x4 == 0x0 );
|
||||
test_case( "bitwise or", c2 | 0x4 == c2 );
|
||||
test_case( "bitwise or", c4 | 0x4 == c4 );
|
||||
test_case( "bitwise or", c8 | 0x4 == c7 );
|
||||
test_case( "bitwise xor", c7 ^ 0x4 == c8 );
|
||||
test_case( "bitwise xor", c4 ^ 0x4 == 251 );
|
||||
test_case( "bitwise xor", c8 ^ 0x4 == c7 );
|
||||
test_case( "bitwise complement", ~c6 == 0 );
|
||||
test_case( "bitwise complement", ~~c4 == c4 );
|
||||
|
||||
|
|
|
@ -179,7 +179,6 @@ void Plugin::RenderVal(const threading::Value* val, ODesc &d) const
|
|||
break;
|
||||
|
||||
case TYPE_COUNT:
|
||||
case TYPE_COUNTER:
|
||||
d.Add(val->val.uint_val);
|
||||
break;
|
||||
|
||||
|
|
|
@ -107,7 +107,6 @@ threading::Value* Foo::EntryToVal(zeek::TypeTag type, zeek::TypeTag subtype)
|
|||
break;
|
||||
|
||||
case zeek::TYPE_COUNT:
|
||||
case zeek::TYPE_COUNTER:
|
||||
val->val.uint_val = random();
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue