A tool to generate test-cases for competitive programming. With it, you can also execute your code on generated test-cases and compare it with other code automatically.
- Generate random test-cases
- Auto-generate
.tcssyntax files from problem statements using the testcase-syntax skill - Run code (supports C11, C++14, Python 3) automatically on these test-cases
- Run two codes simultaneously and compare results to detect corner cases
- Generate HackerRank problem-setting style test-case zip packages
- Solely for generating test-cases
- To verify code runs properly and avoid runtime errors
- To compare optimized code against brute-force code on random inputs
To generate test-cases (E.g.: 5 test-cases):
python3 testcode.py -T testcase_syntax.tcs -N 5To generate test-cases and run your code on them:
python3 testcode.py -T testcase_syntax.tcs -I1 my_code.cppTo generate test-cases, run two codes, and compare output:
python3 testcode.py -T testcase_syntax.tcs -I1 my_code.cpp -I2 my_bruteforce.pyTo generate HackerRank style test-cases zip:
python3 testcode.py -T testcase_syntax.tcs -I1 my_code.cpp -C configs/hackerrank.ini- Default
-Nis 10. Pass-N <count>to adjust. - Default config is
configs/default.ini. Use-Cto specify custom config. - Pass
.tcssyntax file with-T. Refer to TCSYNTAX.md for reference. - Skill: Use
skills/testcase-syntax/SKILL.mdto automatically translate problem statements and constraints into.tcsfiles. - See
AGENTS.mdfor AI agent testing guidelines and workflows.
- C11
- C++14
- Python3