This commit is contained in:
ebbit1q 2025-10-03 13:38:18 +02:00
parent 670d868e6d
commit 0b8a77ada5

View file

@ -10,7 +10,8 @@ TEST(DeckHashTest, RepeatTest)
DeckList decklist(
R"(<?xml version="1.0"?><cockatrice_deck version="1"><deckname></deckname><comments></comments><zone name="main"><card number="1" name="Mountain"/><card number="2" name="Island"/></zone><zone name="side"><card number="3" name="Forest"/></zone></cockatrice_deck>)");
for (int i = 0; i < 1e6; ++i) { // repeat hashing a million times
decklist.updateDeckHash();
decklist.getDeckHash();
decklist.refreshDeckHash();
}
auto hash = decklist.getDeckHash().toStdString();
ASSERT_EQ(hash, "5cac19qm") << "The hash matches";