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

Side by Side Diff: pkg/analysis_server/test/integration/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/analysis_server/pubspec.yaml ('k') | pkg/analyzer_plugin/pubspec.yaml » ('j') | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library test.integration.analysis; 5 library test.integration.analysis;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 // We're already dealing with it. 745 // We're already dealing with it.
746 return; 746 return;
747 } 747 }
748 _receivedBadDataFromServer = true; 748 _receivedBadDataFromServer = true;
749 debugStdio(); 749 debugStdio();
750 // Give the server 1 second to continue outputting bad data before we kill 750 // Give the server 1 second to continue outputting bad data before we kill
751 // the test. This is helpful if the server has had an unhandled exception 751 // the test. This is helpful if the server has had an unhandled exception
752 // and is outputting a stacktrace, because it ensures that we see the 752 // and is outputting a stacktrace, because it ensures that we see the
753 // entire stacktrace. Use expectAsync() to prevent the test from 753 // entire stacktrace. Use expectAsync() to prevent the test from
754 // ending during this 1 second. 754 // ending during this 1 second.
755 new Future.delayed(new Duration(seconds: 1), expectAsync(() { 755 new Future.delayed(new Duration(seconds: 1), expectAsync0(() {
756 fail('Bad data received from server: $details'); 756 fail('Bad data received from server: $details');
757 })); 757 }));
758 } 758 }
759 759
760 /** 760 /**
761 * Record a message that was exchanged with the server, and print it out if 761 * Record a message that was exchanged with the server, and print it out if
762 * [debugStdio] has been called. 762 * [debugStdio] has been called.
763 */ 763 */
764 void _recordStdio(String line) { 764 void _recordStdio(String line) {
765 double elapsedTime = currentElapseTime; 765 double elapsedTime = currentElapseTime;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 void populateMismatches(item, List<MismatchDescriber> mismatches); 983 void populateMismatches(item, List<MismatchDescriber> mismatches);
984 984
985 /** 985 /**
986 * Create a [MismatchDescriber] describing a mismatch with a simple string. 986 * Create a [MismatchDescriber] describing a mismatch with a simple string.
987 */ 987 */
988 MismatchDescriber simpleDescription(String description) => 988 MismatchDescriber simpleDescription(String description) =>
989 (Description mismatchDescription) { 989 (Description mismatchDescription) {
990 mismatchDescription.add(description); 990 mismatchDescription.add(description);
991 }; 991 };
992 } 992 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/pubspec.yaml ('k') | pkg/analyzer_plugin/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698