Hashing tests (#5026)

* add deck hashing tests

* format

* fix header

* fix cmakelists

* fix test

* add 5 second timeout to test

let the optimising begin

* expand tests

* remove debug message

* manually format

* I installed cmake format from the aur

* use decklist library

* format
This commit is contained in:
ebbit1q 2025-12-23 17:48:10 +01:00 committed by GitHub
parent 421d6b334a
commit 521046fb09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 124 additions and 8 deletions

View file

@ -203,6 +203,22 @@ TEST(LoadingFromClipboardTest, emptyMainBoard)
testEmpty(clipboard);
}
TEST(LoadingFromClipboardTest, emptyHash)
{
QString clipboard("");
testHash(clipboard, "r8sq7riu");
}
TEST(LoadingFromClipboardTest, deckHash)
{
QString clipboard("1 Mountain\n"
"2 Island\n"
"SB: 3 Forest\n");
testHash(clipboard, "5cac19qm");
}
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);