-
Notifications
You must be signed in to change notification settings - Fork 2
/
Problem80Tests.hs
33 lines (25 loc) · 1.1 KB
/
Problem80Tests.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{-# LANGUAGE FlexibleInstances, TupleSections, TemplateHaskell #-}
import Test.QuickCheck
import Control.Applicative
import Graph
import Problem80
prop_GraphFormToAdjForm :: GraphForm Char (Edge Char) -> Property
prop_GraphFormToAdjForm = (===) <$> id
<*> adjFormToGraphForm
. graphFormToAdjForm
prop_AdjFormToGraphForm :: AdjForm Char (Edge Char) -> Property
prop_AdjFormToGraphForm = (===) <$> id
<*> graphFormToAdjForm
. adjFormToGraphForm
prop_GraphFormToFndForm :: GraphForm Char (Edge Char) -> Property
prop_GraphFormToFndForm = (===) <$> id
<*> fndFormToGraphForm
. graphFormToFndForm
prop_FndFormToGraphForm :: FndForm Char (Edge Char) -> Property
prop_FndFormToGraphForm = (===) <$> fndFormToGraphForm
<*> fndFormToGraphForm
. graphFormToFndForm
. fndFormToGraphForm
return []
main :: IO Bool
main = $quickCheckAll