Skip to content

Commit e012ff3

Browse files
author
James Brundage
committed
feat: Turtle tests ( Fixes #25 )
1 parent ffa9a95 commit e012ff3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Turtle.tests.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
describe Turtle {
2+
it "Draws things with simple commands" {
3+
$null = $turtle.Clear().Square()
4+
$turtleSquaredPoints = $turtle.Points
5+
$turtleSquaredPoints.Length | Should -Be 8
6+
$turtleSquaredPoints |
7+
Measure-Object -Sum |
8+
Select-Object -ExpandProperty Sum |
9+
Should -Be 0
10+
}
11+
12+
it 'Can draw an L-system, like a Sierpinski triangle' {
13+
$turtle.Clear().SierpinskiTriangle(200, 2, 120).points.Count |
14+
Should -Be 54
15+
}
16+
}

0 commit comments

Comments
 (0)