committed by
GitHub
parent
1da1667920
commit
58ef02f02b
@@ -775,9 +775,10 @@ mod tests {
|
||||
(true, START + LENGTH / 2, LENGTH / 2, addr + LENGTH / 2),
|
||||
];
|
||||
for (ok, start, length, value) in cases {
|
||||
match ok {
|
||||
true => assert_eq!(translate!(start, length, ®ions).unwrap(), value),
|
||||
false => assert!(translate!(start, length, ®ions).is_err()),
|
||||
if ok {
|
||||
assert_eq!(translate!(start, length, ®ions).unwrap(), value)
|
||||
} else {
|
||||
assert!(translate!(start, length, ®ions).is_err())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user