Expand description
§cpast - Code Testing and Analysis Tool
cpast
is a versatile code testing and analysis tool that empowers users in competitive programming and coding practice. It allows testing correct and incorrect code files against a custom language generator called clex_gen
. This crate supports various programming languages, such as Python, C++, C, Rust, Ruby, JavaScript, and Java, and enables users to specify the number of iterations for testing code against random input values.
§Main Modules
lang_runner
: Module for language-runner-related functionalities and handling the storage and management of code programs.utils
: Utility module with miscellaneous functions.
§Introduction
The crate provides solutions to common challenges faced by competitive programmers and coding enthusiasts, such as verifying code correctness, efficient testing under time constraints, and quick debugging to improve code performance.
§Usage
To get started with cpast
, users can use the provided functions:
compile_and_test
: Compiles and tests code against a custom language generator.
§Example
use cpast::compile_and_test;
async fn compile() {
compile_and_test("correct.cpp".to_string(), "incorrect.rs".to_string(), "(N[1,10]) (?:N){\\1}".to_string(), 100, false, false, false).await.unwrap();
}
For more details on usage and advanced features, refer to the README.
Enums§
Constants§
Functions§
- compile_
and_ test - Compile and test code against custom language generator.