| Index: compiler/javatests/com/google/dart/compiler/SystemLibraryManagerTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/SystemLibraryManagerTest.java b/compiler/javatests/com/google/dart/compiler/SystemLibraryManagerTest.java
|
| index 10f4d6c8061e50c075476a18e885221ce79512bd..9e76c3ef61facbe39e031b0f2e9424ba018b0f63 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/SystemLibraryManagerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/SystemLibraryManagerTest.java
|
| @@ -16,7 +16,10 @@ public class SystemLibraryManagerTest extends TestCase {
|
| assertNotNull(fullUri);
|
| assertEquals("dart", fullUri.getScheme());
|
| assertEquals("core", fullUri.getHost());
|
| - assertTrue(getPath(fullUri).endsWith("/corelib.dart"));
|
| + String path = getPath(fullUri);
|
| + assertTrue(path.endsWith(".dart"));
|
| + assertTrue(path.contains(SystemLibraryManager.DEFAULT_SDK_PATH));
|
| + assertTrue(path.contains("core"));
|
| }
|
|
|
| public void testExpand2() throws Exception {
|
| @@ -24,8 +27,11 @@ public class SystemLibraryManagerTest extends TestCase {
|
| URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
|
| assertNotNull(fullUri);
|
| assertEquals("dart", fullUri.getScheme());
|
| - assertEquals("core", fullUri.getHost());
|
| - assertTrue(getPath(fullUri).endsWith("/corelib_impl.dart"));
|
| + assertEquals("coreimpl", fullUri.getHost());
|
| + String path = getPath(fullUri);
|
| + assertTrue(path.endsWith(".dart"));
|
| + assertTrue(path.contains(SystemLibraryManager.DEFAULT_SDK_PATH));
|
| + assertTrue(path.contains("coreimpl"));
|
| }
|
|
|
| public void testExpand3() throws Exception {
|
| @@ -34,8 +40,11 @@ public class SystemLibraryManagerTest extends TestCase {
|
| URI fullUri2 = systemLibraryManager.expandRelativeDartUri(fullUri1);
|
| assertNotNull(fullUri2);
|
| assertEquals("dart", fullUri2.getScheme());
|
| - assertEquals("core", fullUri2.getHost());
|
| - assertTrue(getPath(fullUri2).endsWith("/corelib_impl.dart"));
|
| + assertEquals("coreimpl", fullUri2.getHost());
|
| + String path = getPath(fullUri2);
|
| + assertTrue(path.endsWith(".dart"));
|
| + assertTrue(path.contains(SystemLibraryManager.DEFAULT_SDK_PATH));
|
| + assertTrue(path.contains("coreimpl"));
|
| }
|
|
|
| public void testExpand4() throws Exception {
|
| @@ -50,8 +59,11 @@ public class SystemLibraryManagerTest extends TestCase {
|
| URI translatedURI = systemLibraryManager.translateDartUri(fullUri);
|
| assertNotNull(translatedURI);
|
| String scheme = translatedURI.getScheme();
|
| - assertTrue(scheme.equals("file") || scheme.equals("jar"));
|
| - assertTrue(getPath(translatedURI).endsWith("/corelib.dart"));
|
| + assertTrue(scheme.equals("file"));
|
| + String path = getPath(translatedURI);
|
| + assertTrue(path.endsWith(".dart"));
|
| + assertTrue(path.contains(SystemLibraryManager.DEFAULT_SDK_PATH));
|
| + assertTrue(path.contains("core"));
|
| }
|
|
|
| public void testTranslate2() throws Exception {
|
| @@ -60,8 +72,11 @@ public class SystemLibraryManagerTest extends TestCase {
|
| URI translatedURI = systemLibraryManager.translateDartUri(fullUri);
|
| assertNotNull(translatedURI);
|
| String scheme = translatedURI.getScheme();
|
| - assertTrue(scheme.equals("file") || scheme.equals("jar"));
|
| - assertTrue(getPath(translatedURI).endsWith("/corelib_impl.dart"));
|
| + assertTrue(scheme.equals("file"));
|
| + String path = getPath(translatedURI);
|
| + assertTrue(path.endsWith(".dart"));
|
| + assertTrue(path.contains(SystemLibraryManager.DEFAULT_SDK_PATH));
|
| + assertTrue(path.contains("coreimpl"));
|
| }
|
|
|
| public void testTranslate3() throws Exception {
|
| @@ -79,7 +94,7 @@ public class SystemLibraryManagerTest extends TestCase {
|
| /**
|
| * For FS based {@link URI} the path is not <code>null</code>, for JAR {@link URI} the scheme
|
| * specific part is not <code>null</code>.
|
| - *
|
| + *
|
| * @return the scheme specific path.
|
| */
|
| private static String getPath(URI uri) {
|
|
|