Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
vector<Card> cards = ...
for (i = 0; i < cards.length(); i++)
{
Assert(card[i].value == i % 13);
Assert(card[i].suit == i / 13);
}
vector<Card> cards = ...
AssertSorted(cards,
[](auto& _) { return _.value; },
[](auto& _) { return _.suit; });
vector<Card> cards = ...
AssertCardsSortedLikeANewBox(cards);
DeckOfCards cards = ...
Assert(cards.AreSortedLikeANewBox());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment