| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.generated.all_the_rest_test; | 5 library analyzer.test.generated.all_the_rest_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 JavaFile dirHtml = new JavaFile.relative(sdk.libraryDirectory, "html"); | 181 JavaFile dirHtml = new JavaFile.relative(sdk.libraryDirectory, "html"); |
| 182 JavaFile dirDartium = new JavaFile.relative(dirHtml, "dartium"); | 182 JavaFile dirDartium = new JavaFile.relative(dirHtml, "dartium"); |
| 183 JavaFile file = new JavaFile.relative(dirDartium, "html_dartium.dart"); | 183 JavaFile file = new JavaFile.relative(dirDartium, "html_dartium.dart"); |
| 184 expect(file.isFile(), isTrue); | 184 expect(file.isFile(), isTrue); |
| 185 Source source = sdk.fromFileUri(file.toURI()); | 185 Source source = sdk.fromFileUri(file.toURI()); |
| 186 expect(source, isNotNull); | 186 expect(source, isNotNull); |
| 187 expect(source.isInSystemLibrary, isTrue); | 187 expect(source.isInSystemLibrary, isTrue); |
| 188 expect(source.uri.toString(), "dart:html"); | 188 expect(source.uri.toString(), "dart:html"); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void test_fromFile_library_html_common_dart2js() { |
| 192 DirectoryBasedDartSdk sdk = _createDartSdk(); |
| 193 JavaFile dirHtml = new JavaFile.relative(sdk.libraryDirectory, "html"); |
| 194 JavaFile dirCommon = new JavaFile.relative(dirHtml, "html_common"); |
| 195 JavaFile file = |
| 196 new JavaFile.relative(dirCommon, "html_common_dart2js.dart"); |
| 197 expect(file.isFile(), isTrue); |
| 198 Source source = sdk.fromFileUri(file.toURI()); |
| 199 expect(source, isNotNull); |
| 200 expect(source.isInSystemLibrary, isTrue); |
| 201 expect(source.uri.toString(), "dart:html_common/html_common_dart2js.dart"); |
| 202 } |
| 203 |
| 191 void test_fromFile_part() { | 204 void test_fromFile_part() { |
| 192 DirectoryBasedDartSdk sdk = _createDartSdk(); | 205 DirectoryBasedDartSdk sdk = _createDartSdk(); |
| 193 Source source = sdk.fromFileUri(new JavaFile.relative( | 206 Source source = sdk.fromFileUri(new JavaFile.relative( |
| 194 new JavaFile.relative(sdk.libraryDirectory, "core"), "num.dart") | 207 new JavaFile.relative(sdk.libraryDirectory, "core"), "num.dart") |
| 195 .toURI()); | 208 .toURI()); |
| 196 expect(source, isNotNull); | 209 expect(source, isNotNull); |
| 197 expect(source.isInSystemLibrary, isTrue); | 210 expect(source.isInSystemLibrary, isTrue); |
| 198 expect(source.uri.toString(), "dart:core/num.dart"); | 211 expect(source.uri.toString(), "dart:core/num.dart"); |
| 199 } | 212 } |
| 200 | 213 |
| (...skipping 3915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4116 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI)); | 4129 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI)); |
| 4117 expect(UriKind.fromEncoding(0x58), same(null)); | 4130 expect(UriKind.fromEncoding(0x58), same(null)); |
| 4118 } | 4131 } |
| 4119 | 4132 |
| 4120 void test_getEncoding() { | 4133 void test_getEncoding() { |
| 4121 expect(UriKind.DART_URI.encoding, 0x64); | 4134 expect(UriKind.DART_URI.encoding, 0x64); |
| 4122 expect(UriKind.FILE_URI.encoding, 0x66); | 4135 expect(UriKind.FILE_URI.encoding, 0x66); |
| 4123 expect(UriKind.PACKAGE_URI.encoding, 0x70); | 4136 expect(UriKind.PACKAGE_URI.encoding, 0x70); |
| 4124 } | 4137 } |
| 4125 } | 4138 } |
| OLD | NEW |