OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:kernel/kernel.dart'; | 4 import 'package:kernel/kernel.dart'; |
5 import 'type_parser.dart'; | 5 import 'type_parser.dart'; |
6 import 'type_unification_test.dart' show testCases; | 6 import 'type_unification_test.dart' show testCases; |
7 import 'package:test/test.dart'; | 7 import 'package:test/test.dart'; |
8 | 8 |
9 void checkHashCodeEquality(DartType type1, DartType type2) { | 9 void checkHashCodeEquality(DartType type1, DartType type2) { |
10 if (type1 == type2 && type1.hashCode != type2.hashCode) { | 10 if (type1 == type2 && type1.hashCode != type2.hashCode) { |
(...skipping 20 matching lines...) Expand all Loading... |
31 test('$testCase', () { | 31 test('$testCase', () { |
32 var env = new LazyTypeEnvironment(); | 32 var env = new LazyTypeEnvironment(); |
33 var type1 = env.parse(testCase.type1); | 33 var type1 = env.parse(testCase.type1); |
34 var type2 = env.parse(testCase.type2); | 34 var type2 = env.parse(testCase.type2); |
35 checkHashCodeEquality(type1, type2); | 35 checkHashCodeEquality(type1, type2); |
36 checkHashCodeRange(type1); | 36 checkHashCodeRange(type1); |
37 checkHashCodeRange(type2); | 37 checkHashCodeRange(type2); |
38 }); | 38 }); |
39 } | 39 } |
40 } | 40 } |
OLD | NEW |