Skip to content

Commit

Permalink
code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Jun 13, 2024
1 parent ef05592 commit 298d05e
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion flutter/test/sentry_native_channel_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ void main() {
});

test('loadContexts', () async {
late Map<String, dynamic> captured;
when(channel.invokeMethod('loadContexts'))
.thenAnswer((invocation) async => {
'foo': [1, 2, 3],
Expand All @@ -264,6 +263,27 @@ void main() {
'bar': {'a': 'b'},
});
});

test('loadDebugImages', () async {
final json = [
{
'code_file': '/apex/com.android.art/javalib/arm64/boot.oat',
'code_id': '13577ce71153c228ecf0eb73fc39f45010d487f8',
'image_addr': '0x6f80b000',
'image_size': 3092480,
'type': 'elf',
'debug_id': 'e77c5713-5311-28c2-ecf0-eb73fc39f450',
'debug_file': 'test'
}
];

when(channel.invokeMethod('loadImageList'))
.thenAnswer((invocation) async => json);

final data = await sut.loadDebugImages();

expect(data?.map((v) => v.toJson()), json);
});
});
}
}

0 comments on commit 298d05e

Please sign in to comment.