Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: pkg/analyzer_plugin/test/integration/support/integration_tests.dart

Issue 2701473009: Switch to using expectAsync0() to address some deprecation warnings. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer_plugin/pubspec.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:convert'; 7 import 'dart:convert';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; 10 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 // We're already dealing with it. 712 // We're already dealing with it.
713 return; 713 return;
714 } 714 }
715 _receivedBadDataFromServer = true; 715 _receivedBadDataFromServer = true;
716 debugStdio(); 716 debugStdio();
717 // Give the server 1 second to continue outputting bad data before we kill 717 // Give the server 1 second to continue outputting bad data before we kill
718 // the test. This is helpful if the server has had an unhandled exception 718 // the test. This is helpful if the server has had an unhandled exception
719 // and is outputting a stacktrace, because it ensures that we see the 719 // and is outputting a stacktrace, because it ensures that we see the
720 // entire stacktrace. Use expectAsync() to prevent the test from 720 // entire stacktrace. Use expectAsync() to prevent the test from
721 // ending during this 1 second. 721 // ending during this 1 second.
722 new Future.delayed(new Duration(seconds: 1), expectAsync(() { 722 new Future.delayed(new Duration(seconds: 1), expectAsync0(() {
723 fail('Bad data received from server: $details'); 723 fail('Bad data received from server: $details');
724 })); 724 }));
725 } 725 }
726 726
727 /** 727 /**
728 * Record a message that was exchanged with the server, and print it out if 728 * Record a message that was exchanged with the server, and print it out if
729 * [debugStdio] has been called. 729 * [debugStdio] has been called.
730 */ 730 */
731 void _recordStdio(String line) { 731 void _recordStdio(String line) {
732 double elapsedTime = currentElapseTime; 732 double elapsedTime = currentElapseTime;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 void populateMismatches(item, List<MismatchDescriber> mismatches); 950 void populateMismatches(item, List<MismatchDescriber> mismatches);
951 951
952 /** 952 /**
953 * Create a [MismatchDescriber] describing a mismatch with a simple string. 953 * Create a [MismatchDescriber] describing a mismatch with a simple string.
954 */ 954 */
955 MismatchDescriber simpleDescription(String description) => 955 MismatchDescriber simpleDescription(String description) =>
956 (Description mismatchDescription) { 956 (Description mismatchDescription) {
957 mismatchDescription.add(description); 957 mismatchDescription.add(description);
958 }; 958 };
959 } 959 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698