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