Skip to content

Commit ce8233d

Browse files
committed
Fix the tests
1 parent 460aade commit ce8233d

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/blocker.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,10 +2187,20 @@ mod legacy_rule_parsing_tests {
21872187
// difference from original counts caused by not handling document/subdocument options and possibly miscounting on the blocker side.
21882188
// Printing all non-cosmetic, non-html, non-comment/-empty rules and ones with no unsupported options yields 29142 items
21892189
// This engine also handles 3 rules that old one does not
2190-
const EASY_LIST: ListCounts = ListCounts { filters: 24064, cosmetic_filters: 31163, exceptions: 5796, duplicates: 0 };
2190+
const EASY_LIST: ListCounts = ListCounts {
2191+
filters: 35597, // 36259 - 662 exceptions
2192+
cosmetic_filters: 23080,
2193+
exceptions: 662,
2194+
duplicates: 0
2195+
};
21912196
// easyPrivacy = { 11817, 0, 0, 1020 };
21922197
// differences in counts explained by hashset size underreporting as detailed in the next two cases
2193-
const EASY_PRIVACY: ListCounts = ListCounts { filters: 11889, cosmetic_filters: 0, exceptions: 1021, duplicates: 2 };
2198+
const EASY_PRIVACY: ListCounts = ListCounts {
2199+
filters: 52278, // 52998 - 720 exceptions
2200+
cosmetic_filters: 21,
2201+
exceptions: 720,
2202+
duplicates: 2
2203+
};
21942204
// ublockUnbreak = { 4, 8, 0, 94 };
21952205
// differences in counts explained by client.hostAnchoredExceptionHashSet->GetSize() underreporting when compared to client.numHostAnchoredExceptionFilters
21962206
const UBLOCK_UNBREAK: ListCounts = ListCounts { filters: 4, cosmetic_filters: 8, exceptions: 98, duplicates: 0 };

src/filters/network.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3418,7 +3418,7 @@ mod hash_collision_tests {
34183418
let rules = test_utils::rules_from_lists([
34193419
"data/easylist.to/easylist/easylist.txt",
34203420
"data/easylist.to/easylist/easyprivacy.txt",
3421-
]);
3421+
]).filter(|f| *f != "||www.bred4tula.com^"); // remove known collision
34223422
let (network_filters, _) = parse_filters(rules, true, Default::default());
34233423

34243424
let mut filter_ids: HashMap<Hash, String> = HashMap::new();

0 commit comments

Comments
 (0)