blob: ceaaad550f2af877a714cf27101dfd6ebc2da0d6 [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.
// @dart = 2.9
/// @assertion Iterable<E> skipWhile(bool test(E value))
/// The filtering happens lazily.
/// @description Checks that the [test] method is not called when [skipWhile] is
/// executed.
/// @author kaigorodov
import "dart:collection";
import "../../../Utils/expect.dart";
bool test(var value) {
Expect.fail("test($value) called");
return false;
}
main() {
new DoubleLinkedQueue.from([]).skipWhile(test);
new DoubleLinkedQueue.from([1]).skipWhile(test);
new DoubleLinkedQueue.from([1, 3, 7, 4, 5, 6]).skipWhile(test);
}