anchor.diff:            expect(() => IntegerRange(3).getRange(0, 4), throwsRangeError);
           });
         });
  -      group('index', () {
  -        test('indexOf (positive step)', () {
  -          final r = IntegerRange(2, 7, 2); // [2, 4, 6]
  -          expect(r.indexOf(null), -1);
  -          expect(r.indexOf(1), -1);
  -          expect(r.indexOf(2), 0);
  -          expect(r.indexOf(3), -1);
  -          expect(r.indexOf(4), 1);
  -          expect(r.indexOf(5), -1);
  -          expect(r.indexOf(6), 2);
  -          expect(r.indexOf(7), -1);
  -          expect(r.indexOf(8), -1);
  -          expect(r.indexOf(2, 0), 0);
  -          expect(r.indexOf(2, 1), -1);
  -          expect(r.indexOf(4, 1), 1);
  -          expect(r.indexOf(4, 2), -1);
  -          expect(r.indexOf(6, 2), 2);
  -          expect(r.indexOf(6, 3), -1);
  -        });
  -        test('contains (positive step)', () {
  -          final r = IntegerRange(2, 7, 2); // [2, 4, 6]
  -          expect(r.contains(null), isFalse);
  -          expect(r.contains(0), isFalse);
  -          expect(r.contains(1), isFalse);
  -          expect(r.contains(2), isTrue);
  -          expect(r.contains(3), isFalse);
  -          expect(r.contains(4), isTrue);
  -          expect(r.contains(5), isFalse);
  -          expect(r.contains(6), isTrue);
  -          expect(r.contains(7), isFalse);
  -          expect(r.contains(8), isFalse);
  -        });
  -        test('indexOf (negative step)', () {
  -          final r = IntegerRange(7, 2, -2); // [7, 5, 3]
  -          expect(r.indexOf(null), -1);
  -          expect(r.indexOf(0), -1);
  -          expect(r.indexOf(1), -1);
  -          expect(r.indexOf(2), -1);
  -          expect(r.indexOf(3), 2);
  -          expect(r.indexOf(4), -1);
  -          expect(r.indexOf(5), 1);
  -          expect(r.indexOf(6), -1);
  -          expect(r.indexOf(7), 0);
  -          expect(r.indexOf(8), -1);
  -          expect(r.indexOf(9), -1);
  -          expect(r.indexOf(3, 2), 2);
  -          expect(r.indexOf(3, 3), -1);
  -          expect(r.indexOf(5, 1), 1);
  -          expect(r.indexOf(5, 2), -1);
  -          expect(r.indexOf(7, 0), 0);
  -          expect(r.indexOf(7, 1), -1);
  -        });
  -        test('contains (negative step)', () {
  -          final r = IntegerRange(7, 2, -2); // [7, 5, 3]
  -          expect(r.contains(null), isFalse);
  -          expect(r.contains(0), isFalse);
  -          expect(r.contains(1), isFalse);
  -          expect(r.contains(2), isFalse);
  -          expect(r.contains(3), isTrue);
  -          expect(r.contains(4), isFalse);
  -          expect(r.contains(5), isTrue);
  -          expect(r.contains(6), isFalse);
  -          expect(r.contains(7), isTrue);
  -          expect(r.contains(8), isFalse);
  -          expect(r.contains(9), isFalse);
  -        });
  -        test('lastIndexOf (positive step)', () {
  -          final r = IntegerRange(2, 7, 2); // [2, 4, 6]
  -          expect(r.lastIndexOf(null), -1);
  -          expect(r.lastIndexOf(0), -1);
  -          expect(r.lastIndexOf(1), -1);
  -          expect(r.lastIndexOf(2), 0);
  -          expect(r.lastIndexOf(3), -1);
  -          expect(r.lastIndexOf(4), 1);
  -          expect(r.lastIndexOf(5), -1);
  -          expect(r.lastIndexOf(6), 2);
  -          expect(r.lastIndexOf(7), -1);
  -          expect(r.lastIndexOf(8), -1);
  -          expect(r.lastIndexOf(2, 0), 0);
  -          expect(r.lastIndexOf(2, -1), -1);
  -          expect(r.lastIndexOf(4, 1), 1);
  -          expect(r.lastIndexOf(4, 0), -1);
  -          expect(r.lastIndexOf(6, 2), 2);
  -          expect(r.lastIndexOf(6, 1), -1);
  -        });
  -        test('lastIndexOf (negative step)', () {
  -          final r = IntegerRange(7, 2, -2); // [7, 5, 3]
  -          expect(r.lastIndexOf(null), -1);
  -          expect(r.lastIndexOf(1), -1);
  -          expect(r.lastIndexOf(2), -1);
  -          expect(r.lastIndexOf(3), 2);
  -          expect(r.lastIndexOf(4), -1);
  -          expect(r.lastIndexOf(5), 1);
  -          expect(r.lastIndexOf(6), -1);
  -          expect(r.lastIndexOf(7), 0);
  -          expect(r.lastIndexOf(8), -1);
  -          expect(r.lastIndexOf(8), -1);
  -          expect(r.lastIndexOf(3, 2), 2);
  -          expect(r.lastIndexOf(3, 1), -1);
  -          expect(r.lastIndexOf(5, 1), 1);
  -          expect(r.lastIndexOf(5, 0), -1);
  -          expect(r.lastIndexOf(7, 0), 0);
  -          expect(r.lastIndexOf(7, -1), -1);
  -        });
  -      });
         test('printing', () {
           expect(IntegerRange().toString(), 'IntegerRange()');
           expect(IntegerRange(1).toString(), 'IntegerRange(1)');
  
positive.code:       });
      });
      group('BigInt', () {
        void verify(List<BigInt> range, List/*<int|BigInt>*/ expected) {
          final normalized = expected
              .map((value) => value is BigInt ? value : BigInt.from(value))
              .cast<BigInt>()
              .toList(growable: false);
          expect(range, normalized);
          expect(range.reversed, normalized.reversed);
          final iterator = range.iterator;
          for (var i = 0; i < normalized.length; i++) {
            expect(iterator.moveNext(), isTrue);
            expect(iterator.current, range[i]);
            expect(range.contains(iterator.current), isTrue);
            expect(range.indexOf(iterator.current), i);
            expect(range.indexOf(iterator.current, i), i);
            expect(range.indexOf(iterator.current, -1), i);
            expect(range.lastIndexOf(iterator.current), i);
            expect(range.lastIndexOf(iterator.current, i), i);
            expect(range.lastIndexOf(iterator.current, expected.length), i);
          }
          expect(iterator.moveNext(), isFalse);
          expect(() => range[-1], throwsRangeError);
          expect(() => range[normalized.length], throwsRangeError);
          for (final value in normalized) {
            expect(range.contains(value), isTrue);
          }
        }
  
        group('constructor', () {
          test('empty', () {
            verify(BigIntRange(), []);
            expect(BigIntRange().contains(BigInt.one), isFalse);
          });
          test('1 argument', () {
            verify(BigIntRange(BigInt.from(0)), []);
            verify(BigIntRange(BigInt.from(1)), [0]);
            verify(BigIntRange(BigInt.from(2)), [0, 1]);
            verify(BigIntRange(BigInt.from(3)), [0, 1, 2]);
          });
          test('2 argument', () {
            verify(BigIntRange(BigInt.from(0), BigInt.from(4)), [0, 1, 2, 3]);
            verify(BigIntRange(BigInt.from(5), BigInt.from(9)), [5, 6, 7, 8]);
            verify(BigIntRange(BigInt.from(9), BigInt.from(5)), [9, 8, 7, 6]);
          });
          test('3 argument (positive step)', () {
            verify(BigIntRange(BigInt.from(2), BigInt.from(8), BigInt.two),
                [2, 4, 6]);
            verify(BigIntRange(BigInt.from(3), BigInt.from(8), BigInt.two),
                [3, 5, 7]);
            verify(
                BigIntRange(BigInt.from(4), BigInt.from(8), BigInt.two), [4, 6]);
            verify(BigIntRange(BigInt.from(2), BigInt.from(7), BigInt.two),
                [2, 4, 6]);
            verify(
                BigIntRange(BigInt.from(2), BigInt.from(6), BigInt.two), [2, 4]);
          });
          test('3 argument (negative step)', () {
            verify(BigIntRange(BigInt.from(8), BigInt.from(2), -BigInt.two),
                [8, 6, 4]);
            verify(BigIntRange(BigInt.from(8), BigInt.from(3), -BigInt.two),
                [8, 6, 4]);
            verify(
                BigIntRange(BigInt.from(8), BigInt.from(4), -BigInt.two), [8, 6]);
            verify(BigIntRange(BigInt.from(7), BigInt.from(2), -BigInt.two),
                [7, 5, 3]);
            verify(
                BigIntRange(BigInt.from(6), BigInt.from(2), -BigInt.two), [6, 4]);
          });
          test('shorthand', () {
            verify(BigInt.zero.to(BigInt.from(3)), [0, 1, 2]);
            verify(BigInt.two.to(BigInt.from(8), step: BigInt.two), [2, 4, 6]);
          });
          test('invalid', () {
            expect(() => BigIntRange(BigInt.zero, BigInt.two, BigInt.zero),
  
negative.code:         {required List<T> included, required List<T> excluded}) {
        expect(range, included);
        expect(range.length, included.length);
        expect(range.reversed, included.reversed);
        if (included.isEmpty) {
          expect(range.isEmpty, isTrue);
        } else {
  