sort_constructors_first (#22575)

This commit is contained in:
Alexandre Ardhuin
2018-10-04 07:28:07 +02:00
committed by GitHub
parent a68b03e9ce
commit 2ea1d81cdc
74 changed files with 449 additions and 444 deletions

View File

@@ -281,8 +281,6 @@ Future<ProcessResult> _resultOfGradleTask({String workingDirectory, String task,
}
class _Dependencies {
String target;
Set<String> dependencies;
_Dependencies(String depfilePath) {
final RegExp _separatorExpr = RegExp(r'([^\\]) ');
final RegExp _escapeExpr = RegExp(r'\\(.)');
@@ -301,6 +299,9 @@ class _Dependencies {
.where((String path) => path.isNotEmpty)
.toSet();
}
String target;
Set<String> dependencies;
}
/// Returns [null] if target matches [expectedTarget], otherwise returns an error message.

View File

@@ -100,6 +100,12 @@ abstract class Device {
}
class AndroidDeviceDiscovery implements DeviceDiscovery {
factory AndroidDeviceDiscovery() {
return _instance ??= AndroidDeviceDiscovery._();
}
AndroidDeviceDiscovery._();
// Parses information about a device. Example:
//
// 015d172c98400a03 device usb:340787200X product:nakasi model:Nexus_7 device:grouper
@@ -107,12 +113,6 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
static AndroidDeviceDiscovery _instance;
factory AndroidDeviceDiscovery() {
return _instance ??= AndroidDeviceDiscovery._();
}
AndroidDeviceDiscovery._();
AndroidDevice _workingDevice;
@override
@@ -349,15 +349,14 @@ class AndroidDevice implements Device {
}
class IosDeviceDiscovery implements DeviceDiscovery {
static IosDeviceDiscovery _instance;
factory IosDeviceDiscovery() {
return _instance ??= IosDeviceDiscovery._();
}
IosDeviceDiscovery._();
static IosDeviceDiscovery _instance;
IosDevice _workingDevice;
@override

View File

@@ -49,17 +49,6 @@ Future<TaskResult> task(TaskFunction task) {
}
class _TaskRunner {
static final Logger logger = Logger('TaskRunner');
final TaskFunction task;
// TODO(ianh): workaround for https://github.com/dart-lang/sdk/issues/23797
RawReceivePort _keepAlivePort;
Timer _startTaskTimeout;
bool _taskStarted = false;
final Completer<TaskResult> _completer = Completer<TaskResult>();
_TaskRunner(this.task) {
registerExtension('ext.cocoonRunTask',
(String method, Map<String, String> parameters) async {
@@ -75,6 +64,17 @@ class _TaskRunner {
});
}
final TaskFunction task;
// TODO(ianh): workaround for https://github.com/dart-lang/sdk/issues/23797
RawReceivePort _keepAlivePort;
Timer _startTaskTimeout;
bool _taskStarted = false;
final Completer<TaskResult> _completer = Completer<TaskResult>();
static final Logger logger = Logger('TaskRunner');
/// Signals that this task runner finished running the task.
Future<TaskResult> get whenDone => _completer.future;

View File

@@ -26,11 +26,11 @@ TaskFunction combine(List<TaskFunction> tasks) {
/// Defines task that creates new Flutter project, adds a plugin, and then
/// builds the specified [buildTarget].
class PluginTest {
PluginTest(this.buildTarget, this.options);
final String buildTarget;
final List<String> options;
PluginTest(this.buildTarget, this.options);
Future<TaskResult> call() async {
section('Create Flutter project');
final Directory tempDir = Directory.systemTemp.createTempSync('flutter_devicelab_plugin_test.');

View File

@@ -4,11 +4,11 @@
/// A pair of values. Used for testing custom codecs.
class Pair {
Pair(this.left, this.right);
final dynamic left;
final dynamic right;
Pair(this.left, this.right);
@override
String toString() => 'Pair[$left, $right]';
}

View File

@@ -25,13 +25,6 @@ const String nothing = '-';
/// - The Flutter app records the incoming reply echo.
/// - The platform finally replies to the original message with another echo.
class TestStepResult {
static const TextStyle bold = TextStyle(fontWeight: FontWeight.bold);
static const TestStepResult complete = TestStepResult(
'Test complete',
nothing,
TestStatus.complete,
);
const TestStepResult(
this.name,
this.description,
@@ -71,6 +64,13 @@ class TestStepResult {
final dynamic replyEcho;
final dynamic error;
static const TextStyle bold = TextStyle(fontWeight: FontWeight.bold);
static const TestStepResult complete = TestStepResult(
'Test complete',
nothing,
TestStatus.complete,
);
Widget asWidget(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,

View File

@@ -13,13 +13,6 @@ typedef TestStep = Future<TestStepResult> Function();
const String nothing = '-';
class TestStepResult {
static const TextStyle bold = TextStyle(fontWeight: FontWeight.bold);
static const TestStepResult complete = TestStepResult(
'Test complete',
nothing,
TestStatus.complete,
);
const TestStepResult(this.name, this.description, this.status);
factory TestStepResult.fromSnapshot(AsyncSnapshot<TestStepResult> snapshot) {
@@ -45,6 +38,13 @@ class TestStepResult {
final String description;
final TestStatus status;
static const TextStyle bold = TextStyle(fontWeight: FontWeight.bold);
static const TestStepResult complete = TestStepResult(
'Test complete',
nothing,
TestStatus.complete,
);
Widget asWidget(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,