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

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

Issue 1647613002: Add tests, including test for issue (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/declaration_resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/all_the_rest_test.dart
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index 2d8389d277b1da7e5cde51e4ea3a767f3a6cb9fd..34b9797ff283e832583aba29da385843eae82442 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -2487,7 +2487,25 @@ class DirectoryBasedSourceContainerTest {
}
@reflectiveTest
-class ElementBuilderTest extends EngineTestCase {
+class ElementBuilderTest extends ParserTestCase {
+ void fail_visitMethodDeclaration_setter_duplicate() {
+ // https://github.com/dart-lang/sdk/issues/25601
+ String code = r'''
+class C {
+ set zzz(x) {}
+ set zzz(y) {}
+}
+''';
+ CompilationUnit unit = ParserTestCase.parseCompilationUnit(code);
+ ElementHolder holder = new ElementHolder();
+ ElementBuilder builder = new ElementBuilder(holder);
+ unit.accept(builder);
+ ClassElement classElement = holder.types[0];
+ for (PropertyAccessorElement accessor in classElement.accessors) {
+ expect(accessor.variable.setter, same(accessor));
+ }
+ }
+
void test_visitCatchClause() {
// } catch (e, s) {
ElementHolder holder = new ElementHolder();
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/declaration_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698