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

Unified Diff: dart/tests/lib/mirrors/mixin_test.dart

Issue 23226002: Implement ClassMirror.superinterfaces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 7 years, 4 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 | « dart/tests/lib/mirrors/mixin_members_test.dart ('k') | dart/tests/lib/mirrors/stringify.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/lib/mirrors/mixin_test.dart
diff --git a/dart/tests/lib/mirrors/mixin_test.dart b/dart/tests/lib/mirrors/mixin_test.dart
index 86ca0c8d357691968289314f909222a514334db9..eb70034bbdd7c650de715862246c6db0d1c35cce 100644
--- a/dart/tests/lib/mirrors/mixin_test.dart
+++ b/dart/tests/lib/mirrors/mixin_test.dart
@@ -65,11 +65,14 @@ testMixin() {
'Class(s(Mixin) in s(test.mixin_test), top-level)',
'Class(s(Object) in s(dart.core), top-level)',
]);
+
expect(
- '{Mixin: Method(s(Mixin) in s(Mixin), constructor),'
- ' i: Variable(s(i) in s(Mixin)),'
+ '{i: Variable(s(i) in s(Mixin)),'
' m: Method(s(m) in s(Mixin))}',
reflectClass(Mixin).members);
+
+ expect('{Mixin: Method(s(Mixin) in s(Mixin), constructor)}',
+ reflectClass(Mixin).constructors);
}
testMixin2() {
@@ -77,11 +80,14 @@ testMixin2() {
'Class(s(Mixin2) in s(test.mixin_test), top-level)',
'Class(s(Object) in s(dart.core), top-level)',
]);
+
expect(
- '{Mixin2: Method(s(Mixin2) in s(Mixin2), constructor),'
- ' i2: Variable(s(i2) in s(Mixin2)),'
+ '{i2: Variable(s(i2) in s(Mixin2)),'
' m2: Method(s(m2) in s(Mixin2))}',
reflectClass(Mixin2).members);
+
+ expect('{Mixin2: Method(s(Mixin2) in s(Mixin2), constructor)}',
+ reflectClass(Mixin2).constructors);
}
testMixinApplication() {
@@ -94,12 +100,14 @@ testMixinApplication() {
]);
expect(
- '{MixinApplication: Method(s(MixinApplication) in s(MixinApplication),'
- ' constructor),'
- ' i: Variable(s(i) in s(MixinApplication)),'
+ '{i: Variable(s(i) in s(MixinApplication)),'
' m: Method(s(m) in s(MixinApplication))}',
reflectClass(MixinApplication).members);
+ expect('{MixinApplication: Method(s(MixinApplication) in s(MixinApplication),'
+ ' constructor)}',
+ reflectClass(MixinApplication).constructors);
+
expectSame(reflectClass(C), reflectClass(MixinApplication).superclass);
}
@@ -114,19 +122,26 @@ testMixinApplicationA() {
]);
expect(
- '{MixinApplicationA: Method(s(MixinApplicationA) in s(MixinApplicationA),'
- ' constructor),'
- ' i2: Variable(s(i2) in s(MixinApplicationA)),'
+ // TODO(ahe): The owner should be the mixin.
+ '{i2: Variable(s(i2) in s(MixinApplicationA)),'
' m2: Method(s(m2) in s(MixinApplicationA))}',
reflectClass(MixinApplicationA).members);
expect(
- // TODO(ahe): The owner should probably be the mixin application.
- '{Mixin: Method(s(Mixin) in s(Mixin), constructor),'
- ' i: Variable(s(i) in s(Mixin)),'
+ '{MixinApplicationA: Method(s(MixinApplicationA) in s(MixinApplicationA),'
+ ' constructor)}',
+ reflectClass(MixinApplicationA).constructors);
+
+ expect(
+ '{i: Variable(s(i) in s(Mixin)),'
' m: Method(s(m) in s(Mixin))}',
reflectClass(MixinApplicationA).superclass.members);
+ expect(
+ // TODO(ahe): The owner should be the mixin application.
+ '{Mixin: Method(s(Mixin) in s(Mixin), constructor)}',
+ reflectClass(MixinApplicationA).superclass.constructors);
+
expectSame(
reflectClass(C),
reflectClass(MixinApplicationA).superclass.superclass);
@@ -142,12 +157,15 @@ testUnusedMixinApplication() {
]);
expect(
- '{UnusedMixinApplication: Method(s(UnusedMixinApplication)'
- ' in s(UnusedMixinApplication), constructor),'
- ' i: Variable(s(i) in s(UnusedMixinApplication)),'
+ '{i: Variable(s(i) in s(UnusedMixinApplication)),'
' m: Method(s(m) in s(UnusedMixinApplication))}',
reflectClass(UnusedMixinApplication).members);
+ expect(
+ '{UnusedMixinApplication: Method(s(UnusedMixinApplication)'
+ ' in s(UnusedMixinApplication), constructor)}',
+ reflectClass(UnusedMixinApplication).constructors);
+
expectSame(reflectClass(C), reflectClass(UnusedMixinApplication).superclass);
}
@@ -162,17 +180,23 @@ testSubclass() {
]);
expect(
- '{Subclass: Method(s(Subclass) in s(Subclass), constructor),'
- ' f: Method(s(f) in s(Subclass))}',
+ '{f: Method(s(f) in s(Subclass))}',
reflectClass(Subclass).members);
expect(
- // TODO(ahe): The owner should probably be the mixin application.
- '{Mixin: Method(s(Mixin) in s(Mixin), constructor),'
- ' i: Variable(s(i) in s(Mixin)),'
+ '{Subclass: Method(s(Subclass) in s(Subclass), constructor)}',
+ reflectClass(Subclass).constructors);
+
+ expect(
+ '{i: Variable(s(i) in s(Mixin)),'
' m: Method(s(m) in s(Mixin))}',
reflectClass(Subclass).superclass.members);
+ expect(
+ // TODO(ahe): The owner should be the mixin application.
+ '{Mixin: Method(s(Mixin) in s(Mixin), constructor)}',
+ reflectClass(Subclass).superclass.constructors);
+
expectSame(
reflectClass(C),
reflectClass(Subclass).superclass.superclass);
@@ -189,10 +213,13 @@ testSubclass2() {
]);
expect(
- '{Subclass2: Method(s(Subclass2) in s(Subclass2), constructor),'
- ' g: Method(s(g) in s(Subclass2))}',
+ '{g: Method(s(g) in s(Subclass2))}',
reflectClass(Subclass2).members);
+ expect(
+ '{Subclass2: Method(s(Subclass2) in s(Subclass2), constructor)}',
+ reflectClass(Subclass2).constructors);
+
expectSame(
reflectClass(MixinApplication),
reflectClass(Subclass2).superclass);
@@ -211,24 +238,33 @@ testSubclassA() {
]);
expect(
- '{SubclassA: Method(s(SubclassA) in s(SubclassA), constructor),'
- ' fa: Method(s(fa) in s(SubclassA))}',
+ '{fa: Method(s(fa) in s(SubclassA))}',
reflectClass(SubclassA).members);
expect(
- // TODO(ahe): The owner should probably be the mixin application.
- '{Mixin2: Method(s(Mixin2) in s(Mixin2), constructor),'
- ' i2: Variable(s(i2) in s(Mixin2)),'
+ '{SubclassA: Method(s(SubclassA) in s(SubclassA), constructor)}',
+ reflectClass(SubclassA).constructors);
+
+ expect(
+ '{i2: Variable(s(i2) in s(Mixin2)),'
' m2: Method(s(m2) in s(Mixin2))}',
reflectClass(SubclassA).superclass.members);
expect(
- // TODO(ahe): The owner should probably be the mixin application.
- '{Mixin: Method(s(Mixin) in s(Mixin), constructor),'
- ' i: Variable(s(i) in s(Mixin)),'
+ // TODO(ahe): The owner should be the mixin application.
+ '{Mixin2: Method(s(Mixin2) in s(Mixin2), constructor)}',
+ reflectClass(SubclassA).superclass.constructors);
+
+ expect(
+ '{i: Variable(s(i) in s(Mixin)),'
' m: Method(s(m) in s(Mixin))}',
reflectClass(SubclassA).superclass.superclass.members);
+ expect(
+ // TODO(ahe): The owner should be the mixin application.
+ '{Mixin: Method(s(Mixin) in s(Mixin), constructor)}',
+ reflectClass(SubclassA).superclass.superclass.constructors);
+
expectSame(
reflectClass(C),
reflectClass(SubclassA).superclass.superclass.superclass);
@@ -246,10 +282,13 @@ testSubclass2A() {
]);
expect(
- '{Subclass2A: Method(s(Subclass2A) in s(Subclass2A), constructor),'
- ' ga: Method(s(ga) in s(Subclass2A))}',
+ '{ga: Method(s(ga) in s(Subclass2A))}',
reflectClass(Subclass2A).members);
+ expect(
+ '{Subclass2A: Method(s(Subclass2A) in s(Subclass2A), constructor)}',
+ reflectClass(Subclass2A).constructors);
+
expectSame(reflectClass(MixinApplicationA),
reflectClass(Subclass2A).superclass);
}
« no previous file with comments | « dart/tests/lib/mirrors/mixin_members_test.dart ('k') | dart/tests/lib/mirrors/stringify.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698