[flutter tools] Revert desktop device name changes and print the category instead (#60395)

This commit is contained in:
James D. Lin 2020-06-30 11:28:02 -07:00 committed by GitHub
parent ca713557d7
commit cf8fbc363a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 9 deletions

View File

@ -559,7 +559,7 @@ abstract class Device {
supportIndicator += ' ($type)';
}
table.add(<String>[
device.name,
'${device.name} (${device.category})',
device.id,
getNameForTargetPlatform(targetPlatform),
'${await device.sdkNameAndVersion}$supportIndicator',

View File

@ -26,7 +26,7 @@ class LinuxDevice extends DesktopDevice {
bool isSupported() => true;
@override
String get name => 'Linux desktop';
String get name => 'Linux';
@override
Future<TargetPlatform> get targetPlatform async => TargetPlatform.linux_x64;

View File

@ -24,7 +24,7 @@ class MacOSDevice extends DesktopDevice {
bool isSupported() => true;
@override
String get name => 'macOS desktop';
String get name => 'macOS';
@override
Future<TargetPlatform> get targetPlatform async => TargetPlatform.darwin_x64;

View File

@ -27,7 +27,7 @@ class WindowsDevice extends DesktopDevice {
bool isSupported() => true;
@override
String get name => 'Windows desktop';
String get name => 'Windows';
@override
Future<TargetPlatform> get targetPlatform async => TargetPlatform.windows_x64;

View File

@ -120,8 +120,8 @@ void main() {
'''
2 connected devices:
ephemeral ephemeral android-arm Test SDK (1.2.3) (emulator)
webby webby web-javascript Web SDK (1.2.4) (emulator)
ephemeral (mobile) ephemeral android-arm Test SDK (1.2.3) (emulator)
webby (mobile) webby web-javascript Web SDK (1.2.4) (emulator)
Cannot connect to device ABC
'''

View File

@ -28,7 +28,7 @@ void main() {
testWithoutContext('LinuxDevice defaults', () async {
final PrebuiltLinuxApp linuxApp = PrebuiltLinuxApp(executable: 'foo');
expect(await device.targetPlatform, TargetPlatform.linux_x64);
expect(device.name, 'Linux desktop');
expect(device.name, 'Linux');
expect(await device.installApp(linuxApp), true);
expect(await device.uninstallApp(linuxApp), true);
expect(await device.isLatestBuildInstalled(linuxApp), true);

View File

@ -40,7 +40,7 @@ void main() {
testUsingContext('defaults', () async {
final MockMacOSApp mockMacOSApp = MockMacOSApp();
expect(await device.targetPlatform, TargetPlatform.darwin_x64);
expect(device.name, 'macOS desktop');
expect(device.name, 'macOS');
expect(await device.installApp(mockMacOSApp), true);
expect(await device.uninstallApp(mockMacOSApp), true);
expect(await device.isLatestBuildInstalled(mockMacOSApp), true);

View File

@ -32,7 +32,7 @@ void main() {
testUsingContext('defaults', () async {
final PrebuiltWindowsApp windowsApp = PrebuiltWindowsApp(executable: 'foo');
expect(await device.targetPlatform, TargetPlatform.windows_x64);
expect(device.name, 'Windows desktop');
expect(device.name, 'Windows');
expect(await device.installApp(windowsApp), true);
expect(await device.uninstallApp(windowsApp), true);
expect(await device.isLatestBuildInstalled(windowsApp), true);