HomeKit Accessory Protocol (HAP) 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

+12 -8
+12 -8
fuzz/fuzz_hap.ml
··· 42 42 let _ = Hap.category_name code in 43 43 check true 44 44 45 - let () = 46 - add_test ~name:"hap: TLV decode/encode no crash" [ bytes ] 47 - test_tlv_decode_encode; 48 - add_test ~name:"hap: TLV roundtrip" [ range 256; bytes ] test_tlv_roundtrip; 49 - add_test ~name:"hap: TLV multi roundtrip" 50 - [ list (pair (range 256) bytes) ] 51 - test_tlv_multi_roundtrip; 52 - add_test ~name:"hap: category_name no crash" [ int ] test_category_name 45 + let suite = 46 + ( "hap", 47 + [ 48 + test_case "TLV decode/encode no crash" [ bytes ] test_tlv_decode_encode; 49 + test_case "TLV roundtrip" [ range 256; bytes ] test_tlv_roundtrip; 50 + test_case "TLV multi roundtrip" 51 + [ list (pair (range 256) bytes) ] 52 + test_tlv_multi_roundtrip; 53 + test_case "category_name no crash" [ int ] test_category_name; 54 + ] ) 55 + 56 + let () = run "hap" [ suite ]