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

Side by Side Diff: pkg/analyzer/test/generated/test_support.dart

Issue 712083003: Create fewer unnecessary lists (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.test_support; 8 library engine.test_support;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 /** 233 /**
234 * Assert that the number of errors that have been gathered matches the number of errors that are 234 * Assert that the number of errors that have been gathered matches the number of errors that are
235 * given and that they have the expected error codes. The order in which the e rrors were gathered 235 * given and that they have the expected error codes. The order in which the e rrors were gathered
236 * is ignored. 236 * is ignored.
237 * 237 *
238 * @param expectedErrorCodes the error codes of the errors that should have be en gathered 238 * @param expectedErrorCodes the error codes of the errors that should have be en gathered
239 * @throws AssertionFailedError if a different number of errors have been gath ered than were 239 * @throws AssertionFailedError if a different number of errors have been gath ered than were
240 * expected 240 * expected
241 */ 241 */
242 void assertErrorsWithCodes(List<ErrorCode> expectedErrorCodes) { 242 void assertErrorsWithCodes([List<ErrorCode> expectedErrorCodes = ErrorCode.EMP TY_LIST]) {
243 StringBuffer buffer = new StringBuffer(); 243 StringBuffer buffer = new StringBuffer();
244 // 244 //
245 // Verify that the expected error codes have a non-empty message. 245 // Verify that the expected error codes have a non-empty message.
246 // 246 //
247 for (ErrorCode errorCode in expectedErrorCodes) { 247 for (ErrorCode errorCode in expectedErrorCodes) {
248 expect(errorCode.message.isEmpty, isFalse, reason: "Empty error code messa ge"); 248 expect(errorCode.message.isEmpty, isFalse, reason: "Empty error code messa ge");
249 } 249 }
250 // 250 //
251 // Compute the expected number of each type of error. 251 // Compute the expected number of each type of error.
252 // 252 //
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 void getContentsToReceiver(Source_ContentReceiver receiver) { 638 void getContentsToReceiver(Source_ContentReceiver receiver) {
639 throw new UnsupportedOperationException(); 639 throw new UnsupportedOperationException();
640 } 640 }
641 Source resolve(String uri) { 641 Source resolve(String uri) {
642 throw new UnsupportedOperationException(); 642 throw new UnsupportedOperationException();
643 } 643 }
644 Uri resolveRelativeUri(Uri uri) { 644 Uri resolveRelativeUri(Uri uri) {
645 return new Uri(scheme: 'file', path: _name).resolveUri(uri); 645 return new Uri(scheme: 'file', path: _name).resolveUri(uri);
646 } 646 }
647 } 647 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test.dart ('k') | pkg/analyzer/test/generated/utilities_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698