mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-03-11 06:33:09 +00:00
fmt and lint
This commit is contained in:
parent
d029def7c7
commit
b5d0d2d0c1
@ -68,22 +68,23 @@ pub enum NssaError {
|
||||
MaxChainedCallsDepthExceeded,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum testError {
|
||||
testErr,
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
#[derive(Debug)]
|
||||
enum TestError {
|
||||
TestErr,
|
||||
}
|
||||
|
||||
fn test_function_ensure(cond: bool) -> Result<(), testError> {
|
||||
ensure!(cond, TestError::TestErr);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ensure() {
|
||||
assert!(test_function_ensure(true).is_ok());
|
||||
assert!(test_function_ensure(false).is_err());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn test_function_ensure(cond: bool) -> Result<(), testError> {
|
||||
ensure!(cond, testError::testErr);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_ensure() {
|
||||
assert!(test_function_ensure(true).is_ok());
|
||||
assert!(test_function_ensure(false).is_err());
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user