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

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

Issue 23465033: Add mixin language tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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_generic_test.dart ('k') | tests/language/mixin_mixin4_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
(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 import "package:expect/expect.dart";
6
7 class M<T> {
8 t() { return T; }
9 }
10
11 typedef A<U> = Object with M<List<U>>;
12
13 typedef B0 = Object with A<Set<bool>>;
14
15 typedef B1 = Object with A<Set<int>>;
16
17 class C0 extends B0 { }
18
19 class C1 extends B1 { }
20
21 typedef A2<K, V> = Object with M<Map<K, V>>;
22
23 typedef B2<V> = Object with A2<Set<V>, List<V>>;
24
25 typedef B3<K, V> = Object with A2<Set<K>, List<V>>;
26
27 class C2<T> extends B2<T> { }
28
29 class C3<T> extends B3<T, int> { }
30
31 class N {
32 q() { return 42; }
33 }
34
35 typedef O<U> = Object with N;
36
37 typedef P<K, V> = Object with O<V>;
38
39 class Q<K, V> extends P<K, V> { }
40
41 main() {
42 Expect.equals("List<Set<bool>>", new C0().t().toString());
43 Expect.equals("List<Set<int>>", new C1().t().toString());
44 Expect.equals("Map<Set<bool>, List<bool>>", new C2<bool>().t().toString());
45 Expect.equals("Map<Set<bool>, List<int>>", new C3<bool>().t().toString());
46 Expect.equals(42, new Q<bool, int>().q());
47 }
OLDNEW
« no previous file with comments | « tests/language/mixin_generic_test.dart ('k') | tests/language/mixin_mixin4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698