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

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

Issue 10911047: Revert changes due to SDK reorganization. It's not clear to me whether we'll get (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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: compiler/javatests/com/google/dart/compiler/SystemLibrariesReaderTest.java
===================================================================
--- compiler/javatests/com/google/dart/compiler/SystemLibrariesReaderTest.java (revision 11742)
+++ compiler/javatests/com/google/dart/compiler/SystemLibrariesReaderTest.java (working copy)
@@ -18,21 +18,25 @@
*/
public class SystemLibrariesReaderTest extends TestCase {
- public void testLibrariesFileContent() throws URISyntaxException {
+
+ public void testLibrariesFileExists(){
File sdkLibPath = new File(PackageLibraryManager.DEFAULT_SDK_PATH, "lib");
+ File librariesFile = new File(new File(sdkLibPath, SystemLibrariesReader.INTERNAL_DIR), SystemLibrariesReader.LIBRARIES_FILE);
+ assertTrue(librariesFile.exists());
+ }
+
+ public void testLibrariesFileContent() throws URISyntaxException{
+ File sdkLibPath = new File(PackageLibraryManager.DEFAULT_SDK_PATH, "lib");
URI base = sdkLibPath.toURI();
SystemLibrariesReader reader = new SystemLibrariesReader(sdkLibPath);
Map<String, DartLibrary> librariesMap = reader.getLibrariesMap();
assertTrue(!librariesMap.isEmpty());
for (Entry<String, DartLibrary> entry : librariesMap.entrySet()) {
- String path = entry.getValue().getPath();
+ String path = entry.getValue().getPath();
File file = new File(base.resolve(new URI(null, null, path, null, null)).normalize());
- if (!file.exists()) {
- fail("Expected " + entry.getKey() + " path in libraries.dart to exist in SDK"
- + "\n could not find " + file);
- }
- }
-
+ assertTrue(file.exists());
+ }
+
// check content
// "coreimpl": const LibraryInfo(
// "coreimpl/coreimpl_runtime.dart",
@@ -41,16 +45,9 @@
// dart2jsPatchPath: "compiler/implementation/lib/coreimpl_patch.dart")
DartLibrary library = librariesMap.get("dart:coreimpl");
assertTrue(library != null);
- assertEquals("dart:coreimpl", library.getShortName());
+ assertEquals("dart:coreimpl",library.getShortName());
assertTrue(library.isImplementation());
assertEquals("Shared", library.getCategory());
}
-
- public void testLibrariesFileExists() {
- File sdkLibPath = new File(PackageLibraryManager.DEFAULT_SDK_PATH, "lib");
- File librariesFile = new File(new File(sdkLibPath, SystemLibrariesReader.INTERNAL_DIR),
- SystemLibrariesReader.LIBRARIES_FILE);
- assertTrue(librariesFile.exists());
- }
-
+
}
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/model/PackageLibraryManagerProviderAnyTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698