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

Unified Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 2640853005: Make Analyzer, VM and dart2js accept URI strings as part-of library identifier. (Closed)
Patch Set: Add tests, enable flag by default in analyzer. 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/task/dart_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index 75d799de04c0805851a87661ca82989ce2a352db..917c7d0661b42aa0a20655917f33d96deefad271 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -870,10 +870,14 @@ part of my_lib;
part of my_lib;
'''
});
- _assertErrorsWithCodes(
- [ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART]);
- AnalysisError error = errorListener.errors[0];
- expect(error.getProperty(ErrorProperty.PARTS_LIBRARY_NAME), 'my_lib');
+ if (context.analysisOptions.enableUriInPartOf) {
+ // Should report that names are wrong.
Lasse Reichstein Nielsen 2017/01/26 10:39:13 TODO added here.
+ } else {
+ _assertErrorsWithCodes(
+ [ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART]);
+ AnalysisError error = errorListener.errors[0];
+ expect(error.getProperty(ErrorProperty.PARTS_LIBRARY_NAME), 'my_lib');
+ }
}
test_perform_error_missingLibraryDirectiveWithPart_noCommon() {
@@ -889,10 +893,14 @@ part of libA;
part of libB;
'''
});
- _assertErrorsWithCodes(
- [ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART]);
- AnalysisError error = errorListener.errors[0];
- expect(error.getProperty(ErrorProperty.PARTS_LIBRARY_NAME), isNull);
+ if (context.analysisOptions.enableUriInPartOf) {
+ // Should report that names are wrong.
Lasse Reichstein Nielsen 2017/01/26 10:39:13 TODO added here.
+ } else {
+ _assertErrorsWithCodes(
+ [ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART]);
+ AnalysisError error = errorListener.errors[0];
+ expect(error.getProperty(ErrorProperty.PARTS_LIBRARY_NAME), isNull);
+ }
}
test_perform_error_partDoesNotExist() {

Powered by Google App Engine
This is Rietveld 408576698