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

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

Issue 12838003: Rename analyzer-experimental to analyzer_experimental. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 3
4 library engine.test_support; 4 library engine.test_support;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:uri'; 7 import 'dart:uri';
8 import 'package:analyzer-experimental/src/generated/java_core.dart'; 8 import 'package:analyzer_experimental/src/generated/java_core.dart';
9 import 'package:analyzer-experimental/src/generated/java_engine.dart'; 9 import 'package:analyzer_experimental/src/generated/java_engine.dart';
10 import 'package:analyzer-experimental/src/generated/java_junit.dart'; 10 import 'package:analyzer_experimental/src/generated/java_junit.dart';
11 import 'package:analyzer-experimental/src/generated/source.dart'; 11 import 'package:analyzer_experimental/src/generated/source.dart';
12 import 'package:analyzer-experimental/src/generated/error.dart'; 12 import 'package:analyzer_experimental/src/generated/error.dart';
13 import 'package:analyzer-experimental/src/generated/scanner.dart'; 13 import 'package:analyzer_experimental/src/generated/scanner.dart';
14 import 'package:analyzer-experimental/src/generated/element.dart' show Interface Type, MethodElement, PropertyAccessorElement; 14 import 'package:analyzer_experimental/src/generated/element.dart' show Interface Type, MethodElement, PropertyAccessorElement;
15 import 'package:unittest/unittest.dart' as _ut; 15 import 'package:unittest/unittest.dart' as _ut;
16 16
17 /** 17 /**
18 * Instances of the class {@code GatheringErrorListener} implement an error list ener that collects 18 * Instances of the class {@code GatheringErrorListener} implement an error list ener that collects
19 * all of the errors passed to it for later examination. 19 * all of the errors passed to it for later examination.
20 */ 20 */
21 class GatheringErrorListener implements AnalysisErrorListener { 21 class GatheringErrorListener implements AnalysisErrorListener {
22 /** 22 /**
23 * The source being parsed. 23 * The source being parsed.
24 */ 24 */
(...skipping 12 matching lines...) Expand all
37 */ 37 */
38 Map<Source, LineInfo> _lineInfoMap = new Map<Source, LineInfo>(); 38 Map<Source, LineInfo> _lineInfoMap = new Map<Source, LineInfo>();
39 /** 39 /**
40 * An empty array of errors used when no errors are expected. 40 * An empty array of errors used when no errors are expected.
41 */ 41 */
42 static List<AnalysisError> _NO_ERRORS = new List<AnalysisError>(0); 42 static List<AnalysisError> _NO_ERRORS = new List<AnalysisError>(0);
43 /** 43 /**
44 * Initialize a newly created error listener to collect errors. 44 * Initialize a newly created error listener to collect errors.
45 */ 45 */
46 GatheringErrorListener() : super() { 46 GatheringErrorListener() : super() {
47 _jtd_constructor_304_impl(); 47 _jtd_constructor_315_impl();
48 } 48 }
49 _jtd_constructor_304_impl() { 49 _jtd_constructor_315_impl() {
50 } 50 }
51 /** 51 /**
52 * Initialize a newly created error listener to collect errors. 52 * Initialize a newly created error listener to collect errors.
53 */ 53 */
54 GatheringErrorListener.con1(String rawSource2) { 54 GatheringErrorListener.con1(String rawSource2) {
55 _jtd_constructor_305_impl(rawSource2); 55 _jtd_constructor_316_impl(rawSource2);
56 } 56 }
57 _jtd_constructor_305_impl(String rawSource2) { 57 _jtd_constructor_316_impl(String rawSource2) {
58 this._rawSource = rawSource2; 58 this._rawSource = rawSource2;
59 this._markedSource = rawSource2; 59 this._markedSource = rawSource2;
60 } 60 }
61 /** 61 /**
62 * Assert that the number of errors that have been gathered matches the number of errors that are 62 * Assert that the number of errors that have been gathered matches the number of errors that are
63 * given and that they have the expected error codes and locations. The order in which the errors 63 * given and that they have the expected error codes and locations. The order in which the errors
64 * were gathered is ignored. 64 * were gathered is ignored.
65 * @param errorCodes the errors that should have been gathered 65 * @param errorCodes the errors that should have been gathered
66 * @throws AssertionFailedError if a different number of errors have been gath ered than were 66 * @throws AssertionFailedError if a different number of errors have been gath ered than were
67 * expected or if they do not have the same codes and locations 67 * expected or if they do not have the same codes and locations
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 /** 201 /**
202 * Return the errors that were collected. 202 * Return the errors that were collected.
203 * @return the errors that were collected 203 * @return the errors that were collected
204 */ 204 */
205 List<AnalysisError> get errors => _errors; 205 List<AnalysisError> get errors => _errors;
206 /** 206 /**
207 * Return {@code true} if an error with the given error code has been gathered . 207 * Return {@code true} if an error with the given error code has been gathered .
208 * @param errorCode the error code being searched for 208 * @param errorCode the error code being searched for
209 * @return {@code true} if an error with the given error code has been gathere d 209 * @return {@code true} if an error with the given error code has been gathere d
210 */ 210 */
211 bool hasError(ErrorCode errorCode4) { 211 bool hasError(ErrorCode errorCode5) {
212 for (AnalysisError error in _errors) { 212 for (AnalysisError error in _errors) {
213 if (identical(error.errorCode, errorCode4)) { 213 if (identical(error.errorCode, errorCode5)) {
214 return true; 214 return true;
215 } 215 }
216 } 216 }
217 return false; 217 return false;
218 } 218 }
219 void onError(AnalysisError error) { 219 void onError(AnalysisError error) {
220 if (_rawSource != null) { 220 if (_rawSource != null) {
221 int left = error.offset; 221 int left = error.offset;
222 int right = left + error.length - 1; 222 int right = left + error.length - 1;
223 _markedSource = "${_rawSource.substring(0, left)}^${_rawSource.substring(l eft, right)}^${_rawSource.substring(right)}"; 223 _markedSource = "${_rawSource.substring(0, left)}^${_rawSource.substring(l eft, right)}^${_rawSource.substring(right)}";
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 return trampoline(target, arguments[0], arguments[1]); 655 return trampoline(target, arguments[0], arguments[1]);
656 case 3: 656 case 3:
657 return trampoline(target, arguments[0], arguments[1], arguments[2]); 657 return trampoline(target, arguments[0], arguments[1], arguments[2]);
658 case 4: 658 case 4:
659 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]); 659 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]);
660 default: 660 default:
661 throw new IllegalArgumentException("Not implemented for > 4 arguments"); 661 throw new IllegalArgumentException("Not implemented for > 4 arguments");
662 } 662 }
663 } 663 }
664 } 664 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/test/generated/scanner_test.dart ('k') | pkg/analyzer_experimental/test/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698