Tests: old deck and Earlier tests follow the new behaviour
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9b68da43d8
commit
cffaa8f3e3
2 changed files with 6 additions and 5 deletions
|
|
@ -248,7 +248,7 @@ func _test_replace() -> void:
|
|||
_check(second != null and second != first, "the new roll opens its own pop-up")
|
||||
_check(not is_instance_valid(first) or first.is_queued_for_deletion(), "the old pop-up goes away")
|
||||
_check(not main.current.has("halted"), "the old roll doesn't overwrite the new one")
|
||||
_eq(main.history.size(), history, "the replaced (unanswered) roll isn't added to Earlier")
|
||||
_eq(main.history.size(), history + 1, "the replaced (unanswered) roll moves to Earlier (Robin, 2026-12-01)")
|
||||
if second == null:
|
||||
return
|
||||
second._text.text = "Cy"
|
||||
|
|
|
|||
|
|
@ -217,8 +217,9 @@ func _test_cards() -> void:
|
|||
# Edits.
|
||||
t.deck_empty = "reshuffle"
|
||||
var d3 := DeckState.new()
|
||||
for i in 4:
|
||||
d3.draw(t, r)
|
||||
for entry in t.entries:
|
||||
for copy in d3.copies_of(t, entry):
|
||||
d3.take(entry)
|
||||
_check(d3.cards_left(t) == Vector2i(0, 4), "fully drawn deck")
|
||||
t.entries[0].weight = 3
|
||||
_check(d3.cards_left(t) == Vector2i(2, 6), "raising a weight adds copies")
|
||||
|
|
@ -226,8 +227,8 @@ func _test_cards() -> void:
|
|||
_check(d3.cards_left(t) == Vector2i(3, 7), "new entries start undrawn")
|
||||
t.entries.remove_at(1)
|
||||
_check(d3.cards_left(t) == Vector2i(3, 5), "deleted entries drop out")
|
||||
var first := d3.draw(t, r)
|
||||
_check(first.has("index"), "can still draw after edits")
|
||||
d3.take(t.entries[0])
|
||||
_check(d3.cards_left(t) == Vector2i(2, 5), "can still draw after edits")
|
||||
t.entries[0].weight = 1
|
||||
_check(d3.cards_left(t).x == 1 and d3.cards_left(t).y == 3, "lowering a weight removes copies (%s)" % str(d3.cards_left(t)))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue