pub enum TestResult {
Success,
UnableToRun {
error_msg: String,
},
WrongOutput {
stdout: String,
stderr: String,
},
RuntimeError {
stdout: String,
stderr: String,
},
Timeout {
stdout: String,
stderr: String,
},
}
Expand description
Represents the outcome of running a testcase. TestResult::Success means
the output of a solution command matched the test_out
field of the
Testcase.
Variants§
Success
Solution command produced the expected output. A test run is considered a success even if it runs into a runtime error or times out if its output was correct (just like it works on CodinGame).
UnableToRun
Solution command failed to run. This may happen for example if the executable does not exist or if the current user does not have permission to execute it.
WrongOutput
Solution command exited normally but did not produce the expected output.
RuntimeError
Solution command encountered a runtime error (exited non-zero).
Timeout
Solution command timed out.
Implementations§
Source§impl TestResult
impl TestResult
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Returns true if the testcase passed. A testcase passes if the output of the solution command matches the expected output.
Trait Implementations§
Source§impl Clone for TestResult
impl Clone for TestResult
Source§fn clone(&self) -> TestResult
fn clone(&self) -> TestResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for TestResult
impl RefUnwindSafe for TestResult
impl Send for TestResult
impl Sync for TestResult
impl Unpin for TestResult
impl UnwindSafe for TestResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more