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

Side by Side Diff: tests/kernel/unsorted/mixin_test.dart

Issue 2434123003: Merge more Kernel infrastructure from kernel_sdk SDK fork. (Closed)
Patch Set: Created 4 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
OLDNEW
(Empty)
1 import 'expect.dart';
Kevin Millikin (Google) 2016/10/21 09:10:57 Copyright header.
Vyacheslav Egorov (Google) 2016/10/21 13:39:43 Done.
2
3 class Base {
4 baseFoo() {
5 print('Base.baseFoo()');
6 return 1;
7 }
8
9 foo() {
10 print('Base.foo()');
11 return 1;
12 }
13 }
14
15 class Mixin {
16 mixinFoo() {
17 print('Mixin.mixinFoo()');
18 return 2;
19 }
20
21 foo() {
22 print('Mixin.foo()');
23 return 2;
24 }
25 }
26
27 class Mixin2 {
28 mixin2Foo() {
29 print('Mixin2.mixin2Foo()');
30 return 3;
31 }
32
33 foo() {
34 print('Mixin2.foo()');
35 return 3;
36 }
37 }
38
39 class Sub extends Base with Mixin, Mixin2 {
40 subFoo() {
41 print('Sub.subFoo()');
42 return 4;
43 }
44
45 foo() {
46 print('Sub.foo()');
47 return 4;
48 }
49 }
50
51 main() {
52 var o = new Sub();
53
54 Expect.isTrue(o.baseFoo() == 1);
55 Expect.isTrue(o.mixinFoo() == 2);
56 Expect.isTrue(o.mixin2Foo() == 3);
57 Expect.isTrue(o.subFoo() == 4);
58 Expect.isTrue(o.foo() == 4);
59 }
60
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698