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

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

Issue 11886097: Get the most basic mixin applications working. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix checked mode. 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 class S { }
6 class M1 { }
7 class M2 { }
8 class M3 { }
9
10 typedef C = S with M1, M2, M3;
11
12 class S_M1 { }
13 class S_M1_M2 { }
14
15 main() {
16 var c = new C();
17 Expect.isTrue(c is C);
18 Expect.isTrue(c is S);
19 Expect.isFalse(c is S_M1);
20 Expect.isFalse(c is S_M1_M2);
21
22 var sm = new S_M1();
23 Expect.isFalse(sm is C);
24 Expect.isFalse(sm is S);
25 Expect.isTrue(sm is S_M1);
26 Expect.isFalse(sm is S_M1_M2);
27
28 var smm = new S_M1_M2();
29 Expect.isFalse(smm is C);
30 Expect.isFalse(smm is S);
31 Expect.isFalse(smm is S_M1);
32 Expect.isTrue(smm is S_M1_M2);
33 }
OLDNEW
« tests/language/mixin_field_test.dart ('K') | « tests/language/mixin_method_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698