Skip to content

Commit

Permalink
More precise #[should_panic] tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyBF committed Aug 11, 2024
1 parent 25b0c43 commit 388932c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/tests/save_load_resolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn unlock_tempdir(dir: &Path) {
}

#[test]
#[should_panic]
#[should_panic(expected = "Permission denied")]
fn test_tempdir_lock() {
let tempdir = tempfile::TempDir::new().unwrap();
let resolution1 =
Expand Down Expand Up @@ -100,7 +100,7 @@ fn test_save_load() {
}

#[test]
#[should_panic]
#[should_panic(expected = "Invalid header: algebra was 0x20000 but expected 0x28000")]
fn wrong_algebra() {
let tempdir = tempfile::TempDir::new().unwrap();
let resolution1 =
Expand Down Expand Up @@ -275,7 +275,7 @@ fn test_load_secondary() {
}

#[test]
#[should_panic]
#[should_panic(expected = "Invalid file checksum")]
fn test_checksum() {
use std::{
fs::OpenOptions,
Expand Down

0 comments on commit 388932c

Please sign in to comment.