#[derive(Debug, Clone, Copy, PartialEq)]
pub enum AxTestResult {
Ok,
Failed,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u8)]
pub enum AxTestExecutionMode {
Standard = 0,
Ignore = 1,
Custom = 2,
}
#[derive(Debug)]
pub enum TestRunResult {
Ok,
Failed(&'static str),
Ignored,
}
#[derive(Debug)]
pub struct TestSummary {
pub total: usize,
pub passed: usize,
pub failed: usize,
pub ignored: usize,
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct AxTestDescriptor {
pub name: &'static str,
pub module: &'static str,
pub test_fn: fn() -> AxTestResult,
pub executor_name: &'static str,
pub should_panic: bool,
pub ignore_reason: &'static str,
pub execution_mode: AxTestExecutionMode,
}
impl AxTestDescriptor {
pub const fn new(
name: &'static str,
module: &'static str,
test_fn: fn() -> AxTestResult,
executor_name: &'static str,
should_panic: bool,
ignore_reason: &'static str,
execution_mode: AxTestExecutionMode,
) -> Self {
Self {
name,
module,
test_fn,
executor_name,
should_panic,
ignore_reason,
execution_mode,
}
}
}