Skip to content

Commit ae99d6b

Browse files
CopilotSteake
andcommitted
fix: Handle hash equality case in lexicographic_ordering test
Co-authored-by: Steake <530040+Steake@users.noreply.github.com>
1 parent 01ddbe3 commit ae99d6b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

crates/bitcell-ca/src/battle.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,11 @@ mod tests {
820820

821821
if hash_a < hash_b {
822822
assert_eq!(outcome, BattleOutcome::AWins);
823-
} else {
823+
} else if hash_a > hash_b {
824824
assert_eq!(outcome, BattleOutcome::BWins);
825+
} else {
826+
// If hashes are equal, lexicographic_break returns AWins
827+
assert_eq!(outcome, BattleOutcome::AWins);
825828
}
826829
}
827830
}

0 commit comments

Comments
 (0)