implemented shifting of entire rung
This commit is contained in:
@@ -35,6 +35,8 @@ spec = describe "Actions" $ do
|
||||
moveDownSpec
|
||||
beadLeftSpec
|
||||
beadRightSpec
|
||||
rungLeftSpec
|
||||
rungRightSpec
|
||||
|
||||
moveUpSpec :: Spec
|
||||
moveUpSpec = describe "moveUp" $ mapM_
|
||||
@@ -84,4 +86,22 @@ beadRightSpec = describe "beadRight" $ let
|
||||
in it ("should be " ++ show expected) $
|
||||
beadRight state `shouldBe` expected
|
||||
|
||||
rungLeftSpec :: Spec
|
||||
rungLeftSpec = describe "rungLeft" $ let
|
||||
state = initialState
|
||||
& rungNum .~ 5
|
||||
& abacus .~ Abacus 10 [1..10]
|
||||
expected = state & abacus.rungL 5 .~ 0
|
||||
in it ("should be " ++ show expected) $
|
||||
rungLeft state `shouldBe` expected
|
||||
|
||||
rungRightSpec :: Spec
|
||||
rungRightSpec = describe "rungRight" $ let
|
||||
state = initialState
|
||||
& rungNum .~ 5
|
||||
& abacus .~ Abacus 10 [1..10]
|
||||
expected = state & abacus.rungL 5 .~ 10
|
||||
in it ("should be " ++ show expected) $
|
||||
rungRight state `shouldBe` expected
|
||||
|
||||
--jl
|
||||
|
||||
Reference in New Issue
Block a user