Skip to content

Commit c4de163

Browse files
committed
Improve humanize empty addr test
1 parent aa8663d commit c4de163

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/std/src/testing/mock.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,11 +1241,13 @@ mod tests {
12411241
}
12421242

12431243
#[test]
1244-
#[should_panic(expected = "Invalid canonical address length")]
12451244
fn addr_humanize_input_length() {
12461245
let api = MockApi::default();
12471246
let input = CanonicalAddr::from(vec![]);
1248-
api.addr_humanize(&input).unwrap();
1247+
assert_eq!(
1248+
api.addr_humanize(&input).unwrap_err(),
1249+
StdError::generic_err("Invalid canonical address length")
1250+
);
12491251
}
12501252

12511253
// Basic "works" test. Exhaustive tests on VM's side (packages/vm/src/imports.rs)

0 commit comments

Comments
 (0)