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

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: Status fixes Created 3 years, 9 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 d20b9b29d9eed60b65154c94bd8cc7365352933c..f043d2a904798735b5e257e17216b68d21d65de8 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -870,8 +870,37 @@ part of my_lib;
part of my_lib;
'''
});
- _assertErrorsWithCodes(
- [ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART]);
+ if (context.analysisOptions.enableUriInPartOf) {
+ // TODO(28522)
+ // Should report that names are wrong.
+ } else {
+ _assertErrorsWithCodes(
+ [ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART]);
+ AnalysisError error = errorListener.errors[0];
+ }
+ }
+
+ test_perform_error_missingLibraryDirectiveWithPart_noCommon() {
+ _performBuildTask({
+ '/lib.dart': '''
+part 'partA.dart';
+part 'partB.dart';
+''',
+ '/partA.dart': '''
+part of libA;
+ ''',
+ '/partB.dart': '''
+part of libB;
+'''
+ });
+ if (context.analysisOptions.enableUriInPartOf) {
+ // TODO(28522)
+ // Should report that names are wrong.
+ } else {
+ _assertErrorsWithCodes(
+ [ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART]);
+ AnalysisError error = errorListener.errors[0];
+ }
}
test_perform_error_partDoesNotExist() {
« no previous file with comments | « pkg/analyzer/test/src/dart/analysis/driver_test.dart ('k') | pkg/compiler/lib/src/diagnostics/messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698