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

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

Issue 12018014: Start allowing mixin application extensions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Extend test cases. Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « tests/language/mixin_extends_is_test.dart ('k') | tests/language/mixin_naming_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 class S { 5 class S {
6 foo() => "S-foo"; 6 foo() => "S-foo";
7 baz() => "S-baz"; 7 baz() => "S-baz";
8 } 8 }
9 9
10 class M1 { 10 class M1 {
11 bar() => "M1-bar"; 11 bar() => "M1-bar";
12 } 12 }
13 13
14 class M2 { 14 class M2 {
15 bar() => "M2-bar"; 15 bar() => "M2-bar";
16 baz() => "M2-baz"; 16 baz() => "M2-baz";
17 fez() => "M2-fez"; 17 fez() => "M2-fez";
18 } 18 }
19 19
20 typedef C = S with M1; 20 class C extends S with M1 { }
21 typedef D = S with M1, M2; 21 class D extends S with M1, M2 { }
22 typedef E = S with M2, M1; 22 class E extends S with M2, M1 { }
23 23
24 class F extends E { 24 class F extends E {
25 fez() => "F-fez"; 25 fez() => "F-fez";
26 } 26 }
27 27
28 main() { 28 main() {
29 var c = new C(); 29 var c = new C();
30 Expect.equals("S-foo", c.foo()); 30 Expect.equals("S-foo", c.foo());
31 Expect.equals("M1-bar", c.bar()); 31 Expect.equals("M1-bar", c.bar());
32 Expect.equals("S-baz", c.baz()); 32 Expect.equals("S-baz", c.baz());
(...skipping 10 matching lines...) Expand all
43 Expect.equals("M1-bar", e.bar()); 43 Expect.equals("M1-bar", e.bar());
44 Expect.equals("M2-baz", e.baz()); 44 Expect.equals("M2-baz", e.baz());
45 Expect.equals("M2-fez", e.fez()); 45 Expect.equals("M2-fez", e.fez());
46 46
47 var f = new F(); 47 var f = new F();
48 Expect.equals("S-foo", f.foo()); 48 Expect.equals("S-foo", f.foo());
49 Expect.equals("M1-bar", f.bar()); 49 Expect.equals("M1-bar", f.bar());
50 Expect.equals("M2-baz", f.baz()); 50 Expect.equals("M2-baz", f.baz());
51 Expect.equals("F-fez", f.fez()); 51 Expect.equals("F-fez", f.fez());
52 } 52 }
OLDNEW
« no previous file with comments | « tests/language/mixin_extends_is_test.dart ('k') | tests/language/mixin_naming_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698