diff --git a/Tests/GRDBTests/CursorTests.swift b/Tests/GRDBTests/CursorTests.swift index 9737c8df5..eb81dc66c 100644 --- a/Tests/GRDBTests/CursorTests.swift +++ b/Tests/GRDBTests/CursorTests.swift @@ -28,6 +28,12 @@ class CursorTests: GRDBTestCase { } } + func testDropLast() { + XCTAssertTrue(try IteratorCursor([1, 2, 3, 4, 5]).dropLast(0) == [1, 2, 3, 4, 5]) + XCTAssertTrue(try IteratorCursor([1, 2, 3, 4, 5]).dropLast(2) == [1, 2, 3]) + XCTAssertTrue(try IteratorCursor([1, 2, 3, 4, 5]).dropLast(10) == []) + } + func testContainsIsLazy() { func makeCursor() -> AnyCursor { var i = 0