Files
Cockatrice/tests/loading_from_clipboard/clipboard_testing.h
ebbit1q 521046fb09 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
2025-12-23 17:48:10 +01:00

28 lines
807 B
C++

#ifndef CLIPBOARD_TESTING_H
#define CLIPBOARD_TESTING_H
#include "gtest/gtest.h"
#include <libcockatrice/deck_list/deck_list.h>
// using std types because qt types aren't understood by gtest (without this you'll get less nice errors)
using CardRows = QVector<std::pair<std::string, int>>;
struct Result
{
std::string name;
std::string comments;
CardRows mainboard;
CardRows sideboard;
Result(std::string _name, std::string _comments, CardRows _mainboard, CardRows _sideboard)
: name(_name), comments(_comments), mainboard(_mainboard), sideboard(_sideboard)
{
}
};
void testEmpty(const QString &clipboard);
void testHash(const QString &clipboard, const std::string &hash);
void testDeck(const QString &clipboard, const Result &result);
#endif // CLIPBOARD_TESTING_H