mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
fix vector tests, including checking for errors
This commit is contained in:
parent
6d16f9bb42
commit
8d3265d540
3 changed files with 9 additions and 2 deletions
4
testing/btest/Baseline/language.vector/.stderr
Normal file
4
testing/btest/Baseline/language.vector/.stderr
Normal file
|
@ -0,0 +1,4 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
warning in /Users/vern/warehouse/zeek/zeek-master.29Jul22/testing/btest/.tmp/language.vector/vector.zeek, line 173: mixing vector and scalar operands is deprecated (vector) (string)
|
||||
warning in /Users/vern/warehouse/zeek/zeek-master.29Jul22/testing/btest/.tmp/language.vector/vector.zeek, line 179: mixing vector and scalar operands is deprecated (string) (vector)
|
||||
warning in /Users/vern/warehouse/zeek/zeek-master.29Jul22/testing/btest/.tmp/language.vector/vector.zeek, line 182: mixing vector and scalar operands is deprecated (string) (vector)
|
|
@ -81,3 +81,5 @@ copy of a vector with holes (PASS)
|
|||
copy of a vector with trailing holes, [0, 2, 3, 77, , ], [0, 2, 3, 77, , ]
|
||||
hole in vector of managed types, 5, [[a=T], [a=T], , , [a=T]]
|
||||
hole in vector of managed types after replacing slice, 3, [[a=T], [a=T], ]
|
||||
left shift (PASS)
|
||||
right shift (PASS)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
# @TEST-EXEC: btest-diff .stderr
|
||||
|
||||
function test_case(msg: string, expect: bool)
|
||||
{
|
||||
|
@ -229,6 +230,6 @@ event zeek_init()
|
|||
# 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)) );
|
||||
test_case( "left shift", all_set(v22 == vector(20, 40, 60, 80)) );
|
||||
test_case( "right shift", all_set(v23 == vector(5, 10, 15, 20)) );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue