diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2024-04-17 13:48:28 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2024-04-17 13:48:28 -0600 |
commit | 68c10ee9c00ac2fc8fb3a9c75ab131a06e85f9d2 (patch) | |
tree | 38ba43510f6ddd587e2b5243cbeab99d4b71f420 /Tests/SwiftChessNeoTests/SwiftChessNeoTests.swift | |
parent | fe61fc78114515141eda343ebdeaa1480e06a6b5 (diff) |
switch to compactMap
Diffstat (limited to 'Tests/SwiftChessNeoTests/SwiftChessNeoTests.swift')
-rw-r--r-- | Tests/SwiftChessNeoTests/SwiftChessNeoTests.swift | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/SwiftChessNeoTests/SwiftChessNeoTests.swift b/Tests/SwiftChessNeoTests/SwiftChessNeoTests.swift index 310a53c..959d357 100644 --- a/Tests/SwiftChessNeoTests/SwiftChessNeoTests.swift +++ b/Tests/SwiftChessNeoTests/SwiftChessNeoTests.swift @@ -67,7 +67,7 @@ final class Sage2Tests: XCTestCase { func testBoardSequence() { let board = Board() let spaces = Array(board) - let pieces = spaces.flatMap({ $0.piece }) + let pieces = spaces.compactMap({ $0.piece }) let whitePieces = pieces.filter({ $0.color.isWhite }) let blackPieces = pieces.filter({ $0.color.isBlack }) XCTAssertEqual(spaces.count, 64) |