Download replace_elements_in_an_array/ocaml_tests/main.ml from FPEvalDataset/LeetCodeProblem: direct link, hf CLI and curl.
- Browser
- Download file 479 Bytes
-
https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/6c3b9779afb083bed1393e1d644d7105f88bca80/replace_elements_in_an_array/ocaml_tests/main.ml
- Command line
-
hf download hf://datasets/FPEvalDataset/LeetCodeProblem@6c3b9779afb083bed1393e1d644d7105f88bca80/replace_elements_in_an_array/ocaml_tests/main.ml
-
curl -L -o main.ml https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/6c3b9779afb083bed1393e1d644d7105f88bca80/replace_elements_in_an_array/ocaml_tests/main.ml
479 Bytes
| module Main = struct | |
| open OUnit2 | |
| (* Program start *) | |
| (* Program end *) | |
| (* Test cases *) | |
| let test1 _ = assert_equal [3;2;7;1] (arrayChange [1;2;4;6] [[1;3];[4;7];[6;1]]) | |
| let test2 _ = assert_equal [2;1] (arrayChange [1;2] [[1;3];[2;1];[3;2]]) | |
| (* Grouping test cases *) | |
| let suite = "Test Suite for arrayChange" >::: [ | |
| "test1" >:: test1; | |
| "test2" >:: test2; | |
| ] | |
| (* Running the tests *) | |
| let () = run_test_tt_main suite | |
| end | |