Skip to content

Commit

Permalink
add DrumTest GoodRandomNumberGeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
yatima1460 committed Oct 1, 2019
1 parent 2259627 commit 3d902ca
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions BingoTest/DrumTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,21 @@ TEST(DrumTest, AllNumbersAreDifferent)
}
}


TEST(DrumTest, GoodRandomNumberGeneration)
{
const size_t testN = 1000;

std::vector<unsigned int> oldArray;


for (size_t i = 0; i < testN; i++)
{
Drum d(testN);
auto newExtracted = d.extract(d.NUMBER_OF_BALLS_AT_CREATION);
EXPECT_EQ(oldArray == newExtracted, false);
oldArray = newExtracted;
}


}

0 comments on commit 3d902ca

Please sign in to comment.