mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
Merge branch 'fix-set-intersection' of github.com:/ynadji/zeek
* 'fix-set-intersection' of github.com:/ynadji/zeek: Curse you tabs! Remove unused tbl Add reverse order intersection check Fix C++ Intersection code Change set intersection test to be correct
This commit is contained in:
commit
f080a814c4
5 changed files with 11 additions and 5 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
||||||
|
4.2.0-dev.292 | 2021-11-04 14:28:35 -0700
|
||||||
|
|
||||||
|
* Fix C++ set intersection code (Yacin Nadji, Corelight)
|
||||||
|
|
||||||
4.2.0-dev.286 | 2021-11-03 09:36:41 -0700
|
4.2.0-dev.286 | 2021-11-03 09:36:41 -0700
|
||||||
|
|
||||||
* GH-693: use pcap_dump_open_append where supported (Tim Wojtulewicz, Corelight)
|
* GH-693: use pcap_dump_open_append where supported (Tim Wojtulewicz, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
4.2.0-dev.286
|
4.2.0-dev.292
|
||||||
|
|
|
@ -1715,8 +1715,7 @@ TableValPtr TableVal::Intersection(const TableVal& tv) const
|
||||||
t0 = tmp;
|
t0 = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PDict<TableEntryVal>* tbl = AsTable();
|
for ( const auto& tble : *t1 )
|
||||||
for ( const auto& tble : *tbl )
|
|
||||||
{
|
{
|
||||||
auto k = tble.GetHashKey();
|
auto k = tble.GetHashKey();
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,8 @@ remove element (PASS)
|
||||||
remove element (PASS)
|
remove element (PASS)
|
||||||
!in operator (PASS)
|
!in operator (PASS)
|
||||||
union (PASS)
|
union (PASS)
|
||||||
intersection (FAIL)
|
intersection (PASS)
|
||||||
|
intersection (PASS)
|
||||||
difference (PASS)
|
difference (PASS)
|
||||||
difference (PASS)
|
difference (PASS)
|
||||||
union/inter. (PASS)
|
union/inter. (PASS)
|
||||||
|
|
|
@ -148,9 +148,11 @@ function basic_functionality()
|
||||||
|
|
||||||
local a_or_b = a | b;
|
local a_or_b = a | b;
|
||||||
local a_and_b = a & b;
|
local a_and_b = a & b;
|
||||||
|
local b_and_a = b & a;
|
||||||
|
|
||||||
test_case( "union", a_or_b == a_plus_b );
|
test_case( "union", a_or_b == a_plus_b );
|
||||||
test_case( "intersection", a_and_b == a_plus_b );
|
test_case( "intersection", a_and_b == a_also_b );
|
||||||
|
test_case( "intersection", b_and_a == a_also_b );
|
||||||
test_case( "difference", a - b == a_sans_b );
|
test_case( "difference", a - b == a_sans_b );
|
||||||
test_case( "difference", b - a == b_sans_a );
|
test_case( "difference", b - a == b_sans_a );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue