From 19901f674beffbb399b1bfd383b863cdf2498327 Mon Sep 17 00:00:00 2001 From: Darren Austin Date: Thu, 28 Mar 2019 18:08:29 -0700 Subject: [PATCH] Fix a misuse of matchesGoldenFile() in the physical_model_test. (#30141) Fixed a misuse of matchesGoldenFile() in the physical_model_test so that it correctly reports a failed test on Linux (and skips the other platforms). --- packages/flutter/test/widgets/physical_model_test.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/flutter/test/widgets/physical_model_test.dart b/packages/flutter/test/widgets/physical_model_test.dart index 75fce540a4c..5fb77111275 100644 --- a/packages/flutter/test/widgets/physical_model_test.dart +++ b/packages/flutter/test/widgets/physical_model_test.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:io' show Platform; + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; @@ -61,6 +63,10 @@ void main() { ); expect(tester.takeException(), startsWith('A RenderFlex overflowed by ')); - expect(find.byKey(key), matchesGoldenFile('physical_model_overflow.png')); + await expectLater( + find.byKey(key), + matchesGoldenFile('physical_model_overflow.png'), + skip: !Platform.isLinux, + ); }); }