Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: pkg/analyzer/test/src/dart/sdk/sdk_test.dart

Issue 2967503002: Fix the resolution of uri-based part-of directives in the SDK (issue 29598) (Closed)
Patch Set: moved test Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/test/src/context/source_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.sdk_test; 5 library analyzer.test.generated.sdk_test;
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator; 9 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
10 import 'package:analyzer/src/dart/sdk/sdk.dart'; 10 import 'package:analyzer/src/dart/sdk/sdk.dart';
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 expect(executable.exists, isTrue); 243 expect(executable.exists, isTrue);
244 } 244 }
245 245
246 void test_getSdkVersion() { 246 void test_getSdkVersion() {
247 FolderBasedDartSdk sdk = _createDartSdk(); 247 FolderBasedDartSdk sdk = _createDartSdk();
248 String version = sdk.sdkVersion; 248 String version = sdk.sdkVersion;
249 expect(version, isNotNull); 249 expect(version, isNotNull);
250 expect(version.length > 0, isTrue); 250 expect(version.length > 0, isTrue);
251 } 251 }
252 252
253 /**
254 * The "part" format should result in the same source as the non-part format
255 * when the file is the library file.
256 */
257 void test_mapDartUri_partFormatForLibrary() {
258 FolderBasedDartSdk sdk = _createDartSdk();
259 Source normalSource = sdk.mapDartUri('dart:core');
260 Source partSource = sdk.mapDartUri('dart:core/core.dart');
261 expect(partSource, normalSource);
262 }
263
253 void test_useSummary_afterContextCreation() { 264 void test_useSummary_afterContextCreation() {
254 FolderBasedDartSdk sdk = _createDartSdk(); 265 FolderBasedDartSdk sdk = _createDartSdk();
255 sdk.context; 266 sdk.context;
256 expect(() { 267 expect(() {
257 sdk.useSummary = true; 268 sdk.useSummary = true;
258 }, throwsStateError); 269 }, throwsStateError);
259 } 270 }
260 271
261 void test_useSummary_beforeContextCreation() { 272 void test_useSummary_beforeContextCreation() {
262 FolderBasedDartSdk sdk = _createDartSdk(); 273 FolderBasedDartSdk sdk = _createDartSdk();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 expect(second, isNotNull); 470 expect(second, isNotNull);
460 expect(second.category, "Server"); 471 expect(second.category, "Server");
461 expect(second.path, "second/second.dart"); 472 expect(second.path, "second/second.dart");
462 expect(second.shortName, "dart:second"); 473 expect(second.shortName, "dart:second");
463 expect(second.isDart2JsLibrary, false); 474 expect(second.isDart2JsLibrary, false);
464 expect(second.isDocumented, false); 475 expect(second.isDocumented, false);
465 expect(second.isImplementation, true); 476 expect(second.isImplementation, true);
466 expect(second.isVmLibrary, false); 477 expect(second.isVmLibrary, false);
467 } 478 }
468 } 479 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/context/source_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698