nectar/kinode/packages/tester/tester_lib.rs
2024-06-14 17:38:45 -07:00

31 lines
834 B
Rust

#[allow(unused_imports)]
use crate::kinode::process::tester::{FailResponse, Response as TesterResponse};
#[macro_export]
macro_rules! fail {
($test:expr) => {
Response::new()
.body(TesterResponse::Run(Err(FailResponse {
test: $test.into(),
file: file!().into(),
line: line!(),
column: column!(),
})))
.send()
.unwrap();
panic!("")
};
($test:expr, $file:expr, $line:expr, $column:expr) => {
Response::new()
.body(TesterResponse::Run(Err(FailResponse {
test: $test.into(),
file: $file.into(),
line: $line,
column: $column,
})))
.send()
.unwrap();
panic!("")
};
}