Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improved code coverage

  • Loading branch information...
commit d98d53e0e646c8ddf3eeff5d0237a59080219b4b 1 parent bcb8b67
@NeilCrosby authored
View
8 TurtleTest.php
@@ -113,6 +113,10 @@ public function validSingleLineCommandsProvider() {
array('pd', 'PD'),
array('REPEAT 20 [ FD 10 ]', 'REPEAT 20 [ FD 10 ]'),
array('MAKE "blah SUM 5 10 FD :blah', 'MAKE "BLAH SUM 5 10 FD :BLAH'),
+ // take angle past 360 and then back round before 0 (starts at 270)
+ array('RT 100 LT 360 LT 50 FD 50', 'RT 100 LT 360 LT 50 FD 50'),
+ array("FD PRODUCT 10 2", "FD PRODUCT 10 2"),
+ array("IF EQUAL? 10 SUM 5 5 [ FD 20 ]", "IF EQUAL? 10 SUM 5 5 [ FD 20 ]"),
);
}
@@ -337,9 +341,13 @@ public function invalidCommandProvider() {
array("IF LESS? 20 10"),
array("IF LESS? FD 10"),
array("REPEAT FD 20"),
+ array("REPEAT FD 20 RT 90"),
array("REPEAT 20 FD 10"),
array("SUM 5 FD 20"),
array("PRODUCT 5 FD 20"),
+ array("FD :bob"),
+ array("TO bob [ RT 90"),
+ array("MAKE FD 60"),
);
}
}
View
BIN  test-images/FD-PRODUCT-10-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  test-images/IF-EQUALp-10-SUM-5-5-[-FD-20-].png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  test-images/MAKE-qBLAH-SUM-5-10-FD-cBLAH.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  test-images/RT-100-LT-360-LT-50-FD-50.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.