Bloom filter for probabilistic membership testing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(crowbar): Alcotest-style API with suite exports and grouped run

- Change `run` signature to `string -> (string * test_case list) list -> unit`
matching Alcotest's grouping convention
- Fix `_name` bug: pass the name through to Alcotest.run_with_args
- Each fuzz module now exports `let suite = ("name", [test_case ...])`
- Entry points (fuzz.ml) collect suites: `Crowbar.run "pkg" [Fuzz_X.suite]`
- Remove stale `add_test`/`suite` API, keep only `test_case`/`run`
- Remove `let run () = ()` from fuzz_common.ml files
- Update merlint E725 rule to match new `let suite = ("name", ...)` pattern
- Update E725 test fixtures and expected output

+17 -22
-2
fuzz/fuzz.ml
··· 1 - (** Main fuzz test entry point. *) 2 - 3 1 let () = Fuzz_bloom.run ()
+17 -20
fuzz/fuzz_bloom.ml
··· 93 93 fail "should reject error_rate>1" 94 94 with Invalid_argument _ -> () 95 95 96 - let run () = 97 - add_test ~name:"bloom: no false negatives" 98 - [ bytes; list bytes ] 99 - test_no_false_negatives; 100 - add_test ~name:"bloom: serialization roundtrip" 101 - [ list bytes ] 102 - test_serialization_roundtrip; 103 - add_test ~name:"bloom: union contains both" 104 - [ list bytes; list bytes ] 105 - test_union; 106 - add_test ~name:"bloom: copy independence" 107 - [ list bytes; bytes ] 108 - test_copy_independence; 109 - add_test ~name:"bloom: clear empties filter" [ list bytes ] test_clear; 110 - add_test ~name:"bloom: intersection preserves common" 111 - [ list bytes ] 112 - test_intersection; 113 - add_test ~name:"bloom: invalid error_rate" 114 - [ const () ] 115 - test_invalid_error_rate 96 + let suite = 97 + ( "bloom", 98 + [ 99 + test_case "no false negatives" 100 + [ bytes; list bytes ] 101 + test_no_false_negatives; 102 + test_case "serialization roundtrip" 103 + [ list bytes ] 104 + test_serialization_roundtrip; 105 + test_case "union contains both" [ list bytes; list bytes ] test_union; 106 + test_case "copy independence" [ list bytes; bytes ] test_copy_independence; 107 + test_case "clear empties filter" [ list bytes ] test_clear; 108 + test_case "intersection preserves common" [ list bytes ] test_intersection; 109 + test_case "invalid error_rate" [ const () ] test_invalid_error_rate; 110 + ] ) 111 + 112 + let run () = Crowbar.run "bloom" [ suite ]