OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// General type checking tests | 5 /// General type checking tests |
6 library dev_compiler.test.checker_test; | 6 library dev_compiler.test.checker_test; |
7 | 7 |
8 import 'package:unittest/unittest.dart'; | 8 import 'package:test/test.dart'; |
9 | 9 |
10 import 'package:dev_compiler/src/testing.dart'; | 10 import 'package:dev_compiler/src/testing.dart'; |
11 | 11 |
12 import '../test_util.dart'; | |
13 | |
14 void main() { | 12 void main() { |
15 configureTest(); | |
16 | |
17 test('ternary operator', () { | 13 test('ternary operator', () { |
18 testChecker({ | 14 testChecker({ |
19 '/main.dart': ''' | 15 '/main.dart': ''' |
20 abstract class Comparable<T> { | 16 abstract class Comparable<T> { |
21 int compareTo(T other); | 17 int compareTo(T other); |
22 static int compare(Comparable a, Comparable b) => a.compareTo(b); | 18 static int compare(Comparable a, Comparable b) => a.compareTo(b); |
23 } | 19 } |
24 typedef int Comparator<T>(T a, T b); | 20 typedef int Comparator<T>(T a, T b); |
25 | 21 |
26 typedef bool _Predicate<T>(T value); | 22 typedef bool _Predicate<T>(T value); |
(...skipping 2902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2929 f = bar as II2D; | 2925 f = bar as II2D; |
2930 f = bar as DD2I; | 2926 f = bar as DD2I; |
2931 f = bar as DI2D; | 2927 f = bar as DI2D; |
2932 f = bar as ID2D; | 2928 f = bar as ID2D; |
2933 f = bar as DD2D; | 2929 f = bar as DD2D; |
2934 } | 2930 } |
2935 ''' | 2931 ''' |
2936 }); | 2932 }); |
2937 }); | 2933 }); |
2938 } | 2934 } |
OLD | NEW |