| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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"; | |
| 6 | |
| 7 class C<T, U, V> {} | 5 class C<T, U, V> {} |
| 8 | 6 |
| 9 class D {} | 7 class D {} |
| 10 | 8 |
| 11 typedef int Foo(bool b); | 9 typedef int Foo(bool b); |
| 12 | 10 |
| 13 sameType(a, b) { | 11 sameType(a, b) { |
| 14 Expect.equals(a.runtimeType, b.runtimeType); | 12 Expect.equals(a.runtimeType, b.runtimeType); |
| 15 } | 13 } |
| 16 | 14 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 34 // runtimeType on type is idempotent. | 32 // runtimeType on type is idempotent. |
| 35 Expect.equals((D).runtimeType, (D).runtimeType.runtimeType); | 33 Expect.equals((D).runtimeType, (D).runtimeType.runtimeType); |
| 36 | 34 |
| 37 // Test that operator calls on class literals go to Type. | 35 // Test that operator calls on class literals go to Type. |
| 38 Expect.throws(() => C = 1, (e) => e is NoSuchMethodError); | 36 Expect.throws(() => C = 1, (e) => e is NoSuchMethodError); |
| 39 Expect.throws(() => C++, (e) => e is NoSuchMethodError); | 37 Expect.throws(() => C++, (e) => e is NoSuchMethodError); |
| 40 Expect.throws(() => C + 1, (e) => e is NoSuchMethodError); | 38 Expect.throws(() => C + 1, (e) => e is NoSuchMethodError); |
| 41 Expect.throws(() => C[2], (e) => e is NoSuchMethodError); | 39 Expect.throws(() => C[2], (e) => e is NoSuchMethodError); |
| 42 Expect.throws(() => C[2] = 'hest', (e) => e is NoSuchMethodError); | 40 Expect.throws(() => C[2] = 'hest', (e) => e is NoSuchMethodError); |
| 43 } | 41 } |
| OLD | NEW |