Skip to content
Snippets Groups Projects
Commit a6ea9ee1 authored by Aidan Meara's avatar Aidan Meara
Browse files

continued work

# Conflicts:
#	unit-tests/CMakeLists.txt
parent de71f0df
No related branches found
No related tags found
2 merge requests!17finalize common,!16Draft: Resolve "write_common_tests"
......@@ -2,6 +2,7 @@ project(Wizard-unit-tests)
set(TEST_SOURCE_FILES
card.cpp
deck.cpp
hand.cpp
player.cpp
trick.cpp)
......
......@@ -7,11 +7,21 @@
// new deck must hold 60 cards
TEST(DeckTest, Creation) {
deck mydeck;
ASSERT_EQ(mydeck._all_cards.size(), 60);
deck mydeck;
ASSERT_EQ(mydeck.get_number_of_remaining_cards(), 60);
EXPECT_TRUE(mydeck.is_empty() == false);
}
// can draw trump from new deck
TEST(DeckTest, TrumpDraw) {
deck mydeck;
card* trump;
trump = mydeck.draw_trump();
}
/* A test fixture allows us to reuse the same configuration of objects for all
* tests in a test suite. The name of the fixture must match the test suite.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment