This does not represent a huge development effort, but it is a huge milestone. The
practicomp project now supports running
make test. The command runs the currently compiled compiler on the “test-cases” submodule, and reports success/failure. Here is a sample output (current status of master):
$ make test Running tests on directory ../external/test-cases boolean.pr Success compounds.pr Success conditions.pr Crashed function_call.pr Success implicit_cast_error.pr Crashed negative_literal.pr Crashed operators.pr Success overloads.pr Success safe_cast.pr Crashed true.pr Success var_lookup.pr Success var_lookup_with_implicit_cast.pr Success void_function.pr Success vrp.pr Crashed 14 tests run, 9 passed and 5 failed Makefile:828: recipe for target 'test' failed make: *** [test] Error 2
Results can be “Success”, “Wrong output” (i.e. - the compiler generated a different output than what was expected for the test), Failed (the compiler’s process reported failure) or Crashed (the compiler itself crashed). The tests that currently crash mostly do so because of deliberate “TODO implement” aborts in the code, so all in all, I’m very happy with where we are.
This is a very important milestone, because it makes it easy for me to make sure I have not broken any old functionality with new development.