Struct gcj_helper::TestEngine
[−]
[src]
pub struct TestEngine<I: AsRef<Path>, O: AsRef<Path>> { /* fields omitted */ }
Facilitates the execution of problem solving code.
In order to handle test cases, you need to create a new TestEngine
, then call
TestEngine::run()
, which accepts an Fn(&mut IoHelper)
that is called once per test case.
Creating a TestEngine
is cheap; no files are opened until you call TestEngine::run()
.
Methods
impl<I: AsRef<Path>, O: AsRef<Path>> TestEngine<I, O>
[src]
fn new(input_file_path: I, output_file_path: O) -> TestEngine<I, O>
Creates a new test engine using the specified input and output file paths.
Calling this method is cheap; no files are opened until TestEngine::run()
is called.
fn run<F: Fn(&mut IoHelper)>(self, f: F)
Consumes the test engine, calling a closure once for each test case.
impl TestEngine<String, String>
[src]
fn from_args() -> TestEngine<String, String>
Creates a new test engine using input and output file paths obtained from command line arguments.
Calling this method is cheap; no files are opened until TestEngine::run()
is called.
Panics
This method panics if either the input file path or output file path is missing.
Trait Implementations
impl<I: Debug + AsRef<Path>, O: Debug + AsRef<Path>> Debug for TestEngine<I, O>
[src]
impl Default for TestEngine<String, String>
[src]
fn default() -> TestEngine<String, String>
Returns the "default value" for a type. Read more