mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-07 05:53:59 -07:00
update unit test
This commit is contained in:
parent
e594076338
commit
d1e7f716d8
2 changed files with 3 additions and 2 deletions
|
|
@ -10,6 +10,6 @@ set(TEST_QT_MODULES ${COCKATRICE_QT_VERSION_NAME}::Concurrent ${COCKATRICE_QT_VE
|
|||
)
|
||||
|
||||
target_link_libraries(
|
||||
loading_from_clipboard_test libcockatrice_deck_list Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
loading_from_clipboard_test libcockatrice_deck_list libcockatrice_card Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES}
|
||||
)
|
||||
add_test(NAME loading_from_clipboard_test COMMAND loading_from_clipboard_test)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "clipboard_testing.h"
|
||||
|
||||
#include <QTextStream>
|
||||
#include <libcockatrice/card/import/card_name_normalizer.h>
|
||||
#include <libcockatrice/deck_list/tree/deck_list_card_node.h>
|
||||
|
||||
DeckList getDeckList(const QString &clipboard)
|
||||
|
|
@ -8,7 +9,7 @@ DeckList getDeckList(const QString &clipboard)
|
|||
DeckList deckList;
|
||||
QString cp(clipboard);
|
||||
QTextStream stream(&cp); // text stream requires local copy
|
||||
deckList.loadFromStream_Plain(stream, false, [](auto s) { return s; });
|
||||
deckList.loadFromStream_Plain(stream, false, CardNameNormalizer());
|
||||
return deckList;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue