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

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

Issue 18612009: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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 library engine.test_support; 3 library engine.test_support;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'package:analyzer_experimental/src/generated/java_core.dart'; 5 import 'package:analyzer_experimental/src/generated/java_core.dart';
6 import 'package:analyzer_experimental/src/generated/java_engine.dart'; 6 import 'package:analyzer_experimental/src/generated/java_engine.dart';
7 import 'package:analyzer_experimental/src/generated/java_junit.dart'; 7 import 'package:analyzer_experimental/src/generated/java_junit.dart';
8 import 'package:analyzer_experimental/src/generated/source.dart'; 8 import 'package:analyzer_experimental/src/generated/source.dart';
9 import 'package:analyzer_experimental/src/generated/error.dart'; 9 import 'package:analyzer_experimental/src/generated/error.dart';
10 import 'package:analyzer_experimental/src/generated/scanner.dart'; 10 import 'package:analyzer_experimental/src/generated/scanner.dart';
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 PrintStringWriter writer = new PrintStringWriter(); 322 PrintStringWriter writer = new PrintStringWriter();
323 writer.print("Expected "); 323 writer.print("Expected ");
324 writer.print(expectedErrors.length); 324 writer.print(expectedErrors.length);
325 writer.print(" errors:"); 325 writer.print(" errors:");
326 for (AnalysisError error in expectedErrors) { 326 for (AnalysisError error in expectedErrors) {
327 Source source = error.source; 327 Source source = error.source;
328 LineInfo lineInfo = _lineInfoMap[source]; 328 LineInfo lineInfo = _lineInfoMap[source];
329 writer.newLine(); 329 writer.newLine();
330 if (lineInfo == null) { 330 if (lineInfo == null) {
331 int offset = error.offset; 331 int offset = error.offset;
332 writer.printf(" %s %s (%d..%d)", [source == null ? "" : source.shortNam e, error.errorCode, offset, offset + error.length]); 332 writer.printf(" %s %s (%d..%d)", [
333 source == null ? "" : source.shortName,
334 error.errorCode,
335 offset,
336 offset + error.length]);
333 } else { 337 } else {
334 LineInfo_Location location = lineInfo.getLocation(error.offset); 338 LineInfo_Location location = lineInfo.getLocation(error.offset);
335 writer.printf(" %s %s (%d, %d/%d)", [source == null ? "" : source.short Name, error.errorCode, location.lineNumber, location.columnNumber, error.length] ); 339 writer.printf(" %s %s (%d, %d/%d)", [
340 source == null ? "" : source.shortName,
341 error.errorCode,
342 location.lineNumber,
343 location.columnNumber,
344 error.length]);
336 } 345 }
337 } 346 }
338 writer.newLine(); 347 writer.newLine();
339 writer.print("found "); 348 writer.print("found ");
340 writer.print(_errors.length); 349 writer.print(_errors.length);
341 writer.print(" errors:"); 350 writer.print(" errors:");
342 for (AnalysisError error in _errors) { 351 for (AnalysisError error in _errors) {
343 Source source = error.source; 352 Source source = error.source;
344 LineInfo lineInfo = _lineInfoMap[source]; 353 LineInfo lineInfo = _lineInfoMap[source];
345 writer.newLine(); 354 writer.newLine();
346 if (lineInfo == null) { 355 if (lineInfo == null) {
347 int offset = error.offset; 356 int offset = error.offset;
348 writer.printf(" %s %s (%d..%d): %s", [source == null ? "" : source.shor tName, error.errorCode, offset, offset + error.length, error.message]); 357 writer.printf(" %s %s (%d..%d): %s", [
358 source == null ? "" : source.shortName,
359 error.errorCode,
360 offset,
361 offset + error.length,
362 error.message]);
349 } else { 363 } else {
350 LineInfo_Location location = lineInfo.getLocation(error.offset); 364 LineInfo_Location location = lineInfo.getLocation(error.offset);
351 writer.printf(" %s %s (%d, %d/%d): %s", [source == null ? "" : source.s hortName, error.errorCode, location.lineNumber, location.columnNumber, error.len gth, error.message]); 365 writer.printf(" %s %s (%d, %d/%d): %s", [
366 source == null ? "" : source.shortName,
367 error.errorCode,
368 location.lineNumber,
369 location.columnNumber,
370 error.length,
371 error.message]);
352 } 372 }
353 } 373 }
354 JUnitTestCase.fail(writer.toString()); 374 JUnitTestCase.fail(writer.toString());
355 } 375 }
356 376
357 /** 377 /**
358 * Search through the given list of errors for an error that is equal to the t arget error. If one 378 * Search through the given list of errors for an error that is equal to the t arget error. If one
359 * is found, remove it from the list and return `true`, otherwise return `fals e` 379 * is found, remove it from the list and return `true`, otherwise return `fals e`
360 * without modifying the list. 380 * without modifying the list.
361 * 381 *
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 return trampoline(target, arguments[0], arguments[1]); 844 return trampoline(target, arguments[0], arguments[1]);
825 case 3: 845 case 3:
826 return trampoline(target, arguments[0], arguments[1], arguments[2]); 846 return trampoline(target, arguments[0], arguments[1], arguments[2]);
827 case 4: 847 case 4:
828 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]); 848 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]);
829 default: 849 default:
830 throw new IllegalArgumentException("Not implemented for > 4 arguments"); 850 throw new IllegalArgumentException("Not implemented for > 4 arguments");
831 } 851 }
832 } 852 }
833 } 853 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/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