This is a sample for a CircuitSim tester that uses the circuitsim-tester library. The tested .sim
files can be found in the tester
directory. Note that this tester includes a number of Java files that each test a different .sim
.
To build the tester jar, go to the tester/
directory, run ./gradlew jar
and find the jar file in the build/libs
directory.
- Clone this repository
- Remove the
.git
directory. - Edit the tester name in
tester/settings.gradle
. - Add a GitHub Package Registry token to
tester/gradle.properties
, as described here - Add any tests into the
tester/src/main/java/io/zucchini/samplecircuitsimtester/
path, just like theANDTests.java
file. They will be discovered automatically. - If you want, change the
groupId
intester/build.gradle
. - If you want, change the package the sources are in. Make sure to update tha
mainClassName
string intester/build.gradle
afterwards. - Build the autograder jar with
./gradlew jar
in thetester/
directory - Run the jar from the
files/
directory and check for failing test cases - Profit!