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

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

Issue 8786002: Check that interface constructors and default class constructors are compatible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Check that types of constructors parameters are identical Created 9 years 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: 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 f380d99d0935d602b5e2ad71644afa8022db3993..393ef28afb261be2f1e026d431033e162a61c06c 100644
--- a/compiler/javatests/com/google/dart/compiler/SystemLibraryManagerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/SystemLibraryManagerTest.java
@@ -1,7 +1,6 @@
// Copyright (c) 2011, 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;
@@ -12,63 +11,57 @@ public class SystemLibraryManagerTest extends TestCase {
SystemLibraryManager systemLibraryManager = new SystemLibraryManager();
public void testExpand1() throws Exception {
- URI shortUri = new URI("dart:core.lib");
+ URI shortUri = new URI("dart:core");
URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
assertNotNull(fullUri);
assertEquals("dart", fullUri.getScheme());
assertEquals("core", fullUri.getHost());
- assertTrue(fullUri.getPath().endsWith("/corelib.lib"));
+ assertTrue(fullUri.getPath().endsWith("/corelib.dart"));
}
zundel 2011/12/05 21:26:45 are these your changes or did they creep in from a
scheglov 2011/12/06 14:20:39 These are my changes. I found that there are many
public void testExpand2() throws Exception {
- URI shortUri = new URI("dart:coreimpl.lib");
+ URI shortUri = new URI("dart:coreimpl");
URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
assertNotNull(fullUri);
assertEquals("dart", fullUri.getScheme());
assertEquals("core", fullUri.getHost());
- assertTrue(fullUri.getPath().endsWith("/corelib_impl.lib"));
+ assertTrue(fullUri.getPath().endsWith("/corelib_impl.dart"));
}
public void testExpand3() throws Exception {
- URI shortUri = new URI("dart:coreimpl.lib");
+ URI shortUri = new URI("dart:coreimpl");
URI fullUri1 = systemLibraryManager.expandRelativeDartUri(shortUri);
URI fullUri2 = systemLibraryManager.expandRelativeDartUri(fullUri1);
assertNotNull(fullUri2);
assertEquals("dart", fullUri2.getScheme());
assertEquals("core", fullUri2.getHost());
- assertTrue(fullUri2.getPath().endsWith("/corelib_impl.lib"));
+ assertTrue(fullUri2.getPath().endsWith("/corelib_impl.dart"));
}
public void testExpand4() throws Exception {
- URI shortUri = new URI("dart:doesnotexist.lib");
- try {
- URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
- fail("Expected expansion of " + shortUri + " to fail, but returned " + fullUri);
- } catch (RuntimeException e) {
- String message = e.getMessage();
- assertTrue(message.startsWith("No system library"));
- assertTrue(message.contains(shortUri.toString()));
- }
+ URI shortUri = new URI("dart:doesnotexist");
+ URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
+ assertNull(fullUri);
}
public void testTranslate1() throws Exception {
- URI shortUri = new URI("dart:core.lib");
+ URI shortUri = new URI("dart:core");
URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
URI translatedURI = systemLibraryManager.translateDartUri(fullUri);
assertNotNull(translatedURI);
String scheme = translatedURI.getScheme();
assertTrue(scheme.equals("file") || scheme.equals("jar"));
- assertTrue(translatedURI.getPath().endsWith("/corelib.lib"));
+ assertTrue(translatedURI.getPath().endsWith("/corelib.dart"));
}
public void testTranslate2() throws Exception {
- URI shortUri = new URI("dart:coreimpl.lib");
+ URI shortUri = new URI("dart:coreimpl");
URI fullUri = systemLibraryManager.expandRelativeDartUri(shortUri);
URI translatedURI = systemLibraryManager.translateDartUri(fullUri);
assertNotNull(translatedURI);
String scheme = translatedURI.getScheme();
assertTrue(scheme.equals("file") || scheme.equals("jar"));
- assertTrue(translatedURI.getPath().endsWith("/corelib_impl.lib"));
+ assertTrue(translatedURI.getPath().endsWith("/corelib_impl.dart"));
}
public void testTranslate3() throws Exception {

Powered by Google App Engine
This is Rietveld 408576698