| 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 library dart2js.serialization_model_test; | 5 library dart2js.serialization_model_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 'instantiationMap of\n ' | 444 'instantiationMap of\n ' |
| 445 '${info1.instantiationMap}\nvs ${info2.instantiationMap}', | 445 '${info1.instantiationMap}\nvs ${info2.instantiationMap}', |
| 446 areElementsEquivalent, | 446 areElementsEquivalent, |
| 447 (a, b) => areSetsEquivalent( | 447 (a, b) => areSetsEquivalent( |
| 448 a, b, (a, b) => areInstancesEquivalent(a, b, typeEquivalence))); | 448 a, b, (a, b) => areInstancesEquivalent(a, b, typeEquivalence))); |
| 449 return true; | 449 return true; |
| 450 } | 450 } |
| 451 | 451 |
| 452 bool areInstancesEquivalent(Instance instance1, Instance instance2, | 452 bool areInstancesEquivalent(Instance instance1, Instance instance2, |
| 453 bool typeEquivalence(ResolutionDartType a, ResolutionDartType b)) { | 453 bool typeEquivalence(ResolutionDartType a, ResolutionDartType b)) { |
| 454 return typeEquivalence(instance1.type, instance2.type) && | 454 ResolutionInterfaceType type1 = instance1.type; |
| 455 ResolutionInterfaceType type2 = instance2.type; |
| 456 return typeEquivalence(type1, type2) && |
| 455 instance1.kind == instance2.kind && | 457 instance1.kind == instance2.kind && |
| 456 instance1.isRedirection == instance2.isRedirection; | 458 instance1.isRedirection == instance2.isRedirection; |
| 457 } | 459 } |
| OLD | NEW |