Download best_poker_hand/ocaml_tests/main.ml from FPEvalDataset/LeetCodeProblem: direct link, hf CLI and curl.
- Browser
- Download file 597 Bytes
-
https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/main/best_poker_hand/ocaml_tests/main.ml
- Command line
-
hf download hf://datasets/FPEvalDataset/LeetCodeProblem/best_poker_hand/ocaml_tests/main.ml
-
curl -L -o main.ml https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/main/best_poker_hand/ocaml_tests/main.ml
597 Bytes
| module Main = struct | |
| open OUnit2 | |
| (* Program start *) | |
| (* Program end *) | |
| (* Test cases *) | |
| let test1 _ = assert_equal "Flush" (bestHand [13;2;3;1;9] ["a";"a";"a";"a";"a"]) | |
| let test2 _ = assert_equal "Three of a Kind" (bestHand [4;4;2;4;4] ["d";"a";"a";"b";"c"]) | |
| let test3 _ = assert_equal "Pair" (bestHand [10;10;2;12;9] ["a";"b";"c";"a";"d"]) | |
| (* Grouping test cases *) | |
| let suite = "Test Suite for bestHand" >::: [ | |
| "test1" >:: test1; | |
| "test2" >:: test2; | |
| "test3" >:: test3; | |
| ] | |
| (* Running the tests *) | |
| let () = run_test_tt_main suite | |
| end | |