This commit is contained in:
daniel
2020-11-10 17:46:11 +01:00
parent 7a22031bee
commit 0d887fc515
2 changed files with 39 additions and 2 deletions

View File

@@ -662,4 +662,15 @@ mod tests {
Ok(())
}
#[test]
fn test_check_code() {
let code: ErrorCode = 0.into();
assert!(!check_code(code, ErrorTask::Read).is_some());
for i in vec![1, 10, 100, 1000] {
let code: ErrorCode = i.into();
assert!(check_code(code, ErrorTask::Read).is_some());
}
}
}