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

Side by Side Diff: tests/lib_2/mirrors/abstract_class_test.dart

Issue 2997283003: Migrated test lock 217 to Dart 2.0. (Closed)
Patch Set: Addressed comments Created 3 years, 3 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 unified diff | Download patch
« no previous file with comments | « tests/lib_2/math/rectangle_test.dart ('k') | tests/lib_2/mirrors/abstract_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.abstract_class_test; 5 library test.abstract_class_test;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 9
10 void main() { 10 void main() {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 Expect.isFalse(reflectClass(ConcreteMA2).superclass.isAbstract); 131 Expect.isFalse(reflectClass(ConcreteMA2).superclass.isAbstract);
132 Expect.isFalse(reflectClass(ConcreteMA2).superclass.superclass.isAbstract); 132 Expect.isFalse(reflectClass(ConcreteMA2).superclass.superclass.isAbstract);
133 } 133 }
134 } 134 }
135 135
136 abstract class NamedMA = S with M; 136 abstract class NamedMA = S with M;
137 137
138 class SubNamedMA extends NamedMA { 138 class SubNamedMA extends NamedMA {
139 mixinFoo() {} 139 mixinFoo() {}
140 } 140 }
141 class ConcreteNamedMA = S with M; //# 00: static type warning
142 141
143 abstract class NamedMA2 = S with M2; 142 abstract class NamedMA2 = S with M2;
144 143
145 class SubNamedMA2 extends NamedMA2 { 144 class SubNamedMA2 extends NamedMA2 {
146 mixinFoo() {} 145 mixinFoo() {}
147 } 146 }
148 147
149 class ConcreteNamedMA2 = S with M2; 148 class ConcreteNamedMA2 = S with M2;
150 149
151 testNamedMixinApplication() { 150 testNamedMixinApplication() {
152 // Application is abstract. 151 // Application is abstract.
153 { 152 {
154 // Mixin is abstract. 153 // Mixin is abstract.
155 Expect.isFalse(reflectClass(SubNamedMA).isAbstract); 154 Expect.isFalse(reflectClass(SubNamedMA).isAbstract);
156 Expect.isTrue(reflectClass(SubNamedMA).superclass.isAbstract); 155 Expect.isTrue(reflectClass(SubNamedMA).superclass.isAbstract);
157 Expect.isFalse(reflectClass(SubNamedMA).superclass.superclass.isAbstract); 156 Expect.isFalse(reflectClass(SubNamedMA).superclass.superclass.isAbstract);
158 Expect.isTrue(reflectClass(NamedMA).isAbstract); 157 Expect.isTrue(reflectClass(NamedMA).isAbstract);
159 Expect.isFalse(reflectClass(NamedMA).superclass.isAbstract); 158 Expect.isFalse(reflectClass(NamedMA).superclass.isAbstract);
160 159
161 // Mixin is concrete. 160 // Mixin is concrete.
162 Expect.isFalse(reflectClass(SubNamedMA2).isAbstract); 161 Expect.isFalse(reflectClass(SubNamedMA2).isAbstract);
163 Expect.isTrue(reflectClass(SubNamedMA2).superclass.isAbstract); 162 Expect.isTrue(reflectClass(SubNamedMA2).superclass.isAbstract);
164 Expect.isFalse(reflectClass(SubNamedMA2).superclass.superclass.isAbstract); 163 Expect.isFalse(reflectClass(SubNamedMA2).superclass.superclass.isAbstract);
165 Expect.isTrue(reflectClass(NamedMA2).isAbstract); 164 Expect.isTrue(reflectClass(NamedMA2).isAbstract);
166 Expect.isFalse(reflectClass(NamedMA2).superclass.isAbstract); 165 Expect.isFalse(reflectClass(NamedMA2).superclass.isAbstract);
167 } 166 }
168 167
169 // Application is concrete. 168 // Application is concrete.
170 { 169 {
171 // Mixin is abstract.
172 Expect.isFalse(reflectClass(ConcreteNamedMA).isAbstract); //# 00: ok
173 Expect.isFalse(reflectClass(ConcreteNamedMA).superclass.isAbstract); //# 00: o k
174
175 // Mixin is concrete. 170 // Mixin is concrete.
176 Expect.isFalse(reflectClass(ConcreteNamedMA2).isAbstract); 171 Expect.isFalse(reflectClass(ConcreteNamedMA2).isAbstract);
177 Expect.isFalse(reflectClass(ConcreteNamedMA2).superclass.isAbstract); 172 Expect.isFalse(reflectClass(ConcreteNamedMA2).superclass.isAbstract);
178 } 173 }
179 } 174 }
OLDNEW
« no previous file with comments | « tests/lib_2/math/rectangle_test.dart ('k') | tests/lib_2/mirrors/abstract_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698