A reference implementation of the μC language for the NI-APR course.
- OpenJDK 17 (please check
java -version) - Scala 2.13.6
- SBT 1.8.2
The following will produce a fat JAR that includes all the code and dependencies.
sbt assemblyAlternatively, you can build a docker image:
sbt dockerA poor-man's snapshot testing framework for integration tests is prepared for you in the tests directory.
It is a shell script that runs the uc command with various programs and checks the output and exit code against some expected, pre-recorded values (snapshots - hence the name snapshot testing).
If the output / exit code is different it will show a diff using either diff or delta.
The tests are divided into suites found under tests/suites.
The expected outputs are in tests/expected.
For example, the following
./tests/test.shwill run all the test suites.
See the ./tests/test.sh --help for more info.
This repo is using the GitLab CI.
The pipeline definition is in .gitlab-ci.yml file.
It uses a custom docker image that has all the dependencies listed above.
There are a few benchmarks that can be run using jmh. For example:
$ sbt
> Jmh/run .*Interpreter.*