If a test should panic, add #[should_panic] before the function declaration.
#[should_panic]
#[test] #[should_panic] fn this_should_panic() { panic_function(1000); }