blob: 3b961d75c9daaf1ca0c388f917c9f4fc035f1a1b [file] [log] [blame]
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// @assertion abstract E removeAt(int index)
/// Throws a RangeError if the index does not point inside the list.
/// @description Checks that a RangeError is thrown if the index does not point
/// inside the list.
/// @author kaigorodov
library removeAt_A03_t01;
import "../../../Utils/expect.dart";
test(List<E> create<E>([int length, E fill])) {
check(List a0, int index) {
List a = create();
a.addAll(a0);
Expect.throws(() {a.removeAt(index);}, (e) => e is RangeError);
}
List a0 = [1, 3, 3, 4, 5, 6];
check(a0, -1);
check(a0, a0.length);
check(a0, 30000);
check(a0, -30000);
}