Struct unit_testing::unit::Assert
source · pub struct Assert { /* private fields */ }Expand description
§To run assertions tests
Trait Implementations§
source§impl Testable for Assert
impl Testable for Assert
source§fn matches(&mut self, pattern: &str, values: Vec<String>) -> &mut Self
fn matches(&mut self, pattern: &str, values: Vec<String>) -> &mut Self
Check if a pattern matches values Read more
source§fn capture(
&mut self,
pattern: &str,
x: &str,
key: usize,
values: Vec<String>
) -> &mut Self
fn capture( &mut self, pattern: &str, x: &str, key: usize, values: Vec<String> ) -> &mut Self
check if a pattern a the x index equal a value listing in values Read more
source§fn it(
describe: &str,
sleep_time: u64,
callbacks: Vec<&dyn Fn(&mut Self) -> &mut Self>
)
fn it( describe: &str, sleep_time: u64, callbacks: Vec<&dyn Fn(&mut Self) -> &mut Self> )
Constructor Read more
source§fn equals<T: PartialEq>(&mut self, a: T, b: T) -> &mut Self
fn equals<T: PartialEq>(&mut self, a: T, b: T) -> &mut Self
Check if a and b are equals Read more
source§fn unequals<T: PartialEq>(&mut self, a: T, b: T) -> &mut Self
fn unequals<T: PartialEq>(&mut self, a: T, b: T) -> &mut Self
Check if a and b are unequals Read more
source§fn superior<T: PartialOrd>(&mut self, a: T, min: T) -> &mut Self
fn superior<T: PartialOrd>(&mut self, a: T, min: T) -> &mut Self
Check if a are superior to min Read more
source§fn inferior<T: PartialOrd>(&mut self, a: T, max: T) -> &mut Self
fn inferior<T: PartialOrd>(&mut self, a: T, max: T) -> &mut Self
Check if a are inferior to max Read more
source§fn between<T: PartialOrd>(&mut self, a: T, min: T, max: T) -> &mut Self
fn between<T: PartialOrd>(&mut self, a: T, min: T, max: T) -> &mut Self
Check if a are between min and max Read more
source§fn vec_contains<T: PartialEq>(&mut self, a: Vec<T>, b: T) -> &mut Self
fn vec_contains<T: PartialEq>(&mut self, a: Vec<T>, b: T) -> &mut Self
Check if a vector contains a value Read more
source§fn vec_no_contains<T: PartialEq>(&mut self, a: Vec<T>, b: T) -> &mut Self
fn vec_no_contains<T: PartialEq>(&mut self, a: Vec<T>, b: T) -> &mut Self
Check if a vector not contains a value Read more
source§fn option_contains<T: PartialEq>(&mut self, a: Option<T>, b: T) -> &mut Self
fn option_contains<T: PartialEq>(&mut self, a: Option<T>, b: T) -> &mut Self
Check if a option contains a value Read more
source§fn hash_contains(&mut self, a: &mut HashSet<String>, b: String) -> &mut Self
fn hash_contains(&mut self, a: &mut HashSet<String>, b: String) -> &mut Self
Check if a hash contains a string Read more
source§fn string_contains(&mut self, a: &str, b: &str) -> &mut Self
fn string_contains(&mut self, a: &str, b: &str) -> &mut Self
Check if a sting contains a substring Read more
source§fn file_contains(&mut self, f: &str, v: &str) -> &mut Self
fn file_contains(&mut self, f: &str, v: &str) -> &mut Self
Check if a file contains a value Read more
source§fn begin_with(&mut self, actual: &str, expected: &str) -> &mut Self
fn begin_with(&mut self, actual: &str, expected: &str) -> &mut Self
Check if a string begin with the expected value Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Assert
impl Send for Assert
impl !Sync for Assert
impl Unpin for Assert
impl UnwindSafe for Assert
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