haskell-homework/test/Homework/Ch01/HanoiSpec.hs

15 lines
306 B
Haskell
Raw Normal View History

2021-10-01 00:04:16 +00:00
module Homework.Ch01.HanoiSpec where
import Homework.Ch01.Hanoi
import Test.Hspec
spec :: Spec
spec = describe "hanoi" $ do
it "can solve for stack of 2 and three pegs" $ do
hanoi 2 "a" "b" "c"
`shouldBe` Right
[ Move "a" "c",
Move "a" "b",
Move "c" "b"
]