| Index: tests/lib/mirrors/mixin_application_test.dart
|
| diff --git a/tests/lib/mirrors/mixin_application_test.dart b/tests/lib/mirrors/mixin_application_test.dart
|
| index 68dea6d2a01e925872eff48d8000a4f3e704f366..203defde5860d464f3c544e6b3cc94deb89a243a 100644
|
| --- a/tests/lib/mirrors/mixin_application_test.dart
|
| +++ b/tests/lib/mirrors/mixin_application_test.dart
|
| @@ -45,17 +45,17 @@ class Subclass2A extends MixinApplicationA {
|
|
|
| membersOf(ClassMirror cm) {
|
| var result = new Map();
|
| - cm.declarations.forEach((k,v) {
|
| - if(v is MethodMirror && !v.isConstructor) result[k] = v;
|
| - if(v is VariableMirror) result[k] = v;
|
| + cm.declarations.forEach((k, v) {
|
| + if (v is MethodMirror && !v.isConstructor) result[k] = v;
|
| + if (v is VariableMirror) result[k] = v;
|
| });
|
| return result;
|
| }
|
|
|
| constructorsOf(ClassMirror cm) {
|
| var result = new Map();
|
| - cm.declarations.forEach((k,v) {
|
| - if(v is MethodMirror && v.isConstructor) result[k] = v;
|
| + cm.declarations.forEach((k, v) {
|
| + if (v is MethodMirror && v.isConstructor) result[k] = v;
|
| });
|
| return result;
|
| }
|
| @@ -76,8 +76,8 @@ expectSame(ClassMirror a, ClassMirror b) {
|
|
|
| testMixin() {
|
| checkClass(Mixin, [
|
| - 'Class(s(Mixin) in s(test.mixin_application_test), top-level)',
|
| - 'Class(s(Object) in s(dart.core), top-level)',
|
| + 'Class(s(Mixin) in s(test.mixin_application_test), top-level)',
|
| + 'Class(s(Object) in s(dart.core), top-level)',
|
| ]);
|
|
|
| expect(
|
| @@ -86,13 +86,13 @@ testMixin() {
|
| membersOf(reflectClass(Mixin)));
|
|
|
| expect('{Mixin: Method(s(Mixin) in s(Mixin), constructor)}',
|
| - constructorsOf(reflectClass(Mixin)));
|
| + constructorsOf(reflectClass(Mixin)));
|
| }
|
|
|
| testMixin2() {
|
| checkClass(Mixin2, [
|
| - 'Class(s(Mixin2) in s(test.mixin_application_test), top-level)',
|
| - 'Class(s(Object) in s(dart.core), top-level)',
|
| + 'Class(s(Mixin2) in s(test.mixin_application_test), top-level)',
|
| + 'Class(s(Object) in s(dart.core), top-level)',
|
| ]);
|
|
|
| expect(
|
| @@ -101,16 +101,16 @@ testMixin2() {
|
| membersOf(reflectClass(Mixin2)));
|
|
|
| expect('{Mixin2: Method(s(Mixin2) in s(Mixin2), constructor)}',
|
| - constructorsOf(reflectClass(Mixin2)));
|
| + constructorsOf(reflectClass(Mixin2)));
|
| }
|
|
|
| testMixinApplication() {
|
| checkClass(MixinApplication, [
|
| - 'Class(s(MixinApplication) in s(test.mixin_application_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)',
|
| - 'Class(s(Object) in s(dart.core), top-level)',
|
| + 'Class(s(MixinApplication) in s(test.mixin_application_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)',
|
| + 'Class(s(Object) in s(dart.core), top-level)',
|
| ]);
|
|
|
| String owner = 'Mixin';
|
| @@ -119,9 +119,10 @@ testMixinApplication() {
|
| ' m: Method(s(m) in s($owner))}',
|
| membersOf(reflectClass(MixinApplication)));
|
|
|
| - expect('{MixinApplication: Method(s(MixinApplication) in s(MixinApplication),'
|
| - ' constructor)}',
|
| - constructorsOf(reflectClass(MixinApplication)));
|
| + expect(
|
| + '{MixinApplication: Method(s(MixinApplication) in s(MixinApplication),'
|
| + ' constructor)}',
|
| + constructorsOf(reflectClass(MixinApplication)));
|
|
|
| expectSame(reflectClass(C), reflectClass(MixinApplication).superclass);
|
| }
|
| @@ -129,14 +130,14 @@ testMixinApplication() {
|
| testMixinApplicationA() {
|
| String owner = ' in s(test.mixin_application_test)';
|
| checkClass(MixinApplicationA, [
|
| - 'Class(s(MixinApplicationA)'
|
| - ' in s(test.mixin_application_test), top-level)',
|
| - 'Class(s(test.model.C with test.mixin_application_test.Mixin)'
|
| - '$owner, 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)',
|
| - 'Class(s(Object) in s(dart.core), top-level)',
|
| + 'Class(s(MixinApplicationA)'
|
| + ' in s(test.mixin_application_test), top-level)',
|
| + 'Class(s(test.model.C with test.mixin_application_test.Mixin)'
|
| + '$owner, 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)',
|
| + 'Class(s(Object) in s(dart.core), top-level)',
|
| ]);
|
|
|
| owner = 'Mixin2';
|
| @@ -163,18 +164,17 @@ testMixinApplicationA() {
|
| constructorsOf(reflectClass(MixinApplicationA).superclass));
|
|
|
| expectSame(
|
| - reflectClass(C),
|
| - reflectClass(MixinApplicationA).superclass.superclass);
|
| + reflectClass(C), reflectClass(MixinApplicationA).superclass.superclass);
|
| }
|
|
|
| testUnusedMixinApplication() {
|
| checkClass(UnusedMixinApplication, [
|
| - 'Class(s(UnusedMixinApplication) in s(test.mixin_application_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)',
|
| - 'Class(s(Object) in s(dart.core), top-level)',
|
| + 'Class(s(UnusedMixinApplication) in s(test.mixin_application_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)',
|
| + 'Class(s(Object) in s(dart.core), top-level)',
|
| ]);
|
|
|
| String owner = 'Mixin';
|
| @@ -194,21 +194,18 @@ testUnusedMixinApplication() {
|
| testSubclass() {
|
| String owner = ' in s(test.mixin_application_test)';
|
| checkClass(Subclass, [
|
| - 'Class(s(Subclass) in s(test.mixin_application_test), top-level)',
|
| - 'Class(s(test.model.C with test.mixin_application_test.Mixin)'
|
| - '$owner, 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)',
|
| - 'Class(s(Object) in s(dart.core), top-level)',
|
| + 'Class(s(Subclass) in s(test.mixin_application_test), top-level)',
|
| + 'Class(s(test.model.C with test.mixin_application_test.Mixin)'
|
| + '$owner, 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)',
|
| + 'Class(s(Object) in s(dart.core), top-level)',
|
| ]);
|
|
|
| - expect(
|
| - '{f: Method(s(f) in s(Subclass))}',
|
| - membersOf(reflectClass(Subclass)));
|
| + expect('{f: Method(s(f) in s(Subclass))}', membersOf(reflectClass(Subclass)));
|
|
|
| - expect(
|
| - '{Subclass: Method(s(Subclass) in s(Subclass), constructor)}',
|
| + expect('{Subclass: Method(s(Subclass) in s(Subclass), constructor)}',
|
| constructorsOf(reflectClass(Subclass)));
|
|
|
| expect(
|
| @@ -223,54 +220,47 @@ testSubclass() {
|
| ' in s($name), constructor)}',
|
| constructorsOf(reflectClass(Subclass).superclass));
|
|
|
| - expectSame(
|
| - reflectClass(C),
|
| - reflectClass(Subclass).superclass.superclass);
|
| + expectSame(reflectClass(C), reflectClass(Subclass).superclass.superclass);
|
| }
|
|
|
| testSubclass2() {
|
| checkClass(Subclass2, [
|
| - 'Class(s(Subclass2) in s(test.mixin_application_test), top-level)',
|
| - 'Class(s(MixinApplication) in s(test.mixin_application_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)',
|
| - 'Class(s(Object) in s(dart.core), top-level)',
|
| + 'Class(s(Subclass2) in s(test.mixin_application_test), top-level)',
|
| + 'Class(s(MixinApplication) in s(test.mixin_application_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)',
|
| + 'Class(s(Object) in s(dart.core), top-level)',
|
| ]);
|
|
|
| expect(
|
| - '{g: Method(s(g) in s(Subclass2))}',
|
| - membersOf(reflectClass(Subclass2)));
|
| + '{g: Method(s(g) in s(Subclass2))}', membersOf(reflectClass(Subclass2)));
|
|
|
| - expect(
|
| - '{Subclass2: Method(s(Subclass2) in s(Subclass2), constructor)}',
|
| + expect('{Subclass2: Method(s(Subclass2) in s(Subclass2), constructor)}',
|
| constructorsOf(reflectClass(Subclass2)));
|
|
|
| expectSame(
|
| - reflectClass(MixinApplication),
|
| - reflectClass(Subclass2).superclass);
|
| + reflectClass(MixinApplication), reflectClass(Subclass2).superclass);
|
| }
|
|
|
| testSubclassA() {
|
| String owner = ' in s(test.mixin_application_test)';
|
| checkClass(SubclassA, [
|
| - 'Class(s(SubclassA) in s(test.mixin_application_test), top-level)',
|
| - 'Class(s(test.model.C with test.mixin_application_test.Mixin,'
|
| - ' test.mixin_application_test.Mixin2)$owner, top-level)',
|
| - 'Class(s(test.model.C with test.mixin_application_test.Mixin)$owner,'
|
| - ' 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)',
|
| - 'Class(s(Object) in s(dart.core), top-level)',
|
| + 'Class(s(SubclassA) in s(test.mixin_application_test), top-level)',
|
| + 'Class(s(test.model.C with test.mixin_application_test.Mixin,'
|
| + ' test.mixin_application_test.Mixin2)$owner, top-level)',
|
| + 'Class(s(test.model.C with test.mixin_application_test.Mixin)$owner,'
|
| + ' 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)',
|
| + 'Class(s(Object) in s(dart.core), top-level)',
|
| ]);
|
|
|
| - expect(
|
| - '{fa: Method(s(fa) in s(SubclassA))}',
|
| + expect('{fa: Method(s(fa) in s(SubclassA))}',
|
| membersOf(reflectClass(SubclassA)));
|
|
|
| - expect(
|
| - '{SubclassA: Method(s(SubclassA) in s(SubclassA), constructor)}',
|
| + expect('{SubclassA: Method(s(SubclassA) in s(SubclassA), constructor)}',
|
| constructorsOf(reflectClass(SubclassA)));
|
|
|
| expect(
|
| @@ -278,11 +268,9 @@ testSubclassA() {
|
| ' m2: Method(s(m2) in s(Mixin2))}',
|
| membersOf(reflectClass(SubclassA).superclass));
|
|
|
| - String name =
|
| - 'test.model.C with test.mixin_application_test.Mixin,'
|
| + String name = 'test.model.C with test.mixin_application_test.Mixin,'
|
| ' test.mixin_application_test.Mixin2';
|
| - expect(
|
| - '{$name: Method(s($name) in s($name), constructor)}',
|
| + expect('{$name: Method(s($name) in s($name), constructor)}',
|
| constructorsOf(reflectClass(SubclassA).superclass));
|
|
|
| expect(
|
| @@ -297,35 +285,32 @@ testSubclassA() {
|
| ' in s($name), constructor)}',
|
| constructorsOf(reflectClass(SubclassA).superclass.superclass));
|
|
|
| - expectSame(
|
| - reflectClass(C),
|
| + expectSame(reflectClass(C),
|
| reflectClass(SubclassA).superclass.superclass.superclass);
|
| }
|
|
|
| testSubclass2A() {
|
| String owner = ' in s(test.mixin_application_test)';
|
| checkClass(Subclass2A, [
|
| - 'Class(s(Subclass2A) in s(test.mixin_application_test), top-level)',
|
| - 'Class(s(MixinApplicationA) in s(test.mixin_application_test),'
|
| - ' top-level)',
|
| - 'Class(s(test.model.C with test.mixin_application_test.Mixin)$owner,'
|
| - ' 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)',
|
| - 'Class(s(Object) in s(dart.core), top-level)',
|
| + 'Class(s(Subclass2A) in s(test.mixin_application_test), top-level)',
|
| + 'Class(s(MixinApplicationA) in s(test.mixin_application_test),'
|
| + ' top-level)',
|
| + 'Class(s(test.model.C with test.mixin_application_test.Mixin)$owner,'
|
| + ' 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)',
|
| + 'Class(s(Object) in s(dart.core), top-level)',
|
| ]);
|
|
|
| - expect(
|
| - '{ga: Method(s(ga) in s(Subclass2A))}',
|
| + expect('{ga: Method(s(ga) in s(Subclass2A))}',
|
| membersOf(reflectClass(Subclass2A)));
|
|
|
| - expect(
|
| - '{Subclass2A: Method(s(Subclass2A) in s(Subclass2A), constructor)}',
|
| + expect('{Subclass2A: Method(s(Subclass2A) in s(Subclass2A), constructor)}',
|
| constructorsOf(reflectClass(Subclass2A)));
|
|
|
| - expectSame(reflectClass(MixinApplicationA),
|
| - reflectClass(Subclass2A).superclass);
|
| + expectSame(
|
| + reflectClass(MixinApplicationA), reflectClass(Subclass2A).superclass);
|
| }
|
|
|
| main() {
|
|
|