Download replace_elements_in_an_array/haskell_tests/Main.hs from FPEvalDataset/LeetCodeProblem: direct link, hf CLI and curl.
- Browser
- Download file 519 Bytes
-
https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/6c3b9779afb083bed1393e1d644d7105f88bca80/replace_elements_in_an_array/haskell_tests/Main.hs
- Command line
-
hf download hf://datasets/FPEvalDataset/LeetCodeProblem@6c3b9779afb083bed1393e1d644d7105f88bca80/replace_elements_in_an_array/haskell_tests/Main.hs
-
curl -L -o Main.hs https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/6c3b9779afb083bed1393e1d644d7105f88bca80/replace_elements_in_an_array/haskell_tests/Main.hs
519 Bytes
| module Main where | |
| import Test.HUnit | |
| --Program start | |
| --Program end | |
| -- Test cases | |
| test1 :: Test | |
| test1 = TestCase (assertEqual "for (arrayChange [1,2,4,6] [[1,3],[4,7],[6,1]])," [3,2,7,1] (arrayChange [1,2,4,6] [[1,3],[4,7],[6,1]])) | |
| test2 :: Test | |
| test2 = TestCase (assertEqual "for (arrayChange [1,2] [[1,3],[2,1],[3,2]])," [2,1] (arrayChange [1,2] [[1,3],[2,1],[3,2]])) | |
| -- Grouping test cases | |
| tests :: Test | |
| tests = TestList [TestLabel "Test1" test1] | |
| -- Running the tests | |
| main :: IO Counts | |
| main = runTestTT tests | |