code-tester-0.1.0-base.2 is not a library.
CodeTester Documentation
π Introduction
code-tester is a Rust-based algorithm validation tool that automates testing to help developers verify algorithm correctness and performance. It supports single-case testing, batch testing, and runtime limits.
π Installation
crates.io
GitHub Release
Direct download available
π¦ Command Overview
test Command
Validates algorithm correctness and performance.
Syntax:
Arguments
| Argument | Type | Description |
|---|---|---|
<FILE> |
Required | Path to the algorithm executable |
Options
| Option | Shortcut | Type | Description |
|---|---|---|---|
--input-file |
-i |
File Path | Specify input file path |
--ans-file |
-a |
File Path | Reference answer/output file |
--time-limit |
-t |
Number (ms) | Maximum execution time in milliseconds |
--data |
-d |
Path | Test case directory/archive (supports .in/.ans pairs, folders, or ZIP files) |
--no-input |
- | Flag | Indicates no input required |
π Examples
Single Case Testing
# Test my_algo with input/answer files and 200ms timeout
Batch Testing
# Use test directory (must contain test_cases1.in/test_cases1.ans etc.)
# ZIP file support
No-Input Testing
# For input-free algorithms
β οΈ Important Notes
- Time Unit:
--time-limituses milliseconds (e.g., 200ms = 0.2s) - Archive Requirements: Ensure complete test file pairs after extraction
- Input Conflict:
--no-inputcannot coexist with--input-file - Test Case Naming Rules:
- Must contain matched
example<number>.inandexample<number>.ansfiles - Folder name must match file prefix:
- β
Valid Examples:
a/a1.in+a/a1.ans
b.zip/b1.in+b.zip/b1.ans - β Invalid Examples:
a/b1.in(folder-name mismatch)
test/test.in(missing numeric index)
- β
Valid Examples:
- Must contain matched
π Version Info
π‘ Developer Guide
# Build from source
π Contributing
We welcome PRs! Follow semantic versioning and include test cases for new features.
π License
MIT License