Skip to content

Commit

Permalink
Added tests for individual dice rolls.
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroalhonen committed Jun 11, 2021
1 parent 15ae4af commit 9bd3350
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Tests/NiftyDiceRollerTests/NiftyDiceRollerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ import XCTest
@testable import NiftyDiceRoller

final class NiftyDiceRollerTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
func testDiceRolls() {
XCTAssertTrue(diceRoll(dice: .d4) <= 4)
XCTAssertTrue(diceRoll(dice: .d6) <= 6)
XCTAssertTrue(diceRoll(dice: .d8) <= 8)
XCTAssertTrue(diceRoll(dice: .d10) <= 10)
XCTAssertTrue(diceRoll(dice: .d12) <= 12)
XCTAssertTrue(diceRoll(dice: .d20) <= 20)
XCTAssertTrue(diceRoll(dice: .d100) <= 100)
}

static var allTests = [
("testExample", testExample),
("testExample", testDiceRolls),
]
}

0 comments on commit 9bd3350

Please sign in to comment.