Setup QuickCheck testing
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Seminar where
|
||||
|
||||
@@ -161,3 +162,6 @@ valid :: Assignment -> Bool
|
||||
valid a =
|
||||
length a == length (nub $ fst <$> a)
|
||||
&& length a == length (nub $ snd <$> a)
|
||||
return []
|
||||
|
||||
runTests = $quickCheckAll
|
||||
|
||||
11
src/Test.hs
Normal file
11
src/Test.hs
Normal file
@@ -0,0 +1,11 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Main where
|
||||
|
||||
import Protolude
|
||||
import qualified Seminar
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
_ <- Seminar.runTests
|
||||
return ()
|
||||
Reference in New Issue
Block a user