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

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

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

Powered by Google App Engine
This is Rietveld 408576698