Some scripts can be used for automating test generating and code testing.
- Run preparation script
- Write desired codes for input generation and solution code.(And copy solution code to "a.cpp" for double checking)
- Run test generator to create any number of tests
- Now you can test any other code with created tests with "tester.sh" script
- Have fun!
chmod +x *.sh
./file_gen.sh [ProblemNumber]
Create directory for problem with required files and folders
Generated files are
"in" and "out" folders
"in_gen.cpp" -> generating input of tests
"a.cpp" -> used for c++ code testing
"sol.cpp" -> used for creating output of tests
"test_desc.txt" -> info about subtasks of tests
Optional files [NOT ADDED YET #WIP#]
"tester.cpp" instead of out folder -> output checker instead of checking difference with sol.cpp output
"in_gen_subtaskX.cpp" files -> multiple input generator for each subtask instead of one file
"a.py" -> used for python code testing
./testcase_gen.sh <ProblemNumber> <STARTING_TEST> <FINISHING_TEST>
Create tests for desired problem from index <STARTING_TEST> to <FINISHING_TEST> and test them with "a.cpp".
You can use "in_gen.sh" and "out_gen.sh" separately with exact syntax also.
This script create tests with "in_gen.cpp" stored them in "in" folder THEN generate outputs with "sol.cpp" and store them in "out" folder
Then test "a.cpp" with them for double checking.
./tester.sh <ProblemNumber> [STARTING_TEST] [FINISHING_TEST]
Run all of test cases(or from desired start to finish) on "a.cpp" then print results
- Add python code tester
- Add subtask input generation
- Add small library for generating random stuff
- Add Tester.cpp support for code testing
- Add input limitation check
- Add more robustness for codes
- Add some CLI for auto generating stuff
- Rewrite readme : )
For any question, recommendation and other stuff email me : )
Email: e.escandari1@gmail.com