| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // TODO(jmesserly): this file needs to be refactored, it's a port from | 5 // TODO(jmesserly): this file needs to be refactored, it's a port from |
| 6 // package:dev_compiler's tests | 6 // package:dev_compiler's tests |
| 7 library analyzer.test.src.task.strong.strong_test_helper; | 7 library analyzer.test.src.task.strong.strong_test_helper; |
| 8 | 8 |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 | 10 |
| 11 import 'package:analyzer/dart/ast/ast.dart'; | 11 import 'package:analyzer/dart/ast/ast.dart'; |
| 12 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 12 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| 13 import 'package:analyzer/dart/ast/token.dart'; | 13 import 'package:analyzer/dart/ast/token.dart'; |
| 14 import 'package:analyzer/dart/element/element.dart'; | 14 import 'package:analyzer/dart/element/element.dart'; |
| 15 import 'package:analyzer/error/error.dart'; | 15 import 'package:analyzer/error/error.dart'; |
| 16 import 'package:analyzer/error/listener.dart'; | 16 import 'package:analyzer/error/listener.dart'; |
| 17 import 'package:analyzer/file_system/file_system.dart'; | 17 import 'package:analyzer/file_system/file_system.dart'; |
| 18 import 'package:analyzer/file_system/memory_file_system.dart'; | 18 import 'package:analyzer/file_system/memory_file_system.dart'; |
| 19 import 'package:analyzer/source/error_processor.dart'; | 19 import 'package:analyzer/source/error_processor.dart'; |
| 20 import 'package:analyzer/src/dart/analysis/driver.dart'; | 20 import 'package:analyzer/src/dart/analysis/driver.dart'; |
| 21 import 'package:analyzer/src/dart/analysis/file_state.dart'; | 21 import 'package:analyzer/src/dart/analysis/file_state.dart'; |
| 22 import 'package:analyzer/src/dart/ast/token.dart'; | 22 import 'package:analyzer/src/dart/ast/token.dart'; |
| 23 import 'package:analyzer/src/error/codes.dart'; | 23 import 'package:analyzer/src/error/codes.dart'; |
| 24 import 'package:analyzer/src/generated/engine.dart'; | 24 import 'package:analyzer/src/generated/engine.dart'; |
| 25 import 'package:analyzer/src/generated/source.dart'; | 25 import 'package:analyzer/src/generated/source.dart'; |
| 26 import 'package:front_end/src/base/performace_logger.dart'; |
| 26 import 'package:front_end/src/incremental/byte_store.dart'; | 27 import 'package:front_end/src/incremental/byte_store.dart'; |
| 27 import 'package:source_span/source_span.dart'; | 28 import 'package:source_span/source_span.dart'; |
| 28 import 'package:test/test.dart'; | 29 import 'package:test/test.dart'; |
| 29 | 30 |
| 30 import '../../context/mock_sdk.dart'; | 31 import '../../context/mock_sdk.dart'; |
| 31 | 32 |
| 32 SourceSpanWithContext _createSpanHelper( | 33 SourceSpanWithContext _createSpanHelper( |
| 33 LineInfo lineInfo, int start, Source source, String content, | 34 LineInfo lineInfo, int start, Source source, String content, |
| 34 {int end}) { | 35 {int end}) { |
| 35 var startLoc = _locationForOffset(lineInfo, source.uri, start); | 36 var startLoc = _locationForOffset(lineInfo, source.uri, start); |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 @override | 474 @override |
| 474 Source resolveAbsolute(Uri uri, [Uri actualUri]) { | 475 Source resolveAbsolute(Uri uri, [Uri actualUri]) { |
| 475 if (uri.scheme == 'package') { | 476 if (uri.scheme == 'package') { |
| 476 return (provider.getResource( | 477 return (provider.getResource( |
| 477 provider.convertPath('/packages/' + uri.path)) as File) | 478 provider.convertPath('/packages/' + uri.path)) as File) |
| 478 .createSource(uri); | 479 .createSource(uri); |
| 479 } | 480 } |
| 480 return super.resolveAbsolute(uri, actualUri); | 481 return super.resolveAbsolute(uri, actualUri); |
| 481 } | 482 } |
| 482 } | 483 } |
| OLD | NEW |