A Rust project for managing and running test cases.
- Rust and Cargo installed on your system
# Run the project
cargo run
# Run with release optimizations
cargo run --release
# Run tests
cargo test
# Build the project
cargo buildTo add a new test case:
- Create input and output files in
./testcases/[challenge_no]/- Input file:
./testcases/[challenge_no]/[testcase_no]_input.txt - Output file:
./testcases/[challenge_no]/[testcase_no]_output.txt - Example:
./testcases/01/02_input.txtand./testcases/01/02_output.txtfor challenge 1, test case 2
- Input file:
- The input file should contain the test input data as specified in the HackerRank listing
- The output file should contain the expected output for the corresponding input
- Follow the existing test case format and directory structure
- Run
cargo runto verify your test case works correctly
./testcases/
├── 01/
│ ├── 01_input.txt
│ ├── 01_output.txt
│ ├── 02_input.txt
│ ├── 02_output.txt
│ ├── 03_input.txt
│ └── 03_output.txt
├── 02/
│ ├── 01_input.txt
│ ├── 01_output.txt
│ ├── 02_input.txt
│ └── 02_output.txt
└── ...