[flutter_tools] Remove fromPlatform from tests (#54152)
This commit is contained in:
parent
59b2c5a39e
commit
03c566768b
@ -33,9 +33,10 @@ import '../../src/common.dart';
|
|||||||
import '../../src/context.dart';
|
import '../../src/context.dart';
|
||||||
import '../../src/testbed.dart';
|
import '../../src/testbed.dart';
|
||||||
|
|
||||||
final Generator _kNoColorOutputPlatform = () => FakePlatform.fromPlatform(const LocalPlatform())
|
final Generator _kNoColorOutputPlatform = () => FakePlatform(
|
||||||
..localeName = 'en_US.UTF-8'
|
localeName: 'en_US.UTF-8',
|
||||||
..stdoutSupportsAnsi = false;
|
stdoutSupportsAnsi: false,
|
||||||
|
);
|
||||||
|
|
||||||
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
||||||
Platform: _kNoColorOutputPlatform,
|
Platform: _kNoColorOutputPlatform,
|
||||||
|
@ -20,7 +20,8 @@ import 'package:process/process.dart';
|
|||||||
import '../../src/common.dart';
|
import '../../src/common.dart';
|
||||||
import '../../src/context.dart';
|
import '../../src/context.dart';
|
||||||
|
|
||||||
final Platform _kNoColorTerminalPlatform = FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false;
|
final Platform _kNoColorTerminalPlatform = FakePlatform(
|
||||||
|
stdoutSupportsAnsi: false);
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
String analyzerSeparator;
|
String analyzerSeparator;
|
||||||
|
@ -31,6 +31,7 @@ import '../../src/testbed.dart';
|
|||||||
|
|
||||||
const String frameworkRevision = '12345678';
|
const String frameworkRevision = '12345678';
|
||||||
const String frameworkChannel = 'omega';
|
const String frameworkChannel = 'omega';
|
||||||
|
// TODO(fujino): replace FakePlatform.fromPlatform() with FakePlatform()
|
||||||
final Generator _kNoColorTerminalPlatform = () => FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false;
|
final Generator _kNoColorTerminalPlatform = () => FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false;
|
||||||
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
||||||
Platform: _kNoColorTerminalPlatform,
|
Platform: _kNoColorTerminalPlatform,
|
||||||
|
@ -32,15 +32,17 @@ const Map<String, dynamic> macStudioInfoPlist = <String, dynamic>{
|
|||||||
class MockPlistUtils extends Mock implements PlistParser {}
|
class MockPlistUtils extends Mock implements PlistParser {}
|
||||||
|
|
||||||
Platform linuxPlatform() {
|
Platform linuxPlatform() {
|
||||||
return FakePlatform.fromPlatform(const LocalPlatform())
|
return FakePlatform(
|
||||||
..operatingSystem = 'linux'
|
operatingSystem: 'linux',
|
||||||
..environment = <String, String>{'HOME': homeLinux};
|
environment: <String, String>{'HOME': homeLinux},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform macPlatform() {
|
Platform macPlatform() {
|
||||||
return FakePlatform.fromPlatform(const LocalPlatform())
|
return FakePlatform(
|
||||||
..operatingSystem = 'macos'
|
operatingSystem: 'macos',
|
||||||
..environment = <String, String>{'HOME': homeMac};
|
environment: <String, String>{'HOME': homeMac},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
@ -18,9 +18,10 @@ import '../../src/context.dart';
|
|||||||
const String home = '/home/me';
|
const String home = '/home/me';
|
||||||
|
|
||||||
Platform linuxPlatform() {
|
Platform linuxPlatform() {
|
||||||
return FakePlatform.fromPlatform(const LocalPlatform())
|
return FakePlatform(
|
||||||
..operatingSystem = 'linux'
|
operatingSystem: 'linux',
|
||||||
..environment = <String, String>{'HOME': home};
|
environment: <String, String>{'HOME': home}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
@ -601,9 +601,10 @@ bool testErrorMessage(String errorMessage, GradleHandledError error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Platform fakePlatform(String name) {
|
Platform fakePlatform(String name) {
|
||||||
return FakePlatform
|
return FakePlatform(
|
||||||
.fromPlatform(const LocalPlatform())
|
environment: <String, String>{},
|
||||||
..operatingSystem = name;
|
operatingSystem: name,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class FakeGradleUtils extends GradleUtils {
|
class FakeGradleUtils extends GradleUtils {
|
||||||
|
@ -2633,9 +2633,11 @@ FlutterProject generateFakeAppBundle(String directoryName, String fileName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FakePlatform fakePlatform(String name) {
|
FakePlatform fakePlatform(String name) {
|
||||||
return FakePlatform.fromPlatform(const LocalPlatform())
|
return FakePlatform(
|
||||||
..operatingSystem = name
|
environment: <String, String>{'HOME': '/path/to/home'},
|
||||||
..stdoutSupportsAnsi = false;
|
operatingSystem: name,
|
||||||
|
stdoutSupportsAnsi: false,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class FakeGradleUtils extends GradleUtils {
|
class FakeGradleUtils extends GradleUtils {
|
||||||
|
@ -25,7 +25,7 @@ import 'package:platform/platform.dart';
|
|||||||
import '../src/common.dart';
|
import '../src/common.dart';
|
||||||
import '../src/context.dart';
|
import '../src/context.dart';
|
||||||
|
|
||||||
final Generator _kNoColorTerminalPlatform = () => FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false;
|
final Generator _kNoColorTerminalPlatform = () => FakePlatform(stdoutSupportsAnsi: false);
|
||||||
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
||||||
Platform: _kNoColorTerminalPlatform,
|
Platform: _kNoColorTerminalPlatform,
|
||||||
};
|
};
|
||||||
|
@ -15,7 +15,7 @@ import 'package:quiver/testing/async.dart';
|
|||||||
import '../../src/common.dart';
|
import '../../src/common.dart';
|
||||||
import '../../src/mocks.dart' as mocks;
|
import '../../src/mocks.dart' as mocks;
|
||||||
|
|
||||||
final Platform _kNoAnsiPlatform = FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false;
|
final Platform _kNoAnsiPlatform = FakePlatform(stdoutSupportsAnsi: false);
|
||||||
final String red = RegExp.escape(AnsiTerminal.red);
|
final String red = RegExp.escape(AnsiTerminal.red);
|
||||||
final String bold = RegExp.escape(AnsiTerminal.bold);
|
final String bold = RegExp.escape(AnsiTerminal.bold);
|
||||||
final String resetBold = RegExp.escape(AnsiTerminal.resetBold);
|
final String resetBold = RegExp.escape(AnsiTerminal.resetBold);
|
||||||
@ -54,7 +54,7 @@ void main() {
|
|||||||
final BufferLogger mockLogger = BufferLogger(
|
final BufferLogger mockLogger = BufferLogger(
|
||||||
terminal: AnsiTerminal(
|
terminal: AnsiTerminal(
|
||||||
stdio: mocks.MockStdio(),
|
stdio: mocks.MockStdio(),
|
||||||
platform: FakePlatform()..stdoutSupportsAnsi = true,
|
platform: FakePlatform(stdoutSupportsAnsi: true),
|
||||||
),
|
),
|
||||||
outputPreferences: OutputPreferences.test(showColor: true),
|
outputPreferences: OutputPreferences.test(showColor: true),
|
||||||
);
|
);
|
||||||
@ -250,8 +250,8 @@ void main() {
|
|||||||
AnsiStatus ansiStatus;
|
AnsiStatus ansiStatus;
|
||||||
|
|
||||||
setUp(() {
|
setUp(() {
|
||||||
platform = FakePlatform.fromPlatform(testPlatform)..stdoutSupportsAnsi = false;
|
platform = FakePlatform(stdoutSupportsAnsi: false);
|
||||||
ansiPlatform = FakePlatform.fromPlatform(testPlatform)..stdoutSupportsAnsi = true;
|
ansiPlatform = FakePlatform(stdoutSupportsAnsi: true);
|
||||||
|
|
||||||
terminal = AnsiTerminal(
|
terminal = AnsiTerminal(
|
||||||
stdio: mockStdio,
|
stdio: mockStdio,
|
||||||
@ -749,7 +749,7 @@ void main() {
|
|||||||
final Logger logger = StdoutLogger(
|
final Logger logger = StdoutLogger(
|
||||||
terminal: AnsiTerminal(
|
terminal: AnsiTerminal(
|
||||||
stdio: mockStdio,
|
stdio: mockStdio,
|
||||||
platform: FakePlatform()..stdoutSupportsAnsi = true,
|
platform: FakePlatform(stdoutSupportsAnsi: true),
|
||||||
),
|
),
|
||||||
stdio: mockStdio,
|
stdio: mockStdio,
|
||||||
outputPreferences: OutputPreferences.test(showColor: true),
|
outputPreferences: OutputPreferences.test(showColor: true),
|
||||||
|
@ -25,7 +25,7 @@ void main() {
|
|||||||
testLogger = BufferLogger(
|
testLogger = BufferLogger(
|
||||||
terminal: AnsiTerminal(
|
terminal: AnsiTerminal(
|
||||||
stdio: MockStdio(),
|
stdio: MockStdio(),
|
||||||
platform: FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false,
|
platform: FakePlatform(stdoutSupportsAnsi: false),
|
||||||
),
|
),
|
||||||
outputPreferences: OutputPreferences.test(),
|
outputPreferences: OutputPreferences.test(),
|
||||||
);
|
);
|
||||||
@ -35,7 +35,7 @@ void main() {
|
|||||||
return Net(
|
return Net(
|
||||||
httpClientFactory: () => client,
|
httpClientFactory: () => client,
|
||||||
logger: testLogger,
|
logger: testLogger,
|
||||||
platform: FakePlatform.fromPlatform(const LocalPlatform()),
|
platform: FakePlatform(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,10 +160,11 @@ void main() {
|
|||||||
ArgumentError('test exception handling'),
|
ArgumentError('test exception handling'),
|
||||||
),
|
),
|
||||||
logger: testLogger,
|
logger: testLogger,
|
||||||
platform: FakePlatform.fromPlatform(const LocalPlatform())
|
platform: FakePlatform(
|
||||||
..environment = <String, String>{
|
environment: <String, String>{
|
||||||
'FLUTTER_STORAGE_BASE_URL': 'example.invalid',
|
'FLUTTER_STORAGE_BASE_URL': 'example.invalid',
|
||||||
},
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
String error;
|
String error;
|
||||||
FakeAsync().run((FakeAsync time) {
|
FakeAsync().run((FakeAsync time) {
|
||||||
|
@ -85,7 +85,7 @@ void main() {
|
|||||||
mockLogger = BufferLogger(
|
mockLogger = BufferLogger(
|
||||||
terminal: AnsiTerminal(
|
terminal: AnsiTerminal(
|
||||||
stdio: MockStdio(),
|
stdio: MockStdio(),
|
||||||
platform: FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false,
|
platform: FakePlatform(stdoutSupportsAnsi: false),
|
||||||
),
|
),
|
||||||
outputPreferences: OutputPreferences(wrapText: true, wrapColumn: 40),
|
outputPreferences: OutputPreferences(wrapText: true, wrapColumn: 40),
|
||||||
);
|
);
|
||||||
@ -248,7 +248,7 @@ void main() {
|
|||||||
testLogger = BufferLogger(
|
testLogger = BufferLogger(
|
||||||
terminal: AnsiTerminal(
|
terminal: AnsiTerminal(
|
||||||
stdio: MockStdio(),
|
stdio: MockStdio(),
|
||||||
platform: FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false,
|
platform: FakePlatform(stdinSupportsAnsi: false),
|
||||||
),
|
),
|
||||||
outputPreferences: OutputPreferences(wrapText: true, wrapColumn: 40),
|
outputPreferences: OutputPreferences(wrapText: true, wrapColumn: 40),
|
||||||
);
|
);
|
||||||
|
@ -11,12 +11,9 @@ import '../../src/common.dart';
|
|||||||
typedef _InstallationMessage = String Function(Platform);
|
typedef _InstallationMessage = String Function(Platform);
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final FakePlatform macPlatform = FakePlatform.fromPlatform(const LocalPlatform());
|
final FakePlatform macPlatform = FakePlatform(operatingSystem: 'macos');
|
||||||
macPlatform.operatingSystem = 'macos';
|
final FakePlatform linuxPlatform = FakePlatform(operatingSystem: 'linux');
|
||||||
final FakePlatform linuxPlatform = FakePlatform.fromPlatform(const LocalPlatform());
|
final FakePlatform windowsPlatform = FakePlatform(operatingSystem: 'windows');
|
||||||
linuxPlatform.operatingSystem = 'linux';
|
|
||||||
final FakePlatform windowsPlatform = FakePlatform.fromPlatform(const LocalPlatform());
|
|
||||||
windowsPlatform.operatingSystem = 'windows';
|
|
||||||
|
|
||||||
void _checkInstallationURL(_InstallationMessage message) {
|
void _checkInstallationURL(_InstallationMessage message) {
|
||||||
expect(message(macPlatform), contains('https://flutter.dev/docs/get-started/install/macos#android-setup'));
|
expect(message(macPlatform), contains('https://flutter.dev/docs/get-started/install/macos#android-setup'));
|
||||||
|
@ -23,9 +23,7 @@ import '../../../src/common.dart';
|
|||||||
import '../../../src/context.dart';
|
import '../../../src/context.dart';
|
||||||
import '../../../src/mocks.dart' as mocks;
|
import '../../../src/mocks.dart' as mocks;
|
||||||
|
|
||||||
final Platform _kNoAnsiPlatform =
|
final Platform _kNoAnsiPlatform = FakePlatform(stdoutSupportsAnsi: false);
|
||||||
FakePlatform.fromPlatform(const LocalPlatform())
|
|
||||||
..stdoutSupportsAnsi = false;
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
BufferLogger logger;
|
BufferLogger logger;
|
||||||
|
@ -28,12 +28,9 @@ import '../../src/context.dart';
|
|||||||
import '../../src/mocks.dart';
|
import '../../src/mocks.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final FakePlatform macPlatform = FakePlatform.fromPlatform(const LocalPlatform());
|
final FakePlatform macPlatform = FakePlatform(operatingSystem: 'macos');
|
||||||
macPlatform.operatingSystem = 'macos';
|
final FakePlatform linuxPlatform = FakePlatform(operatingSystem: 'linux');
|
||||||
final FakePlatform linuxPlatform = FakePlatform.fromPlatform(const LocalPlatform());
|
final FakePlatform windowsPlatform = FakePlatform(operatingSystem: 'windows');
|
||||||
linuxPlatform.operatingSystem = 'linux';
|
|
||||||
final FakePlatform windowsPlatform = FakePlatform.fromPlatform(const LocalPlatform());
|
|
||||||
windowsPlatform.operatingSystem = 'windows';
|
|
||||||
|
|
||||||
group('IOSDevice', () {
|
group('IOSDevice', () {
|
||||||
final List<Platform> unsupportedPlatforms = <Platform>[linuxPlatform, windowsPlatform];
|
final List<Platform> unsupportedPlatforms = <Platform>[linuxPlatform, windowsPlatform];
|
||||||
|
@ -23,7 +23,7 @@ import 'package:process/process.dart';
|
|||||||
import '../../src/common.dart';
|
import '../../src/common.dart';
|
||||||
import '../../src/context.dart';
|
import '../../src/context.dart';
|
||||||
|
|
||||||
final Generator _kNoColorTerminalPlatform = () => FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false;
|
final Generator _kNoColorTerminalPlatform = () => FakePlatform(stdoutSupportsAnsi: false);
|
||||||
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
||||||
Platform: _kNoColorTerminalPlatform,
|
Platform: _kNoColorTerminalPlatform,
|
||||||
};
|
};
|
||||||
|
@ -44,8 +44,10 @@ void main() {
|
|||||||
MemoryFileSystem fileSystem;
|
MemoryFileSystem fileSystem;
|
||||||
|
|
||||||
setUp(() {
|
setUp(() {
|
||||||
osx = FakePlatform.fromPlatform(const LocalPlatform());
|
osx = FakePlatform(
|
||||||
osx.operatingSystem = 'macos';
|
environment: <String, String>{},
|
||||||
|
operatingSystem: 'macos',
|
||||||
|
);
|
||||||
fileSystem = MemoryFileSystem();
|
fileSystem = MemoryFileSystem();
|
||||||
fsUtils = FileSystemUtils(fileSystem: fileSystem, platform: osx);
|
fsUtils = FileSystemUtils(fileSystem: fileSystem, platform: osx);
|
||||||
});
|
});
|
||||||
|
@ -36,7 +36,7 @@ void main() {
|
|||||||
|
|
||||||
setUp(() {
|
setUp(() {
|
||||||
processManager = mocks.MockProcessManager();
|
processManager = mocks.MockProcessManager();
|
||||||
platform = fakePlatform('macos');
|
platform = FakePlatform(operatingSystem: 'macos');
|
||||||
fileSystem = MemoryFileSystem();
|
fileSystem = MemoryFileSystem();
|
||||||
fileSystem.file(xcodebuild).createSync(recursive: true);
|
fileSystem.file(xcodebuild).createSync(recursive: true);
|
||||||
terminal = MockAnsiTerminal();
|
terminal = MockAnsiTerminal();
|
||||||
@ -125,7 +125,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
testWithoutContext('xcodebuild isInstalled is false when not on MacOS', () {
|
testWithoutContext('xcodebuild isInstalled is false when not on MacOS', () {
|
||||||
final Platform platform = fakePlatform('notMacOS');
|
final Platform platform = FakePlatform(operatingSystem: 'notMacOS');
|
||||||
xcodeProjectInterpreter = XcodeProjectInterpreter(
|
xcodeProjectInterpreter = XcodeProjectInterpreter(
|
||||||
logger: logger,
|
logger: logger,
|
||||||
fileSystem: fileSystem,
|
fileSystem: fileSystem,
|
||||||
@ -175,6 +175,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
testWithoutContext('xcodebuild build settings is empty when xcodebuild failed to get the build settings', () async {
|
testWithoutContext('xcodebuild build settings is empty when xcodebuild failed to get the build settings', () async {
|
||||||
|
platform.environment = Map<String, String>.unmodifiable(<String, String>{});
|
||||||
when(processManager.runSync(
|
when(processManager.runSync(
|
||||||
argThat(contains(xcodebuild)),
|
argThat(contains(xcodebuild)),
|
||||||
workingDirectory: anyNamed('workingDirectory'),
|
workingDirectory: anyNamed('workingDirectory'),
|
||||||
@ -190,6 +191,7 @@ void main() {
|
|||||||
flakes: 1,
|
flakes: 1,
|
||||||
delay: delay + const Duration(seconds: 1),
|
delay: delay + const Duration(seconds: 1),
|
||||||
);
|
);
|
||||||
|
platform.environment = Map<String, String>.unmodifiable(<String, String>{});
|
||||||
|
|
||||||
expect(await xcodeProjectInterpreter.getBuildSettings(
|
expect(await xcodeProjectInterpreter.getBuildSettings(
|
||||||
'', '', timeout: delay),
|
'', '', timeout: delay),
|
||||||
@ -422,7 +424,7 @@ Information about project "Runner":
|
|||||||
FakePlatform platform;
|
FakePlatform platform;
|
||||||
|
|
||||||
setUp(() {
|
setUp(() {
|
||||||
platform = fakePlatform('ignored');
|
platform = FakePlatform();
|
||||||
});
|
});
|
||||||
|
|
||||||
testWithoutContext('environment variables as Xcode build settings', () {
|
testWithoutContext('environment variables as Xcode build settings', () {
|
||||||
@ -447,7 +449,7 @@ Information about project "Runner":
|
|||||||
fs = MemoryFileSystem();
|
fs = MemoryFileSystem();
|
||||||
mockArtifacts = MockLocalEngineArtifacts();
|
mockArtifacts = MockLocalEngineArtifacts();
|
||||||
mockProcessManager = MockProcessManager();
|
mockProcessManager = MockProcessManager();
|
||||||
macOS = fakePlatform('macos');
|
macOS = FakePlatform(operatingSystem: 'macos');
|
||||||
fs.file(xcodebuild).createSync(recursive: true);
|
fs.file(xcodebuild).createSync(recursive: true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -803,10 +805,6 @@ flutter:
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
FakePlatform fakePlatform(String name) {
|
|
||||||
return FakePlatform.fromPlatform(const LocalPlatform())..operatingSystem = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
class MockLocalEngineArtifacts extends Mock implements LocalEngineArtifacts {}
|
class MockLocalEngineArtifacts extends Mock implements LocalEngineArtifacts {}
|
||||||
class MockProcessManager extends Mock implements ProcessManager {}
|
class MockProcessManager extends Mock implements ProcessManager {}
|
||||||
class MockXcodeProjectInterpreter extends Mock implements XcodeProjectInterpreter {}
|
class MockXcodeProjectInterpreter extends Mock implements XcodeProjectInterpreter {}
|
||||||
|
@ -253,8 +253,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
group('available devices', () {
|
group('available devices', () {
|
||||||
final FakePlatform macPlatform = FakePlatform.fromPlatform(const LocalPlatform());
|
final FakePlatform macPlatform = FakePlatform(operatingSystem: 'macos');
|
||||||
macPlatform.operatingSystem = 'macos';
|
|
||||||
|
|
||||||
testWithoutContext('Xcode not installed', () async {
|
testWithoutContext('Xcode not installed', () async {
|
||||||
when(mockXcode.isInstalledAndMeetsVersionCheck).thenReturn(false);
|
when(mockXcode.isInstalledAndMeetsVersionCheck).thenReturn(false);
|
||||||
@ -447,8 +446,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
group('diagnostics', () {
|
group('diagnostics', () {
|
||||||
final FakePlatform macPlatform = FakePlatform.fromPlatform(const LocalPlatform());
|
final FakePlatform macPlatform = FakePlatform(operatingSystem: 'macos');
|
||||||
macPlatform.operatingSystem = 'macos';
|
|
||||||
|
|
||||||
testWithoutContext('Xcode not installed', () async {
|
testWithoutContext('Xcode not installed', () async {
|
||||||
when(mockXcode.isInstalledAndMeetsVersionCheck).thenReturn(false);
|
when(mockXcode.isInstalledAndMeetsVersionCheck).thenReturn(false);
|
||||||
|
@ -29,6 +29,7 @@ import 'package:process/process.dart';
|
|||||||
|
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
|
||||||
|
// TODO(fujino): replace FakePlatform.fromPlatform() with FakePlatform()
|
||||||
final Generator kNoColorTerminalPlatform = () {
|
final Generator kNoColorTerminalPlatform = () {
|
||||||
return FakePlatform.fromPlatform(
|
return FakePlatform.fromPlatform(
|
||||||
const LocalPlatform()
|
const LocalPlatform()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user