Re-enable missing_return (#20844)

This commit is contained in:
Ian Hickson
2018-08-28 11:22:57 -07:00
committed by GitHub
parent 458d0b3d21
commit 53b635817c
48 changed files with 88 additions and 59 deletions

View File

@@ -369,7 +369,7 @@ Future<Null> _recompile(StreamController<List<int>> streamController,
String mockCompilerOutput) async {
// Put content into the output stream after generator.recompile gets
// going few lines below, resets completer.
new Future<List<int>>(() {
scheduleMicrotask(() {
streamController.add(utf8.encode(mockCompilerOutput));
});
final CompilerOutput output = await generator.recompile(null /* mainPath */, <String>['/path/to/main.dart']);

View File

@@ -125,8 +125,12 @@ void main() {
// Crash if called a third time which is unexpected.
mockTimes = <int>[1000, 2000];
final DummyFlutterCommand flutterCommand =
new DummyFlutterCommand(commandFunction: () async { throwToolExit('fail'); });
final DummyFlutterCommand flutterCommand = new DummyFlutterCommand(
commandFunction: () async {
throwToolExit('fail');
return null; // unreachable
},
);
try {
await flutterCommand.run();

View File

@@ -130,7 +130,7 @@ baz=qux
test('fires at start', () async {
bool called = false;
poller = new Poller(() {
poller = new Poller(() async {
called = true;
}, const Duration(seconds: 1));
expect(called, false);
@@ -141,7 +141,7 @@ baz=qux
test('runs periodically', () async {
// Ensure we get the first (no-delay) callback, and one of the periodic callbacks.
int callCount = 0;
poller = new Poller(() {
poller = new Poller(() async {
callCount++;
}, new Duration(milliseconds: kShortDelay.inMilliseconds ~/ 2));
expect(callCount, 0);