Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim committed Feb 16, 2023
1 parent 7537ba8 commit e8f8d6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions symbolic-debuginfo/tests/test_objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,9 @@ fn test_ppdb_has_sources() -> Result<(), Error> {
assert_eq!(object.has_sources(), true);
}
{
// This is a special case with a broken file, see symbolic-ppdb tests.
let view = ByteView::open(fixture("android/Sentry.Samples.Maui.pdb"))?;
let object = Object::parse(&view)?;
assert_eq!(object.has_sources(), false);
assert_eq!(object.has_sources(), true);
}
Ok(())
}
Expand Down
6 changes: 2 additions & 4 deletions symbolic-ppdb/tests/test_ppdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,14 @@ fn test_embedded_sources_contents() {
);
}

/// This is here to prevent regression. The following test PDB was built in sentry-dotnet MAUI
/// sample for net6.0-android and failed with: `InvalidCustomDebugInformationTag(0)`
#[test]
fn test_embedded_sources_with_metadata_broken() {
fn test_embedded_sources_with_metadata_maui() {
let buf = std::fs::read(fixture("android/Sentry.Samples.Maui.pdb")).unwrap();

let ppdb = PortablePdb::parse(&buf).unwrap();
let iter = ppdb.get_embedded_sources().unwrap();
let items = iter.collect::<Result<Vec<_>, _>>().unwrap();
assert_eq!(items.len(), 0);
assert_eq!(items.len(), 5);
}

#[test]
Expand Down

0 comments on commit e8f8d6c

Please sign in to comment.