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

Unified Diff: pkg/analysis_server/test/analysis/notification_overrides_test.dart

Issue 1037193002: Fix for computing overridden/implemented members from interfaces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_overrides.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis/notification_overrides_test.dart
diff --git a/pkg/analysis_server/test/analysis/notification_overrides_test.dart b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
index 7875504b8c56d8e67ea02abcb6b128496e21c852..17a1e49732c93b74f27173856191b524c141cadb 100644
--- a/pkg/analysis_server/test/analysis/notification_overrides_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
@@ -138,6 +138,40 @@ class B implements A {
});
}
+ test_definedInInterface_ofInterface() {
+ addTestFile('''
+class A {
+ m() {} // in A
+}
+class B implements A {}
+class C implements B {
+ m() {} // in C
+}
+''');
+ return prepareOverrides().then((_) {
+ assertHasOverride('m() {} // in C');
+ assertNoSuperMember();
+ assertHasInterfaceMember('m() {} // in A');
+ });
+ }
+
+ test_definedInInterface_ofSuper() {
+ addTestFile('''
+class A {
+ m() {} // in A
+}
+class B implements A {}
+class C extends B {
+ m() {} // in C
+}
+''');
+ return prepareOverrides().then((_) {
+ assertHasOverride('m() {} // in C');
+ assertNoSuperMember();
+ assertHasInterfaceMember('m() {} // in A');
+ });
+ }
+
test_interface_method_direct_multiple() {
addTestFile('''
class IA {
@@ -323,6 +357,20 @@ class C extends B {
});
}
+ test_super_method_superTypeCycle() {
+ addTestFile('''
+class A extends B {
+ m() {} // in A
+}
+class B extends A {
+ m() {} // in B
+}
+''');
+ return prepareOverrides().then((_) {
+ // must finish
+ });
+ }
+
test_super_setterBySetter() {
addTestFile('''
class A {
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_overrides.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698