From 97998126b99500ba793a7a30c61d2991337182e5 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 17 Apr 2024 17:07:33 -0600 Subject: add tests --- Tests/SwiftChessNeoTests/PlayerTests.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Tests/SwiftChessNeoTests/PlayerTests.swift') 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") -- cgit v1.2.3