Skip to content

Commit cce339e

Browse files
Fix the tests
1 parent 5c997e1 commit cce339e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/vector_graphics/test/vector_graphics_test.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,9 @@ void main() {
442442
);
443443
await tester.pumpAndSettle();
444444

445-
expect(await completer.future, isA<PictureInfo>());
445+
final PictureInfo picture = await completer.future;
446+
addTearDown(picture.picture.dispose);
447+
expect(picture, isA<PictureInfo>());
446448
expect(debugLastLocale, const Locale('fr', 'CH'));
447449
expect(debugLastTextDirection, TextDirection.rtl);
448450
});
@@ -475,7 +477,9 @@ void main() {
475477
);
476478
await tester.pumpAndSettle();
477479

478-
expect(await completer.future, isA<PictureInfo>());
480+
final PictureInfo picture = await completer.future;
481+
addTearDown(picture.picture.dispose);
482+
expect(picture, isA<PictureInfo>());
479483
expect(debugLastLocale, PlatformDispatcher.instance.locale);
480484
expect(debugLastTextDirection, TextDirection.ltr);
481485
});
@@ -584,7 +588,7 @@ void main() {
584588
expect(imageCache.statusForKey(imageKey).live, false);
585589
expect(imageCache.statusForKey(imageKey).keepAlive, true);
586590

587-
// A blue square, becuase the image is available now.
591+
// A blue square, because the image is available now.
588592
await expectLater(
589593
find.byKey(key),
590594
matchesGoldenFile('vg_with_image_blue.png'),

0 commit comments

Comments
 (0)