You can also test if a code should panic

This commit is contained in:
Stephan Rehfeld 2026-05-13 18:26:41 +02:00
parent 6adb2e143f
commit 2649558ecd

View File

@ -47,4 +47,10 @@ mod tests {
assert_eq!(plane.point, p);
assert_eq!(plane.normal, n);
}
#[test]
#[should_panic]
fn foo() {
//panic!("This code panics!");
}
}