mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-13 05:20:00 -08:00
[Tests] Format the zone dump helper and its tests to clang-format
This commit is contained in:
parent
8405b491b3
commit
86ae4a0c6b
2 changed files with 19 additions and 20 deletions
|
|
@ -3,11 +3,11 @@
|
|||
* @ingroup Tests
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <climits>
|
||||
#include <vector>
|
||||
#include <libcockatrice/network/server/remote/game/dump_zone_range.h>
|
||||
#include <QList>
|
||||
#include <climits>
|
||||
#include <gtest/gtest.h>
|
||||
#include <libcockatrice/network/server/remote/game/dump_zone_range.h>
|
||||
#include <vector>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
@ -108,15 +108,14 @@ TEST(ServerDumpZone, NonPositiveCardCountYieldsAnEmptyRange)
|
|||
TEST(ServerDumpZone, ResolvedRangeIsAlwaysWithinTheZone)
|
||||
{
|
||||
const QList<int> cardCounts = {0, 1, 2, 3, 7, 60, 1000000};
|
||||
const QList<int> requests = { INT_MIN, -1000, -2, -1, 0, 1, 2, 3,
|
||||
59, 60, 61, 999999, INT_MAX };
|
||||
const QList<int> requests = {INT_MIN, -1000, -2, -1, 0, 1, 2, 3, 59, 60, 61, 999999, INT_MAX};
|
||||
|
||||
for (int cardCount : cardCounts) {
|
||||
for (int request : requests) {
|
||||
for (bool isReversed : {false, true}) {
|
||||
const auto [begin, end] = dumpZoneCardRange(cardCount, request, isReversed);
|
||||
SCOPED_TRACE(testing::Message() << "cardCount=" << cardCount << " request=" << request
|
||||
<< " isReversed=" << isReversed);
|
||||
SCOPED_TRACE(testing::Message()
|
||||
<< "cardCount=" << cardCount << " request=" << request << " isReversed=" << isReversed);
|
||||
ASSERT_GE(begin, 0);
|
||||
ASSERT_GE(end, begin);
|
||||
ASSERT_LE(end, cardCount);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue