diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2024-04-17 17:07:33 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2024-04-17 17:07:33 -0600 |
commit | 97998126b99500ba793a7a30c61d2991337182e5 (patch) | |
tree | 25a19c664f35b69c0df6d3871a28cdf538fabb4d /Tests/SwiftChessNeoTests/PlayerTests.swift | |
parent | 081adb89d7f5c8e80961e3873654be3473faef71 (diff) |
add tests
Diffstat (limited to 'Tests/SwiftChessNeoTests/PlayerTests.swift')
-rw-r--r-- | Tests/SwiftChessNeoTests/PlayerTests.swift | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/SwiftChessNeoTests/PlayerTests.swift b/Tests/SwiftChessNeoTests/PlayerTests.swift index b21b33c..77535e7 100644 --- a/Tests/SwiftChessNeoTests/PlayerTests.swift +++ b/Tests/SwiftChessNeoTests/PlayerTests.swift @@ -8,7 +8,7 @@ import XCTest @testable import SwiftChessNeo -final class SwiftChessNeoPlayer: XCTestCase { +final class PlayerTests: XCTestCase { func testPlayerStruct() { let player1 = Player(kind: .human, name: "Magnus Carlsen", elo: 2900) @@ -19,7 +19,9 @@ final class SwiftChessNeoPlayer: XCTestCase { XCTAssertEqual(player1.kind.isComputer, false) XCTAssertEqual(player3.kind.isHuman, false) XCTAssertEqual(player3.kind.isComputer, true) + XCTAssertEqual(player1, player2) + XCTAssertNotEqual(player1, player3) XCTAssertEqual(player1.kind.description, "Human") XCTAssertEqual(player3.kind.description, "Computer") |