🡄 Previous

Next 🡆

Contents > Applications

TetrominoScript Tester

The TetrominoScript Tester compares the behavior of a TS program with a JavaScript snippet for all components or for a specified component. It reports passes and failures to stdout.

To run it from the command-line, enter the following.

java -cp target/tetromino-computer.jar tetrominocomputer.ts.Tester -p [ percent ] -n [ component name ]

The arguments are optional. They default to:

java -cp target/tetromino-computer.jar tetrominocomputer.ts.Tester -p 100

If percent is less than 100, the TetrominoScript Tester performs comparisons for randomly selected subsets of the possible input values at least as large as the specified percent.

If a component name is not provided, the TetrominoScript Tester evaluates all components.

The TetrominoScript Tester simulates components at the maximum recursive depth without memoization or emulation. Meaning, there is no cutoff point where it falls back on cached results or JavaScript snippets to speed up evaluation. It performs full and fair tests.

The TetrominoScript Tester partitions the test space across the available logical cores. Consequentially, it consumes 100% CPU as it runs. And if a partition contains less than 32,769 tests, it executes all of them, regardless of the specified percent.

🡄 Previous

Next 🡆