pub struct TestCase {
pub settings: TestCaseSettings,
pub input_format: TextFormat,
pub output_format: TextFormat,
/* private fields */
}
Expand description
Test representing a check on the serial.
Fields§
§settings: TestCaseSettings
Settings to use for the test.
input_format: TextFormat
Text format of the input send to the serial.
output_format: TextFormat
Text format of the response received by the serial.
Implementations§
Source§impl TestCase
impl TestCase
Sourcepub fn run(&mut self, serial: &mut Serial) -> Result<bool, String>
pub fn run(&mut self, serial: &mut Serial) -> Result<bool, String>
Execute the test on given serial port.
After running the test response and successful are set if no error occurred.
Sourcepub fn is_successful(&self) -> Option<bool>
pub fn is_successful(&self) -> Option<bool>
Check if the test was successful.
If the test was not run before None will be returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestCase
impl RefUnwindSafe for TestCase
impl Send for TestCase
impl Sync for TestCase
impl Unpin for TestCase
impl UnwindSafe for TestCase
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
Mutably borrows from an owned value. Read more