@@ -11,15 +11,16 @@ __Semantic test cases that are executable (and terminate) should be placed in th
__Exec test cases can now use the import statement to import other classes. See the exec test case folder and the `preproc` folder for more information__
*There's also some other additional code in this repo, that might provide fuzzing capabilities. Please consider contributing
such code as it probably helps the other teams (and could later be integrated into a bigger test suite).*
*There's also some other additional code in this repo, that might provide fuzzing capabilities. Please consider contributing such code as it probably helps the other teams (and could later be integrated into a bigger test suite).*
**The test cases should be committed in the [mjtest-tests](https://git.scc.kit.edu/IPDSnelting/mjtest-tests) repository**
Test modes
----------
The test cases are divided in 6 'modes':
- __lexer__: Test cases that check the lexed token (and their correct output)
- __syntax__: Test cases that just check whether `./run --parsecheck` accepts as correct or rejects
them.
them.
- __ast__: Test cases that check the generated ast by using the pretty printing functionality.
- __semantic__: Test cases that check semantic checking of MiniJava programs
- __compile-firm__: Test cases that check the correct compilation and execution of MiniJava programs with the libfirm backend.
...
...
@@ -80,8 +81,9 @@ Test types for the ast mode
<td>Pretty printing the source file should result in the same output as pretty printing the already pretty printed file.</td>
</tr>
</table>
_It uses all syntax mode tests implicitly._
It uses all syntax mode tests implicitly.
Place the test files in the folder `ast`. Might not be all that useful, wasn't used at all in the two years ago.
Test types for the semantic mode
...
...
@@ -99,7 +101,7 @@ Test types for the semantic mode
</tr>
</table>
__All semantic mode tests have to be syntactically correct___
__All semantic mode tests have to be syntactically correct__
Test types for the compile-firm and compile mode
...
...
@@ -127,11 +129,17 @@ Test types for the compile-firm and compile mode
For Windows users: Using environment variables doesn't work and you have to use prefix `./mjt.py` with `python`.
The timeout for the execution of normal programs in seconds can be set via the environment variable `MJ_TIMEOUT` (default is `10`) and for `big` programs via `MJ_BIG_TIMEOUT` (default is `60`).
### Example usage
Assuming you want to run the syntax tests and your MiniJava base folder is `~/code/mj` then run