OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_utils; | 5 library test_utils; |
6 | 6 |
7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
8 | 8 |
9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
10 import 'package:analyzer/src/generated/source.dart'; | 10 import 'package:analyzer/src/generated/source.dart'; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 String get encoding => _unsupported(); | 171 String get encoding => _unsupported(); |
172 | 172 |
173 int get modificationStamp =>_unsupported(); | 173 int get modificationStamp =>_unsupported(); |
174 | 174 |
175 UriKind get uriKind => _unsupported(); | 175 UriKind get uriKind => _unsupported(); |
176 | 176 |
177 bool exists() => true; | 177 bool exists() => true; |
178 | 178 |
179 bool get isInSystemLibrary => _unsupported(); | 179 bool get isInSystemLibrary => _unsupported(); |
180 | 180 |
| 181 Uri get uri => _unsupported(); |
| 182 |
181 Source resolve(String uri) => _unsupported(); | 183 Source resolve(String uri) => _unsupported(); |
182 | 184 |
183 Source resolveRelative(Uri uri) => _unsupported(); | 185 Uri resolveRelative(Uri uri) => _unsupported(); |
184 | 186 |
185 TimestampedData<String> get contents => _unsupported(); | 187 TimestampedData<String> get contents => _unsupported(); |
186 } | 188 } |
187 | 189 |
188 | 190 |
189 _unsupported() => throw new _UnsupportedOperationException(); | 191 _unsupported() => throw new _UnsupportedOperationException(); |
190 | 192 |
191 class _UnsupportedOperationException implements Exception { | 193 class _UnsupportedOperationException implements Exception { |
192 String toString() => 'UnsupportedOperationException'; | 194 String toString() => 'UnsupportedOperationException'; |
193 } | 195 } |
(...skipping 12 matching lines...) Expand all Loading... |
206 var parser = new Parser(null, listener); | 208 var parser = new Parser(null, listener); |
207 var statement = parser.parseStatement(token); | 209 var statement = parser.parseStatement(token); |
208 expect(statement, isNotNull); | 210 expect(statement, isNotNull); |
209 | 211 |
210 if (expectedErrorCodes != null) { | 212 if (expectedErrorCodes != null) { |
211 listener.expectErrors(expectedErrorCodes); | 213 listener.expectErrors(expectedErrorCodes); |
212 } | 214 } |
213 | 215 |
214 return statement; | 216 return statement; |
215 } | 217 } |
OLD | NEW |