Trait unit_testing::unit::describe::It
source · pub trait It {
// Required method
fn it<T: PartialEq>(
description: &str,
expected: T,
callback: &dyn Fn() -> T
);
}Expand description
§To run test case with description
Required Methods§
sourcefn it<T: PartialEq>(description: &str, expected: T, callback: &dyn Fn() -> T)
fn it<T: PartialEq>(description: &str, expected: T, callback: &dyn Fn() -> T)
§Describe a test
descriptionThe test descriptionexpectedThe test expected resultcallbackThe callback to execute
use unit_testing::unit::Describe;
use crate::unit_testing::unit::describe::It;
fn py()-> bool
{
4*4 + 3*3 == 25
}
Describe::it("The triangle is rectangle",true,&py)Object Safety§
This trait is not object safe.