nectar/kinode/packages/tester/tester_lib.rs

31 lines
834 B
Rust
Raw Normal View History

2024-06-15 03:38:45 +03:00
#[allow(unused_imports)]
use crate::kinode::process::tester::{FailResponse, Response as TesterResponse};
2024-05-29 00:51:50 +03:00
#[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!("")
};
}