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_test; | 5 library dart2js.serialization_test; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import 'memory_compiler.dart'; | 8 import 'memory_compiler.dart'; |
9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
10 import 'package:compiler/src/constants/constructors.dart'; | 10 import 'package:compiler/src/constants/constructors.dart'; |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 constructor1.defaultValues.forEach((k, v) { | 319 constructor1.defaultValues.forEach((k, v) { |
320 checkConstants( | 320 checkConstants( |
321 constructor1, constructor2, 'defaultValue[$k]', | 321 constructor1, constructor2, 'defaultValue[$k]', |
322 v, constructor2.defaultValues[k]); | 322 v, constructor2.defaultValues[k]); |
323 }); | 323 }); |
324 checkConstants( | 324 checkConstants( |
325 constructor1, constructor2, 'thisConstructorInvocation', | 325 constructor1, constructor2, 'thisConstructorInvocation', |
326 constructor1.thisConstructorInvocation, | 326 constructor1.thisConstructorInvocation, |
327 constructor2.thisConstructorInvocation); | 327 constructor2.thisConstructorInvocation); |
328 } | 328 } |
| 329 |
| 330 @override |
| 331 visitErroneous(ErroneousConstantConstructor constructor, |
| 332 ConstantConstructor arg) { |
| 333 // Do nothing. |
| 334 } |
329 } | 335 } |
330 | 336 |
331 /// Check that the values [property] of [object1] and [object2], [value1] and | 337 /// Check that the values [property] of [object1] and [object2], [value1] and |
332 /// [value2] respectively, are equal and throw otherwise. | 338 /// [value2] respectively, are equal and throw otherwise. |
333 void check(var object1, var object2, String property, var value1, value2) { | 339 void check(var object1, var object2, String property, var value1, value2) { |
334 if (value1 != value2) { | 340 if (value1 != value2) { |
335 throw "$object1.$property = '${value1}' <> " | 341 throw "$object1.$property = '${value1}' <> " |
336 "$object2.$property = '${value2}'"; | 342 "$object2.$property = '${value2}'"; |
337 } | 343 } |
338 } | 344 } |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 exp1, exp2, 'expression', | 1094 exp1, exp2, 'expression', |
1089 exp1.expression, exp2.expression); | 1095 exp1.expression, exp2.expression); |
1090 } | 1096 } |
1091 | 1097 |
1092 @override | 1098 @override |
1093 visitDeferred(DeferredConstantExpression exp1, | 1099 visitDeferred(DeferredConstantExpression exp1, |
1094 DeferredConstantExpression exp2) { | 1100 DeferredConstantExpression exp2) { |
1095 // TODO: implement visitDeferred | 1101 // TODO: implement visitDeferred |
1096 } | 1102 } |
1097 } | 1103 } |
OLD | NEW |