Rust tests can return ResultΒΆ Rust fns marked with the #[test] attribute can return a Result, but must explicitly declare the return type to make this happen. The test will fail on receiving an Err.