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

Unified Diff: pkg/analysis_server/test/analysis_server_test.dart

Issue 1113063007: Fix exception in stack trace from issue 23348 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added test Created 5 years, 8 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: pkg/analysis_server/test/analysis_server_test.dart
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index 0576d89e26466a79dd4ab9513fef5841d551a0ce..d64ea388ec51c289e6baddbb0c0eb410ed63cd34 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -243,6 +243,18 @@ import "../foo/foo.dart";
expect(source.fullName, filePath);
}
+ test_getContextSourcePair_nonFile() {
+ String dirPath = '/dir';
+ Folder dir = resourceProvider.newFolder(dirPath);
+
+ AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
+ _configureSourceFactory(context);
+ server.folderMap[dir] = context;
+
+ ContextSourcePair pair = server.getContextSourcePair(dirPath);
+ expect(pair, isNull);
+ }
+
test_getContextSourcePair_package_inRoot() {
String rootPath = '/my_package';
String filePath = rootPath + '/lib/file.dart';

Powered by Google App Engine
This is Rietveld 408576698