Download best_poker_hand/haskell_tests/Main.hs from FPEvalDataset/LeetCodeProblem: direct link, hf CLI and curl.
- Browser
- Download file 781 Bytes
-
https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/main/best_poker_hand/haskell_tests/Main.hs
- Command line
-
hf download hf://datasets/FPEvalDataset/LeetCodeProblem/best_poker_hand/haskell_tests/Main.hs
-
curl -L -o Main.hs https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/main/best_poker_hand/haskell_tests/Main.hs
781 Bytes
| module Main where | |
| import Test.HUnit | |
| --Program start | |
| --Program end | |
| -- Test cases | |
| test1 :: Test | |
| test1 = TestCase (assertEqual "for (bestHand [13,2,3,1,9] [ \"a \", \"a \", \"a \", \"a \", \"a \"])," "Flush" (bestHand [13,2,3,1,9] ["a","a","a","a","a"])) | |
| test2 :: Test | |
| test2 = TestCase (assertEqual "for (bestHand [4,4,2,4,4] [ \"d \", \"a \", \"a \", \"b \", \"c \"])," "ThreeofaKind" (bestHand [4,4,2,4,4] ["d","a","a","b","c"])) | |
| test3 :: Test | |
| test3 = TestCase (assertEqual "for (bestHand [10,10,2,12,9] [ \"a \", \"b \", \"c \", \"a \", \"d \"])," "Pair" (bestHand [10,10,2,12,9] ["a","b","c","a","d"])) | |
| -- Grouping test cases | |
| tests :: Test | |
| tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2] | |
| -- Running the tests | |
| main :: IO Counts | |
| main = runTestTT tests | |