Skip to content

Commit 5a2cba9

Browse files
Merge pull request #99 from IntrepidPursuits/ip_toArray_tests
Added test cases to Sequence.ip_toArray
2 parents 77025a1 + cf6f606 commit 5a2cba9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

SwiftWisdomTests/StandardLibrary/Array/Sequence+UtilitiesTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import XCTest
1111
class SequenceTests: XCTestCase {
1212

1313
func testToArray() {
14-
//TODO: do we need to test ip_toArray?
14+
XCTAssertEqual([0], (0...0).ip_toArray())
15+
XCTAssertEqual([0,1], (0...1).ip_toArray())
16+
XCTAssertEqual([0,1,2,3,4,5,6,7,8,9,10], (0...10).ip_toArray())
17+
XCTAssertEqual([-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10], (-10...10).ip_toArray())
1518
}
1619

1720
func testSplitWithFilter() {

0 commit comments

Comments
 (0)