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

Unified Diff: dart/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java

Issue 411603002: Version 1.5.8 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.5/
Patch Set: Created 6 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/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java (revision 38461)
+++ dart/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java (working copy)
@@ -1420,6 +1420,25 @@
assertEquals(factory, context.getSourceFactory());
}
+ public void test_unreadableSource() throws Exception {
+ context = AnalysisContextFactory.contextWithCore();
+ sourceFactory = context.getSourceFactory();
+ Source test1 = addSource("/test1.dart", createSource(//
+ "import 'test2.dart';",
+ "library test1;"));
+ Source test2 = addSource("/test2.dart", createSource(//
+ "import 'test1.dart';",
+ "import 'test3.dart';",
+ "library test2;"));
+ Source test3 = addSourceWithException("/test3.dart");
+ analyzeAll_assertFinished();
+ // test1 and test2 should have been successfully analyzed despite the fact that
+ // test3 couldn't be read.
+ assertNotNull(context.computeLibraryElement(test1));
+ assertNotNull(context.computeLibraryElement(test2));
+ assertNull(context.computeLibraryElement(test3));
+ }
+
public void test_updateAnalysis() {
assertTrue(context.getSourcesNeedingProcessing().isEmpty());
Source source = new FileBasedSource(createFile("/test.dart"));

Powered by Google App Engine
This is Rietveld 408576698