| 1 |
# Test programs |
| 2 |
|
| 3 |
Run `./run_tests.sh` to run the full suite and report results. |
| 4 |
|
| 5 |
The tests are executed with very aggressive garbage collection parameters. A full garbage |
| 6 |
collection cycle is run on every allocation. This means if an object is freed by the GC but still |
| 7 |
referenced (because the reference was not from the stack / heap) then the error can be caught in |
| 8 |
valgrind. |
| 9 |
|
| 10 |
The output of each test (merging `stdout` and `stderr` with `2>&1`) should match its .golden file. If a |
| 11 |
test has no `.golden` file, the test should return "true". If a test's name begins with "error." then |
| 12 |
its exit code is expected to be 1, otherwise it should be 0. |
| 13 |
|
| 14 |
If a test is changed, and its golden output needs to be updated (e.g. line numbers in stack traces |
| 15 |
no-longer match up) then run `./refresh_golden.sh <thetest.jsonnet>` |