mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Add btest for vector bit-shift operators
This commit is contained in:
parent
8fff3c76b9
commit
25f88bc394
1 changed files with 5 additions and 0 deletions
|
@ -226,4 +226,9 @@ event zeek_init()
|
|||
v21[3:] = vector();
|
||||
print "hole in vector of managed types after replacing slice", |v21|, v21;
|
||||
|
||||
# Test << and >> operators.
|
||||
local v22 = v6 << 1;
|
||||
local v23 = v6 >> 1;
|
||||
test_case( "left shift", all_set(v22 == vector(20, 40, 60)) );
|
||||
test_case( "right shift", all_set(v23 == vector(5, 10, 15)) );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue