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

Unified Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 2401463004: Issue 27515. Report DUPLICATE_PAR when the same library contains two part directives with the same … (Closed)
Patch Set: Created 4 years, 2 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/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 2e25165ce18875c21673a8b3691f1c73eb227848..927be4948078071571d1e0ff05c55e39e8d0d2f1 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -1959,6 +1959,18 @@ main() {
verify([source]);
}
+ void test_duplicatePart() {
+ addNamedSource('/part.dart', 'part of lib;');
+ Source source = addSource(r'''
+library lib;
+part 'part.dart';
+part 'part.dart';
+''');
+ computeLibrarySourceErrors(source);
+ assertErrors(source, [CompileTimeErrorCode.DUPLICATE_PART]);
+ verify([source]);
+ }
+
void test_exportInternalLibrary() {
Source source = addSource("export 'dart:_interceptors';");
computeLibrarySourceErrors(source);

Powered by Google App Engine
This is Rietveld 408576698