CoolFace
Datasetpublic

FPEvalDataset/LeetCodeProblem

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes305downloads
main.ml27 linesDownload Raw Back to ocaml_tests
1 2module Main = struct3    open OUnit24 5    (* Program start *)6 7    (* Program end *)8 9    (* Test cases *)10    11let test1 _ = assert_equal [[9;9];[8;6]] (largestLocal [[9;9;8;1];[5;6;2;6];[8;2;6;4];[6;2;2;2]])12 13let test2 _ = assert_equal [[2;2;2];[2;2;2];[2;2;2]] (largestLocal [[1;1;1;1;1];[1;1;1;1;1];[1;1;2;1;1];[1;1;1;1;1];[1;1;1;1;1]])14 15 16    (* Grouping test cases *)17    let suite = "Test Suite for largestLocal" >::: [18        19  "test1" >:: test1;20  "test2" >:: test2;21    ]22 23 24    (* Running the tests *)25    let () = run_test_tt_main suite26end27