Project 8: Updated ProgramFlow/FibonacciSeries test

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Project 8: Updated ProgramFlow/FibonacciSeries test

cadet1620
Administrator
Contributed by Mark Armbrust
2 September 2015
There is a test coverage gap in the ProgramFlow tests.

Incorrectly generated if-goto code can pass both the BasicLoop and FibonacciSeries tests, and the error will not be caught until the FunctionCalls/FibonacciElement test.

Details:
The old versions of the tests only checked if-goto behavior for positive and zero arguments.
This new version of the FibonacciSeries test checks for negative arguments.

Download this file into your nand2tetris/projects/08/ProgramFlow/FibonacciSeries directory.
  FibonacciSeries.vm
The FibonacciSeries.tst and FibonacciSeries.cmp files are unchanged.