Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: tests/compiler/dart2js/serialization/test_helper.dart

Issue 2824423002: Compute NativeBasicData for KernelWorldBuilder (Closed)
Patch Set: Updated cf. comments. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/kernel/closed_world2_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4
5 library dart2js.serialization_test_helper; 5 library dart2js.serialization_test_helper;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'package:compiler/src/common/resolution.dart'; 8 import 'package:compiler/src/common/resolution.dart';
9 import 'package:compiler/src/constants/expressions.dart'; 9 import 'package:compiler/src/constants/expressions.dart';
10 import 'package:compiler/src/constants/values.dart'; 10 import 'package:compiler/src/constants/values.dart';
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 sameElement: sameKey); 235 sameElement: sameKey);
236 if (unfound.isNotEmpty || remaining.isNotEmpty) { 236 if (unfound.isNotEmpty || remaining.isNotEmpty) {
237 String message = 237 String message =
238 "Map key mismatch for `$property` on $object1 vs $object2: \n" 238 "Map key mismatch for `$property` on $object1 vs $object2: \n"
239 "Common:\n ${common.join('\n ')}\n" 239 "Common:\n ${common.join('\n ')}\n"
240 "Unfound:\n ${unfound.join('\n ')}\n" 240 "Unfound:\n ${unfound.join('\n ')}\n"
241 "Extra: \n ${remaining.join('\n ')}"; 241 "Extra: \n ${remaining.join('\n ')}";
242 throw message; 242 throw message;
243 } 243 }
244 for (List pair in common) { 244 for (List pair in common) {
245 check(object1, object2, 'Map value for `$property`', map1[pair[0]], 245 check(pair[0], pair[1], 'Map value for `$property`', map1[pair[0]],
246 map2[pair[1]], sameValue); 246 map2[pair[1]], sameValue);
247 } 247 }
248 return true; 248 return true;
249 } 249 }
250 250
251 /// Checks the equivalence of the identity (but not properties) of [element1] 251 /// Checks the equivalence of the identity (but not properties) of [element1]
252 /// and [element2]. 252 /// and [element2].
253 /// 253 ///
254 /// Uses [object1], [object2] and [property] to provide context for failures. 254 /// Uses [object1], [object2] and [property] to provide context for failures.
255 bool checkElementIdentities(Object object1, Object object2, String property, 255 bool checkElementIdentities(Object object1, Object object2, String property,
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 strategy.testTypeLists(a, b, 'namedParameterTypes', 821 strategy.testTypeLists(a, b, 'namedParameterTypes',
822 aType.namedParameterTypes, b.namedParameterTypes); 822 aType.namedParameterTypes, b.namedParameterTypes);
823 } 823 }
824 return false; 824 return false;
825 default: 825 default:
826 throw new UnsupportedError('Unsupported equivalence: ' 826 throw new UnsupportedError('Unsupported equivalence: '
827 '$a (${a.runtimeType}) vs $b (${b.runtimeType})'); 827 '$a (${a.runtimeType}) vs $b (${b.runtimeType})');
828 } 828 }
829 } 829 }
830 } 830 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/kernel/closed_world2_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698