SpaceOS wire protocol codecs for host-guest communication

test(space-wire): add tests for space_wire_3d 3D schema generation

Covers struct name validation, module count consistency, and
non-trivial 3D output for all six codecs. Uses test.ml runner
with suite convention per E600.

+79
+3
test/wire/dune
··· 1 + (test 2 + (name test) 3 + (libraries space_wire_3d wire alcotest))
+1
test/wire/test.ml
··· 1 + let () = Alcotest.run "space-wire-3d" [ Test_space_wire_3d.suite ]
+71
test/wire/test_space_wire_3d.ml
··· 1 + open Space_wire_3d 2 + 3 + let test_all_structs_non_empty () = 4 + let structs = all_structs in 5 + Alcotest.(check bool) "non-empty" true (List.length structs > 0); 6 + List.iter 7 + (fun (name, s) -> 8 + Alcotest.(check bool) 9 + (name ^ " name matches") true 10 + (String.equal (Wire.struct_name s) name)) 11 + structs 12 + 13 + let test_all_modules_non_empty () = 14 + let mods = all_modules in 15 + Alcotest.(check bool) "non-empty" true (List.length mods > 0); 16 + Alcotest.(check int) 17 + "same count as structs" (List.length all_structs) (List.length mods) 18 + 19 + let test_to_3d_output () = 20 + List.iter 21 + (fun (name, m) -> 22 + let output = Wire.to_3d m in 23 + Alcotest.(check bool) 24 + (name ^ " non-empty output") 25 + true 26 + (String.length output > 0); 27 + Alcotest.(check bool) 28 + (name ^ " has substantial output") 29 + true 30 + (String.length output > 10)) 31 + all_modules 32 + 33 + let test_frame_struct () = 34 + Alcotest.(check string) "name" "SpaceOSFrame" (Wire.struct_name frame_struct) 35 + 36 + let test_error_payload_struct () = 37 + Alcotest.(check string) 38 + "name" "ErrorPayload" 39 + (Wire.struct_name error_payload_struct) 40 + 41 + let test_dp_payload_struct () = 42 + Alcotest.(check string) 43 + "name" "DpPayload" 44 + (Wire.struct_name dp_payload_struct) 45 + 46 + let test_superblock_struct () = 47 + Alcotest.(check string) 48 + "name" "Superblock" 49 + (Wire.struct_name superblock_struct) 50 + 51 + let test_param_entry_struct () = 52 + Alcotest.(check string) 53 + "name" "ParamEntry" 54 + (Wire.struct_name param_entry_struct) 55 + 56 + let test_event_log_struct () = 57 + Alcotest.(check string) "name" "EventLog" (Wire.struct_name event_log_struct) 58 + 59 + let suite = 60 + ( "space_wire_3d", 61 + [ 62 + Alcotest.test_case "all structs" `Quick test_all_structs_non_empty; 63 + Alcotest.test_case "all modules" `Quick test_all_modules_non_empty; 64 + Alcotest.test_case "3d output" `Quick test_to_3d_output; 65 + Alcotest.test_case "frame struct" `Quick test_frame_struct; 66 + Alcotest.test_case "error payload struct" `Quick test_error_payload_struct; 67 + Alcotest.test_case "dp payload struct" `Quick test_dp_payload_struct; 68 + Alcotest.test_case "superblock struct" `Quick test_superblock_struct; 69 + Alcotest.test_case "param entry struct" `Quick test_param_entry_struct; 70 + Alcotest.test_case "event log struct" `Quick test_event_log_struct; 71 + ] )
+4
test/wire/test_space_wire_3d.mli
··· 1 + (** Space_wire_3d tests. *) 2 + 3 + val suite : string * unit Alcotest.test_case list 4 + (** Alcotest suite for {!Space_wire_3d}. *)