You can also test if a code should panic
This commit is contained in:
parent
6adb2e143f
commit
2649558ecd
@ -47,4 +47,10 @@ mod tests {
|
|||||||
assert_eq!(plane.point, p);
|
assert_eq!(plane.point, p);
|
||||||
assert_eq!(plane.normal, n);
|
assert_eq!(plane.normal, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[should_panic]
|
||||||
|
fn foo() {
|
||||||
|
//panic!("This code panics!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user