Initial commit

This commit is contained in:
Alexander Kobjolke 2023-11-29 21:29:32 +01:00
commit cf2af11b6b
23 changed files with 3988 additions and 0 deletions

0
test/data/foo.txt Normal file
View file

10
test/doctest/Doctest.hs Normal file
View file

@ -0,0 +1,10 @@
-- | Rn the doctest executable
module Main (main) where
import System.Process (callProcess)
doctest :: [String] -> IO ()
doctest = callProcess "doctest"
main :: IO ()
main = doctest ["--fast", "src"]

View file

@ -0,0 +1,11 @@
module AoCSpec.UtilSpec (spec) where
import AoC.Util
import Test.Hspec
spec :: Spec
spec = do
describe "solveRiddle" do
it "runs the given solver" do
solveRiddle "test/data/foo.txt" pure `shouldReturn` ()

1
test/spec/Spec.hs Normal file
View file

@ -0,0 +1 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}

6
test/spec/SpecHook.hs Normal file
View file

@ -0,0 +1,6 @@
module SpecHook (hook) where
import Test.Hspec
hook :: Spec -> Spec
hook = parallel