| 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 | |
| 8 class GenericsTest<T,V> implements Map<int, int> { | 6 class GenericsTest<T,V> implements Map<int, int> { |
| 9 static int myFunc(bool a, bool b) { | 7 static int myFunc(bool a, bool b) { |
| 10 Expect.equals(true, a); | 8 Expect.equals(true, a); |
| 11 Expect.equals(false, b); | 9 Expect.equals(false, b); |
| 12 return 42; | 10 return 42; |
| 13 } | 11 } |
| 14 | 12 |
| 15 static void testMain() { | 13 static void testMain() { |
| 16 int a = 1; | 14 int a = 1; |
| 17 int b = 2; | 15 int b = 2; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 LongGeneric< | 50 LongGeneric< |
| 53 C, | 51 C, |
| 54 List<E>, | 52 List<E>, |
| 55 Map<G, LongGeneric<I, J, List<A>>>>> id2; | 53 Map<G, LongGeneric<I, J, List<A>>>>> id2; |
| 56 } | 54 } |
| 57 } | 55 } |
| 58 | 56 |
| 59 main() { | 57 main() { |
| 60 GenericsTest.testMain(); | 58 GenericsTest.testMain(); |
| 61 } | 59 } |
| OLD | NEW |