From e552832635c82370292bdfbf7eb42d9df205cbf2 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 21 Feb 2017 16:56:37 -0800 Subject: [PATCH] fix tests on Windows for flutter tools (#8322) --- packages/flutter_tools/test/src/context.dart | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/flutter_tools/test/src/context.dart b/packages/flutter_tools/test/src/context.dart index 04aa87f60d..ff8961c665 100644 --- a/packages/flutter_tools/test/src/context.dart +++ b/packages/flutter_tools/test/src/context.dart @@ -42,7 +42,7 @@ void testUsingContext(String description, dynamic testMethod(), { // Initialize the test context with some default mocks. // Seed these context entries first since others depend on them - testContext.putIfAbsent(Platform, () => new _FakePlatform()); + testContext.putIfAbsent(Platform, () => const LocalPlatform()); testContext.putIfAbsent(FileSystem, () => const LocalFileSystem()); testContext.putIfAbsent(ProcessManager, () => const LocalProcessManager()); testContext.putIfAbsent(Logger, () => new BufferLogger()); @@ -140,13 +140,6 @@ class MockSimControl extends Mock implements SimControl { } } -class _FakePlatform extends FakePlatform { - _FakePlatform() : super.fromPlatform(const LocalPlatform()); - - @override - bool get isWindows => false; -} - class MockOperatingSystemUtils extends Mock implements OperatingSystemUtils {} class MockIOSSimulatorUtils extends Mock implements IOSSimulatorUtils {}