aboutsummaryrefslogtreecommitdiff
path: root/test_brandt.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-11-01 12:16:12 +0100
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-11-01 12:16:12 +0100
commit257d5b72b07d44bf59f81806ff8352a710a1ac2b (patch)
treed956578010630b0ee195b54f7427e951218dcf2c /test_brandt.c
parent37ac9545eb77ea968a98a29c695dd52ec04cd369 (diff)
test for no bidders
Diffstat (limited to 'test_brandt.c')
-rw-r--r--test_brandt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test_brandt.c b/test_brandt.c
index 0db012c..04226f0 100644
--- a/test_brandt.c
+++ b/test_brandt.c
@@ -65,6 +65,9 @@ expected_outcome (uint16_t i)
uint16_t winners = MIN (tcase.m, tcase.n);
uint16_t cur_winner = 0;
+ if (0 == tcase.n)
+ return NULL;
+
if (0 == tcase.m)
{
for (uint16_t h = 0; h < tcase.n; h++)
@@ -379,6 +382,10 @@ main (int argc, char *argv[])
BRANDT_init (edc);
ret |= 0 ||
+ test_auction (0, 2, NULL, 0, 0) ||
+ test_auction (0, 2, NULL, 0, 1) ||
+ test_auction (0, 2, NULL, 1, 0) ||
+ test_auction (0, 2, NULL, 2, 0) ||
test_auction (2, 2, (uint16_t[]) { 1, 0 }, 1, 0) ||
test_auction (3, 2, (uint16_t[]) { 0, 0, 1 }, 2, 0) ||
test_auction (3, 2, (uint16_t[]) { 0, 1, 1 }, 0, 0) ||