Re-enable missing_return (#20844)
This commit is contained in:
@@ -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']);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user