Download check_if_array_is_good/haskell_tests/Main.hs from DatasetRepo/FPEval: direct link, hf CLI and curl.
- Browser
- Download file 683 Bytes
-
https://huggingface.co/datasets/DatasetRepo/FPEval/resolve/refs%2Fpr%2F1/check_if_array_is_good/haskell_tests/Main.hs
- Command line
-
hf download hf://datasets/DatasetRepo/FPEval@refs/pr/1/check_if_array_is_good/haskell_tests/Main.hs
-
curl -L -o Main.hs https://huggingface.co/datasets/DatasetRepo/FPEval/resolve/refs%2Fpr%2F1/check_if_array_is_good/haskell_tests/Main.hs
683 Bytes
| module Main where | |
| import Test.HUnit | |
| --Program start | |
| --Program end | |
| -- Test cases | |
| test1 :: Test | |
| test1 = TestCase (assertEqual "for (isGood [2, 1, 3])," False (isGood [2, 1, 3])) | |
| test2 :: Test | |
| test2 = TestCase (assertEqual "for (isGood [1, 3, 3, 2])," True (isGood [1, 3, 3, 2])) | |
| test3 :: Test | |
| test3 = TestCase (assertEqual "for (isGood [1, 1])," True (isGood [1, 1])) | |
| test4 :: Test | |
| test4 = TestCase (assertEqual "for (isGood [3, 4, 4, 1, 2, 1])," False (isGood [3, 4, 4, 1, 2, 1])) | |
| -- Grouping test cases | |
| tests :: Test | |
| tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3] | |
| -- Running the tests | |
| main :: IO Counts | |
| main = runTestTT tests | |