fix tests

This commit is contained in:
Rory Hinnen
2026-09-08 16:38:09 -05:00
parent 178123c944
commit 241a753879
5 changed files with 68 additions and 31 deletions
+3 -3
View File
@@ -203,8 +203,8 @@ struct RerollTests {
var d = Dice()
d.one = 2; d.two = 2; d.three = 2; d.six = 4
d.rerollBelow(cutoff: 4)
// The 4 sixes were not in the reroll range and should be unchanged
#expect(d.six == 4)
// Sixes were not in the reroll range; rerolled dice may also produce sixes
#expect(d.six >= 4)
}
@Test("applyReroll: none mode leaves hasRerolled false")
@@ -266,7 +266,7 @@ struct RerollTests {
let total = roll.dice.one + roll.dice.two + roll.dice.three +
roll.dice.four + roll.dice.five + roll.dice.six
#expect(total == 5)
#expect(roll.dice.six == 2) // dice above cutoff are untouched
#expect(roll.dice.six >= 2) // dice above cutoff are untouched; rerolls may also produce sixes
}
@Test("resetPool: clears hitHasRerolled flag")