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

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

Issue 1477553002: Issue 25034. Record only the target source's errors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 851a4ee69047ad753d280cbedd668fa751bf81b3..154d448b4c6d2a5a10ab104577d9a32dc5f21e30 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -1635,9 +1635,28 @@ part of lib;
class A {}''');
computeLibrarySourceErrors(librarySource);
assertErrors(sourceB, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+ assertNoErrors(librarySource);
verify([librarySource, sourceA, sourceB]);
}
+ void test_duplicateDefinition_inPart() {
+ Source librarySource = addNamedSource(
+ "/lib.dart",
+ r'''
+library test;
+part 'a.dart';
+class A {}''');
+ Source sourceA = addNamedSource(
+ "/a.dart",
+ r'''
+part of test;
+class A {}''');
+ computeLibrarySourceErrors(librarySource);
+ assertErrors(sourceA, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+ assertNoErrors(librarySource);
+ verify([librarySource, sourceA]);
+ }
+
void test_duplicateDefinition_catch() {
Source source = addSource(r'''
main() {
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698