| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.src.summary.summary_sdk_test; | 5 library test.src.summary.summary_sdk_test; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/context/cache.dart'; | 10 import 'package:analyzer/src/context/cache.dart'; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 void setUp() { | 42 void setUp() { |
| 43 _initializeSdkContext(); | 43 _initializeSdkContext(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 test_libraryResults() { | 46 test_libraryResults() { |
| 47 if (context == null) { | 47 if (context == null) { |
| 48 return; | 48 return; |
| 49 } | 49 } |
| 50 // verify that there are at least some interesting libraries in the bundle | 50 // verify that there are at least some interesting libraries in the bundle |
| 51 expect(sdkBundle.prelinkedLibraryUris, contains('dart:core')); | 51 expect(sdkBundle.linkedLibraryUris, contains('dart:core')); |
| 52 expect(sdkBundle.prelinkedLibraryUris, contains('dart:async')); | 52 expect(sdkBundle.linkedLibraryUris, contains('dart:async')); |
| 53 expect(sdkBundle.prelinkedLibraryUris, contains('dart:html')); | 53 expect(sdkBundle.linkedLibraryUris, contains('dart:html')); |
| 54 // verify every library | 54 // verify every library |
| 55 for (String uri in sdkBundle.prelinkedLibraryUris) { | 55 for (String uri in sdkBundle.linkedLibraryUris) { |
| 56 // TODO(scheglov) breaks at _LibraryResynthesizer.buildImplicitTopLevelVar
iable | 56 // TODO(scheglov) breaks at _LibraryResynthesizer.buildImplicitTopLevelVar
iable |
| 57 if (uri == 'dart:io' || uri == 'dart:_isolate_helper') { | 57 if (uri == 'dart:io' || uri == 'dart:_isolate_helper') { |
| 58 continue; | 58 continue; |
| 59 } | 59 } |
| 60 _assertLibraryResults(uri); | 60 _assertLibraryResults(uri); |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 test_sourceKind() { | 64 test_sourceKind() { |
| 65 if (context == null) { | 65 if (context == null) { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 @override | 251 @override |
| 252 Uri resolveRelativeUri(Uri relativeUri) { | 252 Uri resolveRelativeUri(Uri relativeUri) { |
| 253 Uri baseUri = uri; | 253 Uri baseUri = uri; |
| 254 if (uri.scheme == 'dart') { | 254 if (uri.scheme == 'dart') { |
| 255 String libraryName = uri.path; | 255 String libraryName = uri.path; |
| 256 baseUri = Uri.parse('dart:$libraryName/$libraryName.dart'); | 256 baseUri = Uri.parse('dart:$libraryName/$libraryName.dart'); |
| 257 } | 257 } |
| 258 return baseUri.resolveUri(relativeUri); | 258 return baseUri.resolveUri(relativeUri); |
| 259 } | 259 } |
| 260 } | 260 } |
| OLD | NEW |