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

Side by Side Diff: tests/language/mixin_super_2_test.dart

Issue 1372213006: More mixin super tests. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/language/language_dart2js.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
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.
4 // SharedOptions=--supermixin
5
6 import "package:expect/expect.dart";
7
8 class B {
9 // 'super' resolves to Object, and in some tests, multiple points in the
10 // inheritance chain.
11 toString() => 'B(' + super.toString() + ')';
12 }
13
14 class R {
15 toString() => 'R[' + super.toString() + ']';
16 }
17
18 class D extends R with B {
19 toString() => 'D<' + super.toString() + '>';
20 }
21
22 class E extends D with B {
23 toString() => 'E{' + super.toString() + '}';
24 }
25
26 class F = R with B, B;
27
28 class G extends F with B {
29 toString() => 'G{' + super.toString() + '}';
30 }
31
32 main(){
33 check(object, String expected) {
34 Expect.equals(expected, object.toString());
35 }
36
37 check(new B(), "B(Instance of 'B')");
38 check(new R(), "R[Instance of 'R']");
39 check(new D(), "D<B(R[Instance of 'D'])>");
40 check(new E(), "E{B(D<B(R[Instance of 'E'])>)}");
41 check(new F(), "B(B(R[Instance of 'F']))");
42 check(new G(), "G{B(B(B(R[Instance of 'G'])))}");
43 }
OLDNEW
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698