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

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

Issue 27223005: Implement new mixin application syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « tests/language/mixin_cyclic_test.dart ('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
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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 class S { 7 class S {
8 var foo = "S-foo"; 8 var foo = "S-foo";
9 } 9 }
10 10
11 class M1 { 11 class M1 {
12 final bar = "M1-bar"; 12 final bar = "M1-bar";
13 } 13 }
14 14
15 class M2 { 15 class M2 {
16 var baz = "M2-baz"; 16 var baz = "M2-baz";
17 } 17 }
18 18
19 typedef C = S with M1; 19 class C = S with M1;
20 typedef D = S with M1, M2; 20 class D = S with M1, M2;
21 typedef E = S with M2, M1; 21 class E = S with M2, M1;
22 22
23 class F extends E { 23 class F extends E {
24 var fez = "F-fez"; 24 var fez = "F-fez";
25 } 25 }
26 26
27 main() { 27 main() {
28 var c = new C(); 28 var c = new C();
29 var d = new D(); 29 var d = new D();
30 var e = new E(); 30 var e = new E();
31 var f = new F(); 31 var f = new F();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 Expect.throws(() => c.fez = 0, (error) => error is NoSuchMethodError); 111 Expect.throws(() => c.fez = 0, (error) => error is NoSuchMethodError);
112 Expect.throws(() => d.fez = 0, (error) => error is NoSuchMethodError); 112 Expect.throws(() => d.fez = 0, (error) => error is NoSuchMethodError);
113 Expect.throws(() => e.fez = 0, (error) => error is NoSuchMethodError); 113 Expect.throws(() => e.fez = 0, (error) => error is NoSuchMethodError);
114 114
115 f.fez = "F-fez-f"; 115 f.fez = "F-fez-f";
116 Expect.throws(() => c.fez, (error) => error is NoSuchMethodError); 116 Expect.throws(() => c.fez, (error) => error is NoSuchMethodError);
117 Expect.throws(() => d.fez, (error) => error is NoSuchMethodError); 117 Expect.throws(() => d.fez, (error) => error is NoSuchMethodError);
118 Expect.throws(() => e.fez, (error) => error is NoSuchMethodError); 118 Expect.throws(() => e.fez, (error) => error is NoSuchMethodError);
119 Expect.equals("F-fez-f", f.fez); 119 Expect.equals("F-fez-f", f.fez);
120 } 120 }
OLDNEW
« no previous file with comments | « tests/language/mixin_cyclic_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698