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

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

Issue 103233003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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
« no previous file with comments | « pkg/analyzer/test/generated/scanner_test.dart ('k') | tests/co19/co19-analyzer2.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 3
4 library engine.test_support; 4 library engine.test_support;
5 5
6 import 'package:analyzer/src/generated/java_core.dart'; 6 import 'package:analyzer/src/generated/java_core.dart';
7 import 'package:analyzer/src/generated/java_junit.dart'; 7 import 'package:analyzer/src/generated/java_junit.dart';
8 import 'package:analyzer/src/generated/source.dart'; 8 import 'package:analyzer/src/generated/source.dart';
9 import 'package:analyzer/src/generated/error.dart'; 9 import 'package:analyzer/src/generated/error.dart';
10 import 'package:analyzer/src/generated/scanner.dart'; 10 import 'package:analyzer/src/generated/scanner.dart';
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 _lineInfoMap[source] = lineInfo; 279 _lineInfoMap[source] = lineInfo;
280 } 280 }
281 281
282 /** 282 /**
283 * Return `true` if the two errors are equivalent. 283 * Return `true` if the two errors are equivalent.
284 * 284 *
285 * @param firstError the first error being compared 285 * @param firstError the first error being compared
286 * @param secondError the second error being compared 286 * @param secondError the second error being compared
287 * @return `true` if the two errors are equivalent 287 * @return `true` if the two errors are equivalent
288 */ 288 */
289 bool equals4(AnalysisError firstError, AnalysisError secondError) => identical (firstError.errorCode, secondError.errorCode) && firstError.offset == secondErro r.offset && firstError.length == secondError.length && equals5(firstError.source , secondError.source); 289 bool equals5(AnalysisError firstError, AnalysisError secondError) => identical (firstError.errorCode, secondError.errorCode) && firstError.offset == secondErro r.offset && firstError.length == secondError.length && equals6(firstError.source , secondError.source);
290 290
291 /** 291 /**
292 * Return `true` if the two sources are equivalent. 292 * Return `true` if the two sources are equivalent.
293 * 293 *
294 * @param firstSource the first source being compared 294 * @param firstSource the first source being compared
295 * @param secondSource the second source being compared 295 * @param secondSource the second source being compared
296 * @return `true` if the two sources are equivalent 296 * @return `true` if the two sources are equivalent
297 */ 297 */
298 bool equals5(Source firstSource, Source secondSource) { 298 bool equals6(Source firstSource, Source secondSource) {
299 if (firstSource == null) { 299 if (firstSource == null) {
300 return secondSource == null; 300 return secondSource == null;
301 } else if (secondSource == null) { 301 } else if (secondSource == null) {
302 return false; 302 return false;
303 } 303 }
304 return firstSource == secondSource; 304 return firstSource == secondSource;
305 } 305 }
306 306
307 /** 307 /**
308 * Assert that the number of errors that have been gathered matches the number of errors that are 308 * Assert that the number of errors that have been gathered matches the number of errors that are
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 * Search through the given list of errors for an error that is equal to the t arget error. If one 372 * Search through the given list of errors for an error that is equal to the t arget error. If one
373 * is found, remove it from the list and return `true`, otherwise return `fals e` 373 * is found, remove it from the list and return `true`, otherwise return `fals e`
374 * without modifying the list. 374 * without modifying the list.
375 * 375 *
376 * @param errors the errors through which we are searching 376 * @param errors the errors through which we are searching
377 * @param targetError the error being searched for 377 * @param targetError the error being searched for
378 * @return `true` if the error is found and removed from the list 378 * @return `true` if the error is found and removed from the list
379 */ 379 */
380 bool foundAndRemoved(List<AnalysisError> errors, AnalysisError targetError) { 380 bool foundAndRemoved(List<AnalysisError> errors, AnalysisError targetError) {
381 for (AnalysisError error in errors) { 381 for (AnalysisError error in errors) {
382 if (equals4(error, targetError)) { 382 if (equals5(error, targetError)) {
383 errors.remove(error); 383 errors.remove(error);
384 return true; 384 return true;
385 } 385 }
386 } 386 }
387 return true; 387 return true;
388 } 388 }
389 } 389 }
390 390
391 /** 391 /**
392 * The class `EngineTestCase` defines utility methods for making assertions. 392 * The class `EngineTestCase` defines utility methods for making assertions.
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 return trampoline(target, arguments[0], arguments[1]); 859 return trampoline(target, arguments[0], arguments[1]);
860 case 3: 860 case 3:
861 return trampoline(target, arguments[0], arguments[1], arguments[2]); 861 return trampoline(target, arguments[0], arguments[1], arguments[2]);
862 case 4: 862 case 4:
863 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]); 863 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]);
864 default: 864 default:
865 throw new IllegalArgumentException("Not implemented for > 4 arguments"); 865 throw new IllegalArgumentException("Not implemented for > 4 arguments");
866 } 866 }
867 } 867 }
868 } 868 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/scanner_test.dart ('k') | tests/co19/co19-analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698