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

Unified Diff: dart/compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java

Issue 20722006: Removed compiler/ directory from repository (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: dart/compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java
diff --git a/dart/compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java b/dart/compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java
deleted file mode 100644
index f455ee5d4800347a0eb1f99258753905848574c3..0000000000000000000000000000000000000000
--- a/dart/compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-package com.google.dart.compiler;
-
-import junit.framework.TestCase;
-
-import java.net.URI;
-
-public class PackageLibraryManagerTest 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) {
- if (uri.getPath() != null && uri.getPath().length() != 0){
- return uri.getPath();
- }
- return uri.getSchemeSpecificPart();
- }
-
- PackageLibraryManager packageLibraryManager = new PackageLibraryManager();
-
-
- public void testExpand1() throws Exception {
- URI shortUri = new URI("dart:core");
- URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
- assertNotNull(fullUri);
- assertEquals("dart", fullUri.getScheme());
- assertEquals("core", fullUri.getHost());
- assertTrue(getPath(fullUri).endsWith("/core.dart"));
- }
-
- public void testExpand2() throws Exception {
- URI shortUri = new URI("dart:doesnotexist");
- URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
- assertNull(fullUri);
- }
-
- public void testTranslate1() throws Exception {
- URI shortUri = new URI("dart:core");
- URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
- URI translatedURI = packageLibraryManager.resolveDartUri(fullUri);
- assertNotNull(translatedURI);
- String scheme = translatedURI.getScheme();
- assertTrue(scheme.equals("file"));
- assertTrue(getPath(translatedURI).endsWith("/core.dart"));
- }
-
- public void testTranslate2() throws Exception {
- URI fullUri = new URI("dart://doesnotexist/some/file.dart");
- URI translatedURI = packageLibraryManager.resolveDartUri(fullUri);
- assertNotNull(translatedURI);
- String scheme = translatedURI.getScheme();
- assertTrue(scheme.equals("file"));
- assertTrue(getPath(translatedURI).endsWith("some/file.dart"));
- }
-
- public void testPackageExpand1() throws Exception {
- URI shortUri = new URI("package:test.dart");
- URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
- assertNotNull(fullUri);
- assertEquals("package", fullUri.getScheme());
- assertEquals("test.dart", fullUri.getHost());
- assertTrue(getPath(fullUri).endsWith("/test.dart"));
- }
-
- public void testPackageExpand2() throws Exception {
- URI shortUri = new URI("package:test.dart");
- URI fullUri1 = packageLibraryManager.expandRelativeDartUri(shortUri);
- URI fullUri2 = packageLibraryManager.expandRelativeDartUri(fullUri1);
- assertNotNull(fullUri2);
- assertEquals("package", fullUri2.getScheme());
- assertEquals("test.dart", fullUri2.getHost());
- assertTrue(getPath(fullUri2).endsWith("/test.dart"));
- }
-
- public void testPackageTranslate1() throws Exception {
- URI shortUri = new URI("package:test.dart");
- URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
- URI translatedURI = packageLibraryManager.resolveDartUri(fullUri);
- assertNotNull(translatedURI);
- String scheme = translatedURI.getScheme();
- assertTrue(scheme.equals("file"));
- assertTrue(getPath(translatedURI).endsWith("/test.dart"));
- }
-}

Powered by Google App Engine
This is Rietveld 408576698