blob: 6d40af0c65b8480eaba7c557de62b42482beb9d5 [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 Stream<T> skip(int count)
/// Skips the first count data events from this stream.
/// @description Checks that the first n elements are skipped.
/// @author kaigorodov
library skip_A01_t01;
import "../../../Utils/expect.dart";
void test(CreateStreamFunction create) {[], create([]).skip(0));[], create([]).skip(1));[], create([]).skip(10));[null], create([null]).skip(0));[], create([null]).skip(1));[], create([null]).skip(2));[1, 2, 3], create([1, 2, 3]).skip(0));[2, 3], create([1, 2, 3]).skip(1));[3], create([1, 2, 3]).skip(2));[], create([1, 2, 3]).skip(12));[[[[]]]], create([[], [[]], [[[]]]]).skip(2));