aboutsummaryrefslogtreecommitdiff
path: root/test_brandt.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-08-17 17:37:56 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-08-17 17:37:56 +0200
commitec43082b1adfa394184900d49f5fe816dba749ec (patch)
tree2c542044512484a9a29e15d1cfb9c3fef7129cb6 /test_brandt.c
parent6eb35ae72f4e579bd094f630b6b9d3d042432ae3 (diff)
downloadlibbrandt-ec43082b1adfa394184900d49f5fe816dba749ec.tar.gz
libbrandt-ec43082b1adfa394184900d49f5fe816dba749ec.zip
add start callback and further basic tests
Diffstat (limited to 'test_brandt.c')
-rw-r--r--test_brandt.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test_brandt.c b/test_brandt.c
index 17f1d10..c5a8d3b 100644
--- a/test_brandt.c
+++ b/test_brandt.c
@@ -43,6 +43,7 @@ run_new_join (void *arg)
43 ad_seller = BRANDT_new (NULL, 43 ad_seller = BRANDT_new (NULL,
44 NULL, 44 NULL,
45 NULL, 45 NULL,
46 NULL,
46 &desc, 47 &desc,
47 &desc_len, 48 &desc_len,
48 description, 49 description,
@@ -75,6 +76,21 @@ run_new_join (void *arg)
75 return; 76 return;
76 } 77 }
77 78
79 if (ad_seller->k != ad_bidder->k ||
80 ad_seller->m != ad_bidder->m ||
81 ad_seller->outcome_public != ad_bidder->outcome_public ||
82 ad_seller->time_start.abs_value_us
83 != ad_bidder->time_start.abs_value_us ||
84 ad_seller->time_round.rel_value_us
85 != ad_bidder->time_round.rel_value_us ||
86 !ad_seller->seller_mode ||
87 ad_bidder->seller_mode)
88 {
89 weprintf ("error/mismatch in basic auction data");
90 *ret = 0;
91 return;
92 }
93
78 BRANDT_destroy (ad_seller); 94 BRANDT_destroy (ad_seller);
79 BRANDT_destroy (ad_bidder); 95 BRANDT_destroy (ad_bidder);
80 96