| Index: compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java
|
| ===================================================================
|
| --- compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java (revision 11101)
|
| +++ compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java (working copy)
|
| @@ -21,12 +21,12 @@
|
| return uri.getSchemeSpecificPart();
|
| }
|
|
|
| - PackageLibraryManager systemLibraryManager = new PackageLibraryManager();
|
| + PackageLibraryManager packageLibraryManager = new PackageLibraryManager();
|
|
|
|
|
| public void testExpand1() throws Exception {
|
| URI shortUri = new URI("dart:core");
|
| - URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| + URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
|
| assertNotNull(fullUri);
|
| assertEquals("dart", fullUri.getScheme());
|
| assertEquals("core", fullUri.getHost());
|
| @@ -35,7 +35,7 @@
|
|
|
| public void testExpand2() throws Exception {
|
| URI shortUri = new URI("dart:coreimpl");
|
| - URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| + URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
|
| assertNotNull(fullUri);
|
| assertEquals("dart", fullUri.getScheme());
|
| assertEquals("coreimpl", fullUri.getHost());
|
| @@ -44,8 +44,8 @@
|
|
|
| public void testExpand3() throws Exception {
|
| URI shortUri = new URI("dart:coreimpl");
|
| - URI fullUri1 = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| - URI fullUri2 = systemLibraryManager.expandRelativeDartUri(fullUri1);
|
| + URI fullUri1 = packageLibraryManager.expandRelativeDartUri(shortUri);
|
| + URI fullUri2 = packageLibraryManager.expandRelativeDartUri(fullUri1);
|
| assertNotNull(fullUri2);
|
| assertEquals("dart", fullUri2.getScheme());
|
| assertEquals("coreimpl", fullUri2.getHost());
|
| @@ -54,14 +54,14 @@
|
|
|
| public void testExpand4() throws Exception {
|
| URI shortUri = new URI("dart:doesnotexist");
|
| - URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| + URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
|
| assertNull(fullUri);
|
| }
|
|
|
| public void testTranslate1() throws Exception {
|
| URI shortUri = new URI("dart:core");
|
| - URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| - URI translatedURI = systemLibraryManager.resolveDartUri(fullUri);
|
| + URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
|
| + URI translatedURI = packageLibraryManager.resolveDartUri(fullUri);
|
| assertNotNull(translatedURI);
|
| String scheme = translatedURI.getScheme();
|
| assertTrue(scheme.equals("file"));
|
| @@ -70,8 +70,8 @@
|
|
|
| public void testTranslate2() throws Exception {
|
| URI shortUri = new URI("dart:coreimpl");
|
| - URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| - URI translatedURI = systemLibraryManager.resolveDartUri(fullUri);
|
| + URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
|
| + URI translatedURI = packageLibraryManager.resolveDartUri(fullUri);
|
| assertNotNull(translatedURI);
|
| String scheme = translatedURI.getScheme();
|
| assertTrue(scheme.equals("file"));
|
| @@ -80,7 +80,7 @@
|
|
|
| public void testTranslate3() throws Exception {
|
| URI fullUri = new URI("dart://doesnotexist/some/file.dart");
|
| - URI translatedURI = systemLibraryManager.resolveDartUri(fullUri);
|
| + URI translatedURI = packageLibraryManager.resolveDartUri(fullUri);
|
| assertNotNull(translatedURI);
|
| String scheme = translatedURI.getScheme();
|
| assertTrue(scheme.equals("file"));
|
| @@ -89,7 +89,7 @@
|
|
|
| public void testPackageExpand1() throws Exception {
|
| URI shortUri = new URI("package:test.dart");
|
| - URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| + URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
|
| assertNotNull(fullUri);
|
| assertEquals("package", fullUri.getScheme());
|
| assertEquals("test.dart", fullUri.getHost());
|
| @@ -98,8 +98,8 @@
|
|
|
| public void testPackageExpand2() throws Exception {
|
| URI shortUri = new URI("package:test.dart");
|
| - URI fullUri1 = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| - URI fullUri2 = systemLibraryManager.expandRelativeDartUri(fullUri1);
|
| + URI fullUri1 = packageLibraryManager.expandRelativeDartUri(shortUri);
|
| + URI fullUri2 = packageLibraryManager.expandRelativeDartUri(fullUri1);
|
| assertNotNull(fullUri2);
|
| assertEquals("package", fullUri2.getScheme());
|
| assertEquals("test.dart", fullUri2.getHost());
|
| @@ -108,8 +108,8 @@
|
|
|
| public void testPackageTranslate1() throws Exception {
|
| URI shortUri = new URI("package:test.dart");
|
| - URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| - URI translatedURI = systemLibraryManager.resolveDartUri(fullUri);
|
| + URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
|
| + URI translatedURI = packageLibraryManager.resolveDartUri(fullUri);
|
| assertNotNull(translatedURI);
|
| String scheme = translatedURI.getScheme();
|
| assertTrue(scheme.equals("file"));
|
|
|