Add support for push ('[') and pop (']') operations
This commit is contained in:
parent
1b2defc067
commit
05feb56763
4 changed files with 43 additions and 17 deletions
|
@ -23,10 +23,6 @@ unitTests = testGroup "Unit tests"
|
|||
$ instructions (iterateLSystem 1 gosper) @?= [Forward,TurnLeft,Forward,TurnLeft,TurnLeft,Forward,TurnRight,Forward,TurnRight,TurnRight,Forward,Forward,TurnRight,Forward,TurnLeft]
|
||||
, testCase "instructions of one iteration of sierpinski"
|
||||
$ instructions (iterateLSystem 1 sierpinski) @?= [Forward,TurnLeft,Forward,TurnRight,Forward,TurnRight,Forward,TurnLeft,Forward,TurnLeft,Forward,Forward,TurnLeft,Forward,Forward]
|
||||
, testCase "draw axiom of gosper"
|
||||
$ drawLSystem gosper @?= Line [(10.0,0.0),(0.0,0.0)]
|
||||
, testCase "draw one iteration of gosper"
|
||||
$ drawLSystem (iterateLSystem 1 gosper) @?= Line [(25.0,-8.660253),(20.0,-17.320507),(10.0,-17.320507),(-4.7683716e-7,-17.320507),(5.0,-8.660254),(15.0,-8.6602545),(10.0,0.0),(0.0,0.0)]
|
||||
]
|
||||
|
||||
propertyChecks :: TestTree
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue