diff options
Diffstat (limited to 'test/LatticeTest.hs')
-rw-r--r-- | test/LatticeTest.hs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/LatticeTest.hs b/test/LatticeTest.hs index 9edff30..40c0a85 100644 --- a/test/LatticeTest.hs +++ b/test/LatticeTest.hs @@ -94,7 +94,7 @@ proposalApplication = testGroup "apply proposal lists to lattices" $ in lattice' @?= [ [ LatticeCell Plant (Just False) - , LatticeCell Plant (Just True) + , LatticeCell Plant Nothing -- reset by the application process , LatticeCell Plant (Just True) ] ] @@ -113,5 +113,19 @@ proposalApplication = testGroup "apply proposal lists to lattices" $ [ LatticeCell Plant (MergeInt $ 0-6) ] ] + , testCase "invalid proposals are not applied" $ + let + plant = LatticeCell Plant Nothing + empty = LatticeCell Empty Nothing + lattice = [[ empty, plant, empty ]] + proposals :: LatticePropList GrowKind (Maybe Bool) + proposals = LatticePropList + [ LatticeProposal (0, 0) Plant Plant Nothing + , LatticeProposal (1, 0) Plant Empty Nothing + , LatticeProposal (2, 0) Empty Plant Nothing + ] + lattice' = applyLatticeProposals lattice proposals + in + lattice' @?= [[ empty, empty, plant ]] ] |