| 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 | 4 |
| 5 library dart2js.serialization_test_helper; | 5 library dart2js.serialization_test_helper; |
| 6 | 6 |
| 7 import 'dart:collection'; | |
| 8 import 'package:compiler/src/common/resolution.dart'; | |
| 9 import 'package:compiler/src/constants/expressions.dart'; | |
| 10 import 'package:compiler/src/constants/values.dart'; | |
| 11 import 'package:compiler/src/compiler.dart'; | |
| 12 import 'package:compiler/src/elements/elements.dart'; | |
| 13 import 'package:compiler/src/elements/entities.dart'; | |
| 14 import 'package:compiler/src/elements/resolution_types.dart'; | |
| 15 import 'package:compiler/src/elements/types.dart'; | |
| 16 import 'package:compiler/src/kernel/elements.dart'; | |
| 17 import 'package:compiler/src/kernel/element_map_impl.dart'; | |
| 18 import 'package:compiler/src/serialization/equivalence.dart'; | |
| 19 import 'package:compiler/src/util/util.dart'; | |
| 20 import 'package:expect/expect.dart'; | |
| 21 import 'test_data.dart'; | 7 import 'test_data.dart'; |
| 22 | 8 |
| 23 /// Returns the test arguments for testing the [index]th skipped test. The | 9 /// Returns the test arguments for testing the [index]th skipped test. The |
| 24 /// [skip] count is used to check that [index] is a valid index. | 10 /// [skip] count is used to check that [index] is a valid index. |
| 25 List<String> testSkipped(int index, int skip) { | 11 List<String> testSkipped(int index, int skip) { |
| 26 if (index < 0 || index >= skip) { | 12 if (index < 0 || index >= skip) { |
| 27 throw new ArgumentError('Invalid skip index $index'); | 13 throw new ArgumentError('Invalid skip index $index'); |
| 28 } | 14 } |
| 29 return ['${index}', '${index + 1}']; | 15 return ['${index}', '${index + 1}']; |
| 30 } | 16 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 42 } | 28 } |
| 43 | 29 |
| 44 if (index == 1 && skip != 0) { | 30 if (index == 1 && skip != 0) { |
| 45 return ['${skip}', segmentNumber(index)]; | 31 return ['${skip}', segmentNumber(index)]; |
| 46 } else if (index == count) { | 32 } else if (index == count) { |
| 47 return [segmentNumber(index - 1)]; | 33 return [segmentNumber(index - 1)]; |
| 48 } else { | 34 } else { |
| 49 return [segmentNumber(index - 1), segmentNumber(index)]; | 35 return [segmentNumber(index - 1), segmentNumber(index)]; |
| 50 } | 36 } |
| 51 } | 37 } |
| OLD | NEW |