| Index: tests/compiler/dart2js/serialization/test_helper.dart
|
| diff --git a/tests/compiler/dart2js/serialization/test_helper.dart b/tests/compiler/dart2js/serialization/test_helper.dart
|
| index 9d3115f51e35ca794c3b51d5132d6968d835b442..2c74a07537fd33fd2087f5f17f42ddfcd6118dca 100644
|
| --- a/tests/compiler/dart2js/serialization/test_helper.dart
|
| +++ b/tests/compiler/dart2js/serialization/test_helper.dart
|
| @@ -13,6 +13,7 @@ import 'package:compiler/src/elements/elements.dart';
|
| import 'package:compiler/src/serialization/equivalence.dart';
|
| import 'package:compiler/src/tree/nodes.dart';
|
| import 'package:expect/expect.dart';
|
| +import 'test_data.dart';
|
|
|
| Check currentCheck;
|
|
|
| @@ -589,3 +590,33 @@ void checkResolvedAsts(Compiler compiler1, Element member1,
|
| testResolvedAstEquivalence(
|
| resolvedAst1, resolvedAst2, const CheckStrategy());
|
| }
|
| +
|
| +/// Returns the test arguments for testing the [index]th skipped test. The
|
| +/// [skip] count is used to check that [index] is a valid index.
|
| +List<String> testSkipped(int index, int skip) {
|
| + if (index < 0 || index >= skip) {
|
| + throw new ArgumentError('Invalid skip index $index');
|
| + }
|
| + return ['${index}', '${index + 1}'];
|
| +}
|
| +
|
| +/// Return the test arguments for testing the [index]th segment (1-based) of
|
| +/// the [TESTS] split into [count] groups. The first [skip] tests are excluded
|
| +/// from the automatic grouping.
|
| +List<String> testSegment(int index, int count, int skip) {
|
| + if (index < 0 || index > count) {
|
| + throw new ArgumentError('Invalid segment index $index');
|
| + }
|
| +
|
| + String segmentNumber(int i) {
|
| + return '${skip + i * (TESTS.length - skip) ~/ count}';
|
| + }
|
| +
|
| + if (index == 1 && skip != 0) {
|
| + return ['${skip}', segmentNumber(index)];
|
| + } else if (index == count) {
|
| + return [segmentNumber(index - 1)];
|
| + } else {
|
| + return [segmentNumber(index - 1), segmentNumber(index)];
|
| + }
|
| +}
|
|
|