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

Unified Diff: pkg/analyzer/test/src/dart/analysis/file_state_test.dart

Issue 2662363002: The file is a library, if it has a 'library' directive. (Closed)
Patch Set: Created 3 years, 11 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/analyzer/test/src/dart/analysis/file_state_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
index 902eb51429757b2f591fc35a5b3be86e4bfd37e1..7b0157e37a9902dcf6496562a98747318cd64b8e 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -274,6 +274,18 @@ class A2 {}
expect(file.unlinked.classes, isEmpty);
}
+ test_getFileForPath_hasLibraryDirective_hasPartOfDirective() {
+ String a = _p('/test/lib/a.dart');
+ provider.newFile(
+ a,
+ r'''
+library L;
+part of L;
+''');
+ FileState file = fileSystemState.getFileForPath(a);
+ expect(file.isPart, isFalse);
+ }
+
test_getFileForPath_library() {
String a1 = _p('/aaa/lib/a1.dart');
String a2 = _p('/aaa/lib/a2.dart');

Powered by Google App Engine
This is Rietveld 408576698