mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-18 14:12:00 +03:00
31 lines
834 B
Rust
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!("")
|
|
};
|
|
}
|