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 analyzer.test.utils; | 5 library analyzer.test.utils; |
6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; |
7 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
8 import 'package:analyzer/dart/element/type.dart'; | 9 import 'package:analyzer/dart/element/type.dart'; |
9 import 'package:analyzer/src/generated/ast.dart'; | |
10 import 'package:analyzer/src/generated/java_io.dart'; | 10 import 'package:analyzer/src/generated/java_io.dart'; |
11 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; | 11 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; |
12 import 'package:path/path.dart' as path; | 12 import 'package:path/path.dart' as path; |
13 import 'package:unittest/unittest.dart'; | 13 import 'package:unittest/unittest.dart'; |
14 | 14 |
15 void initializeTestEnvironment() { | 15 void initializeTestEnvironment() { |
16 groupSep = ' | '; | 16 groupSep = ' | '; |
17 JavaFile.pathContext = path.posix; | 17 JavaFile.pathContext = path.posix; |
18 } | 18 } |
19 | 19 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 Asserter<DartType> isType(DartType argument) => (DartType t) { | 295 Asserter<DartType> isType(DartType argument) => (DartType t) { |
296 expect(t, same(argument)); | 296 expect(t, same(argument)); |
297 }; | 297 }; |
298 | 298 |
299 /** | 299 /** |
300 * Given a type, produce an assertion that a type has the same element. | 300 * Given a type, produce an assertion that a type has the same element. |
301 */ | 301 */ |
302 Asserter<DartType> sameElement(DartType elementType) => | 302 Asserter<DartType> sameElement(DartType elementType) => |
303 hasElement(elementType.element); | 303 hasElement(elementType.element); |
304 } | 304 } |
OLD | NEW |