An programming competition tester for the program written by C++ language.
The tester can only run in bash (do not support cmd.exe
in windows).
node [tester.js] [testing] [standard] [generator] [options]
Options:
-e, --exe # Run programs without compilation
-s, --spj=... # Check answers by special judge
Example:
If there is usr.cpp
, std.cpp
and gen.cpp
in the current directory, then input the following command to run the tester test.js
:
node test.js usr std gen
- Generate data, run the testing program and standard program.
- Detect the testing result
- By the command
diff
: Accepted, Wrong Answer, Runtime Error, Time Limit Exceeded. - By the special judge supported by
testlib.h
: in addition to the above, Wrong Output Format, Partially Correct.
- By the command
- Compile programs before testing.
-
Performance
- Speed up.
- User Interface.
-
Function
- Pass parameters to data generator.
- Detect memory limit exceeded (MLE).
- Allow programs to use standard error stream (stderr).
- Batch testing data.
- Print compile log when compilation error.
-
Reliability
- Check readability, writability and executability.
- Identify absolute path and file extension in parameters.
Goal: defeat chc_1234567890's duipai.exe, not including speed :(