SPAKE2/SPAKE2+ password-authenticated key exchange for OCaml
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

+18 -14
+18 -14
fuzz/fuzz_spake2.ml
··· 66 66 let bytes2 = Spake2.P256.to_bytes m_plus_g in 67 67 check_eq ~pp:Format.pp_print_string bytes1 bytes2 68 68 69 - let () = 70 - add_test ~name:"spake2: roundtrip" [ bytes ] (fun password -> 71 - test_spake2_roundtrip password); 72 - add_test ~name:"spake2+: roundtrip" [ bytes; bytes ] (fun password salt -> 73 - test_spake2_plus_roundtrip password salt); 74 - add_test ~name:"p256: point encoding roundtrip" [ bytes; bytes ] (fun x y -> 75 - test_p256_point_encoding_roundtrip x y); 76 - (* Run constant property tests once with dummy input *) 77 - add_test ~name:"p256: negate involutive" 78 - [ const () ] 79 - (fun () -> test_p256_negate_involutive ()); 80 - add_test ~name:"p256: add commutative" 81 - [ const () ] 82 - (fun () -> test_p256_add_commutative ()) 69 + let suite = 70 + ( "spake2", 71 + [ 72 + test_case "roundtrip" [ bytes ] (fun password -> 73 + test_spake2_roundtrip password); 74 + test_case "spake2+ roundtrip" [ bytes; bytes ] (fun password salt -> 75 + test_spake2_plus_roundtrip password salt); 76 + test_case "p256 point encoding roundtrip" [ bytes; bytes ] (fun x y -> 77 + test_p256_point_encoding_roundtrip x y); 78 + test_case "p256 negate involutive" 79 + [ const () ] 80 + (fun () -> test_p256_negate_involutive ()); 81 + test_case "p256 add commutative" 82 + [ const () ] 83 + (fun () -> test_p256_add_commutative ()); 84 + ] ) 85 + 86 + let () = run "spake2" [ suite ]