pub trait Test: Send + Sync {
// Required methods
fn symbol(&self) -> Symbol;
fn lib(&self) -> Symbol;
fn describe(&self, cx: &mut Cx) -> Result<Value>;
fn run(&self, cx: &mut Cx) -> Result<TestReport>;
}Expand description
A library-supplied test the registry can hold and run.
The kernel defines the contract; the test body is library behavior.
Required Methods§
Sourcefn describe(&self, cx: &mut Cx) -> Result<Value>
fn describe(&self, cx: &mut Cx) -> Result<Value>
Produces a value describing this test without running it.
Sourcefn run(&self, cx: &mut Cx) -> Result<TestReport>
fn run(&self, cx: &mut Cx) -> Result<TestReport>
Runs the test and returns its TestReport.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".