Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim committed Nov 28, 2024
1 parent 452d604 commit 98496cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion crates/symbolicator-js/src/symbolication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::collections::BTreeSet;

use symbolic::sourcemapcache::{ScopeLookupResult, SourcePosition};
use symbolicator_service::caching::CacheError;
use symbolicator_service::metric;
use symbolicator_service::source_context::get_context_lines;

use crate::interface::{
Expand Down
16 changes: 10 additions & 6 deletions crates/symbolicator-proguard/src/symbolication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,9 @@ io.sentry.sample.MainActivity -> io.sentry.sample.MainActivity:

let mapped_frames: Vec<_> = frames
.iter()
.flat_map(|frame| ProguardService::map_frame(&[&cache], frame, None).into_iter())
.flat_map(|frame| {
ProguardService::map_frame(&[&cache], frame, None, &mut 0).into_iter()
})
.collect();

assert_eq!(mapped_frames.len(), 7);
Expand Down Expand Up @@ -688,7 +690,7 @@ org.slf4j.helpers.Util$ClassContext -> org.a.b.g$b:
let mapped_frames: Vec<_> = frames
.iter()
.flat_map(|frame| {
ProguardService::map_frame(&[&cache], frame, Some("org.slf4j")).into_iter()
ProguardService::map_frame(&[&cache], frame, Some("org.slf4j"), &mut 0).into_iter()
})
.collect();

Expand All @@ -712,7 +714,7 @@ org.slf4j.helpers.Util$ClassContext -> org.a.b.g$b:
..Default::default()
};

let remapped = ProguardService::map_frame(&[], &frame, Some("android"));
let remapped = ProguardService::map_frame(&[], &frame, Some("android"), &mut 0);

assert_eq!(remapped.len(), 1);
// The frame didn't get mapped, so we shouldn't set `in_app` even though
Expand Down Expand Up @@ -759,7 +761,7 @@ org.slf4j.helpers.Util$ClassContext -> org.a.b.g$b:
..Default::default()
};

let mapped_frames = ProguardService::map_frame(&[&cache], &frame, None);
let mapped_frames = ProguardService::map_frame(&[&cache], &frame, None, &mut 0);

assert_eq!(mapped_frames.len(), 2);

Expand Down Expand Up @@ -829,7 +831,7 @@ y.b -> y.b:
..Default::default()
};

let mapped_frames = ProguardService::map_frame(&[&cache], &frame, None);
let mapped_frames = ProguardService::map_frame(&[&cache], &frame, None, &mut 0);

assert_eq!(mapped_frames.len(), 1);

Expand Down Expand Up @@ -968,7 +970,9 @@ io.wzieba.r8fullmoderenamessources.R -> a.d:

let (remapped_filenames, remapped_abs_paths): (Vec<_>, Vec<_>) = frames
.iter()
.flat_map(|frame| ProguardService::map_frame(&[&cache], frame, None).into_iter())
.flat_map(|frame| {
ProguardService::map_frame(&[&cache], frame, None, &mut 0).into_iter()
})
.map(|frame| (frame.filename.unwrap(), frame.abs_path.unwrap()))
.unzip();

Expand Down

0 comments on commit 98496cc

Please sign in to comment.