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

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

Issue 23190003: ClassMirror.mixin (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase 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
« runtime/vm/parser.cc ('K') | « tests/lib/mirrors/mixin_dart2js_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/mixin_test.dart
diff --git a/tests/lib/mirrors/mixin_test.dart b/tests/lib/mirrors/mixin_test.dart
index eb70034bbdd7c650de715862246c6db0d1c35cce..4ccb457db167b7de6cd2d3926a81e15e9f69a4d8 100644
--- a/tests/lib/mirrors/mixin_test.dart
+++ b/tests/lib/mirrors/mixin_test.dart
@@ -2,9 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// TODO(ahe): This test is sligthly broken but provides temporary test coverage
-// for dart2js. See http://dartbug.com/12464.
-
library test.mixin_test;
@MirrorsUsed(targets: 'test.mixin_test, test.model, Object', override: '*')
@@ -65,14 +62,13 @@ testMixin() {
'Class(s(Mixin) in s(test.mixin_test), top-level)',
'Class(s(Object) in s(dart.core), top-level)',
]);
-
expect(
'{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);
+ expect(
+ '{Mixin: Method(s(Mixin) in s(Mixin), constructor)}',
+ reflectClass(Mixin).constructors);
}
testMixin2() {
@@ -80,14 +76,13 @@ testMixin2() {
'Class(s(Mixin2) in s(test.mixin_test), top-level)',
'Class(s(Object) in s(dart.core), top-level)',
]);
-
expect(
'{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);
+ expect(
+ '{Mixin2: Method(s(Mixin2) in s(Mixin2), constructor)}',
+ reflectClass(Mixin2).constructors);
}
testMixinApplication() {
@@ -100,13 +95,13 @@ testMixinApplication() {
]);
expect(
- '{i: Variable(s(i) in s(MixinApplication)),'
- ' m: Method(s(m) in s(MixinApplication))}',
+ '{i: Variable(s(i) in s(Mixin)),'
+ ' m: Method(s(m) in s(Mixin))}',
reflectClass(MixinApplication).members);
-
- expect('{MixinApplication: Method(s(MixinApplication) in s(MixinApplication),'
- ' constructor)}',
- reflectClass(MixinApplication).constructors);
+ expect(
+ '{MixinApplication: Method(s(MixinApplication) in s(MixinApplication),'
+ ' constructor)}',
+ reflectClass(MixinApplication).constructors);
expectSame(reflectClass(C), reflectClass(MixinApplication).superclass);
}
@@ -114,7 +109,8 @@ testMixinApplication() {
testMixinApplicationA() {
checkClass(MixinApplicationA, [
'Class(s(MixinApplicationA) in s(test.mixin_test), top-level)',
- 'Class(s(test.mixin_test.Mixin(test.model.C)), top-level)',
+ 'Class(s(test.model.C with test.mixin_test.Mixin) in s(test.mixin_test),'
+ ' top-level)',
'Class(s(C) in s(test.model), top-level)',
'Class(s(B) in s(test.model), top-level)',
'Class(s(A) in s(test.model), top-level)',
@@ -122,11 +118,9 @@ testMixinApplicationA() {
]);
expect(
- // TODO(ahe): The owner should be the mixin.
- '{i2: Variable(s(i2) in s(MixinApplicationA)),'
- ' m2: Method(s(m2) in s(MixinApplicationA))}',
+ '{i2: Variable(s(i2) in s(Mixin2)),'
+ ' m2: Method(s(m2) in s(Mixin2))}',
reflectClass(MixinApplicationA).members);
-
expect(
'{MixinApplicationA: Method(s(MixinApplicationA) in s(MixinApplicationA),'
' constructor)}',
@@ -136,10 +130,10 @@ testMixinApplicationA() {
'{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)}',
+ '{test.model.C with test.mixin_test.Mixin:'
+ ' Method(s(test.model.C with test.mixin_test.Mixin)'
+ ' in s(test.model.C with test.mixin_test.Mixin), constructor)}',
reflectClass(MixinApplicationA).superclass.constructors);
expectSame(
@@ -157,10 +151,9 @@ testUnusedMixinApplication() {
]);
expect(
- '{i: Variable(s(i) in s(UnusedMixinApplication)),'
- ' m: Method(s(m) in s(UnusedMixinApplication))}',
+ '{i: Variable(s(i) in s(Mixin)),'
+ ' m: Method(s(m) in s(Mixin))}',
reflectClass(UnusedMixinApplication).members);
-
expect(
'{UnusedMixinApplication: Method(s(UnusedMixinApplication)'
' in s(UnusedMixinApplication), constructor)}',
@@ -172,7 +165,8 @@ testUnusedMixinApplication() {
testSubclass() {
checkClass(Subclass, [
'Class(s(Subclass) in s(test.mixin_test), top-level)',
- 'Class(s(test.mixin_test.Mixin(test.model.C)), top-level)',
+ 'Class(s(test.model.C with test.mixin_test.Mixin) in s(test.mixin_test),'
+ ' top-level)',
'Class(s(C) in s(test.model), top-level)',
'Class(s(B) in s(test.model), top-level)',
'Class(s(A) in s(test.model), top-level)',
@@ -182,7 +176,6 @@ testSubclass() {
expect(
'{f: Method(s(f) in s(Subclass))}',
reflectClass(Subclass).members);
-
expect(
'{Subclass: Method(s(Subclass) in s(Subclass), constructor)}',
reflectClass(Subclass).constructors);
@@ -191,10 +184,10 @@ testSubclass() {
'{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)}',
+ '{test.model.C with test.mixin_test.Mixin:'
+ ' Method(s(test.model.C with test.mixin_test.Mixin)'
+ ' in s(test.model.C with test.mixin_test.Mixin), constructor)}',
reflectClass(Subclass).superclass.constructors);
expectSame(
@@ -215,7 +208,6 @@ testSubclass2() {
expect(
'{g: Method(s(g) in s(Subclass2))}',
reflectClass(Subclass2).members);
-
expect(
'{Subclass2: Method(s(Subclass2) in s(Subclass2), constructor)}',
reflectClass(Subclass2).constructors);
@@ -228,9 +220,10 @@ testSubclass2() {
testSubclassA() {
checkClass(SubclassA, [
'Class(s(SubclassA) in s(test.mixin_test), top-level)',
- 'Class(s(test.mixin_test.Mixin2(test.mixin_test.Mixin(test.model.C))),'
+ 'Class(s(test.model.C with test.mixin_test.Mixin, test.mixin_test.Mixin2)'
+ ' in s(test.mixin_test), top-level)',
+ 'Class(s(test.model.C with test.mixin_test.Mixin) in s(test.mixin_test),'
' top-level)',
- 'Class(s(test.mixin_test.Mixin(test.model.C)), top-level)',
'Class(s(C) in s(test.model), top-level)',
'Class(s(B) in s(test.model), top-level)',
'Class(s(A) in s(test.model), top-level)',
@@ -240,7 +233,6 @@ testSubclassA() {
expect(
'{fa: Method(s(fa) in s(SubclassA))}',
reflectClass(SubclassA).members);
-
expect(
'{SubclassA: Method(s(SubclassA) in s(SubclassA), constructor)}',
reflectClass(SubclassA).constructors);
@@ -249,20 +241,21 @@ testSubclassA() {
'{i2: Variable(s(i2) in s(Mixin2)),'
' m2: Method(s(m2) in s(Mixin2))}',
reflectClass(SubclassA).superclass.members);
-
expect(
- // TODO(ahe): The owner should be the mixin application.
- '{Mixin2: Method(s(Mixin2) in s(Mixin2), constructor)}',
+ '{test.model.C with test.mixin_test.Mixin, test.mixin_test.Mixin2:'
+ ' Method(s(test.model.C with test.mixin_test.Mixin,'
+ ' test.mixin_test.Mixin2) in s(test.model.C with test.mixin_test.Mixin,'
+ ' test.mixin_test.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)}',
+ '{test.model.C with test.mixin_test.Mixin:'
+ ' Method(s(test.model.C with test.mixin_test.Mixin)'
+ ' in s(test.model.C with test.mixin_test.Mixin), constructor)}',
reflectClass(SubclassA).superclass.superclass.constructors);
expectSame(
@@ -274,7 +267,8 @@ testSubclass2A() {
checkClass(Subclass2A, [
'Class(s(Subclass2A) in s(test.mixin_test), top-level)',
'Class(s(MixinApplicationA) in s(test.mixin_test), top-level)',
- 'Class(s(test.mixin_test.Mixin(test.model.C)), top-level)',
+ 'Class(s(test.model.C with test.mixin_test.Mixin) in s(test.mixin_test),'
+ ' top-level)',
'Class(s(C) in s(test.model), top-level)',
'Class(s(B) in s(test.model), top-level)',
'Class(s(A) in s(test.model), top-level)',
@@ -284,7 +278,6 @@ testSubclass2A() {
expect(
'{ga: Method(s(ga) in s(Subclass2A))}',
reflectClass(Subclass2A).members);
-
expect(
'{Subclass2A: Method(s(Subclass2A) in s(Subclass2A), constructor)}',
reflectClass(Subclass2A).constructors);
« runtime/vm/parser.cc ('K') | « tests/lib/mirrors/mixin_dart2js_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698