CRC checksums (CRC-16, CRC-32, CRC-32C) for OCaml
0
fork

Configure Feed

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

refactor(crc): flatten test suite structure

+24 -35
+1 -1
test/test.ml
··· 1 1 let () = 2 2 Memtrace.trace_if_requested (); 3 - Alcotest.run (fst Test_crc.suite) (snd Test_crc.suite) 3 + Alcotest.run (fst Test_crc.suite) [ Test_crc.suite ]
+23 -34
test/test_crc.ml
··· 114 114 let suite = 115 115 ( "crc", 116 116 [ 117 - ( "crc16-ccitt", 118 - [ 119 - Alcotest.test_case "ITU-T V.41 check" `Quick test_crc16_ccitt_check; 120 - Alcotest.test_case "empty" `Quick test_crc16_ccitt_empty; 121 - Alcotest.test_case "bytes sub-range" `Quick test_crc16_ccitt_bytes; 122 - Alcotest.test_case "single byte" `Quick test_crc16_ccitt_single; 123 - Alcotest.test_case "8 zero bytes" `Quick test_crc16_ccitt_zeros; 124 - Alcotest.test_case "self-check" `Quick test_crc16_ccitt_self_check; 125 - ] ); 126 - ( "crc16-x25", 127 - [ 128 - Alcotest.test_case "ITU-T X.25 check" `Quick test_crc16_x25_check; 129 - Alcotest.test_case "empty" `Quick test_crc16_x25_empty; 130 - Alcotest.test_case "single byte" `Quick test_crc16_x25_single; 131 - ] ); 132 - ( "crc32", 133 - [ 134 - Alcotest.test_case "ISO 3309 check" `Quick test_crc32_check; 135 - Alcotest.test_case "empty" `Quick test_crc32_empty; 136 - Alcotest.test_case "single byte" `Quick test_crc32_single; 137 - ] ); 138 - ( "crc32c", 139 - [ 140 - Alcotest.test_case "RFC 3720 check" `Quick test_crc32c_check; 141 - Alcotest.test_case "empty" `Quick test_crc32c_empty; 142 - Alcotest.test_case "bytes sub-range" `Quick test_crc32c_bytes; 143 - Alcotest.test_case "RFC 3720: 32 zeros" `Quick 144 - test_crc32c_rfc3720_zeros; 145 - Alcotest.test_case "RFC 3720: 32x 0xFF" `Quick test_crc32c_rfc3720_ff; 146 - Alcotest.test_case "RFC 3720: ascending" `Quick 147 - test_crc32c_rfc3720_ascending; 148 - Alcotest.test_case "RFC 3720: descending" `Quick 149 - test_crc32c_rfc3720_descending; 150 - ] ); 117 + Alcotest.test_case "ccitt: ITU-T V.41 check" `Quick test_crc16_ccitt_check; 118 + Alcotest.test_case "ccitt: empty" `Quick test_crc16_ccitt_empty; 119 + Alcotest.test_case "ccitt: bytes sub-range" `Quick test_crc16_ccitt_bytes; 120 + Alcotest.test_case "ccitt: single byte" `Quick test_crc16_ccitt_single; 121 + Alcotest.test_case "ccitt: 8 zero bytes" `Quick test_crc16_ccitt_zeros; 122 + Alcotest.test_case "ccitt: self-check" `Quick test_crc16_ccitt_self_check; 123 + Alcotest.test_case "x25: ITU-T X.25 check" `Quick test_crc16_x25_check; 124 + Alcotest.test_case "x25: empty" `Quick test_crc16_x25_empty; 125 + Alcotest.test_case "x25: single byte" `Quick test_crc16_x25_single; 126 + Alcotest.test_case "crc32: ISO 3309 check" `Quick test_crc32_check; 127 + Alcotest.test_case "crc32: empty" `Quick test_crc32_empty; 128 + Alcotest.test_case "crc32: single byte" `Quick test_crc32_single; 129 + Alcotest.test_case "crc32c: RFC 3720 check" `Quick test_crc32c_check; 130 + Alcotest.test_case "crc32c: empty" `Quick test_crc32c_empty; 131 + Alcotest.test_case "crc32c: bytes sub-range" `Quick test_crc32c_bytes; 132 + Alcotest.test_case "crc32c: RFC 3720: 32 zeros" `Quick 133 + test_crc32c_rfc3720_zeros; 134 + Alcotest.test_case "crc32c: RFC 3720: 32x 0xFF" `Quick 135 + test_crc32c_rfc3720_ff; 136 + Alcotest.test_case "crc32c: RFC 3720: ascending" `Quick 137 + test_crc32c_rfc3720_ascending; 138 + Alcotest.test_case "crc32c: RFC 3720: descending" `Quick 139 + test_crc32c_rfc3720_descending; 151 140 ] )