| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Dart test for generic types. | 4 // Dart test for generic types. |
| 5 | 5 |
| 6 import "package:expect/expect.dart"; |
| 7 |
| 6 class GenericsTest<T,V> implements Map<int, int> { | 8 class GenericsTest<T,V> implements Map<int, int> { |
| 7 static int myFunc(bool a, bool b) { | 9 static int myFunc(bool a, bool b) { |
| 8 Expect.equals(true, a); | 10 Expect.equals(true, a); |
| 9 Expect.equals(false, b); | 11 Expect.equals(false, b); |
| 10 return 42; | 12 return 42; |
| 11 } | 13 } |
| 12 | 14 |
| 13 static void testMain() { | 15 static void testMain() { |
| 14 int a = 1; | 16 int a = 1; |
| 15 int b = 2; | 17 int b = 2; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 LongGeneric< | 52 LongGeneric< |
| 51 C, | 53 C, |
| 52 List<E>, | 54 List<E>, |
| 53 Map<G, LongGeneric<I, J, List<A>>>>> id2; | 55 Map<G, LongGeneric<I, J, List<A>>>>> id2; |
| 54 } | 56 } |
| 55 } | 57 } |
| 56 | 58 |
| 57 main() { | 59 main() { |
| 58 GenericsTest.testMain(); | 60 GenericsTest.testMain(); |
| 59 } | 61 } |
| OLD | NEW |