Skip to content

Commit

Permalink
Add a test that reading an empty minidump fails properly
Browse files Browse the repository at this point in the history
  • Loading branch information
luser committed Sep 18, 2018
1 parent ebd4278 commit 8b8d3e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_minidump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,11 @@ fn test_thread_list() {
assert!(false, "Missing stack memory");
}
}

#[test]
fn test_empty_minidump() {
match Minidump::read(&b""[..]) {
Ok(_) => panic!("Should have failed to read minidump"),
Err(e) => assert_eq!(e, Error::MissingHeader),
}
}

0 comments on commit 8b8d3e8

Please sign in to comment.