aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_connection_addressing.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-13 15:18:35 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-13 15:18:35 +0000
commit2742cca3d2180b4f615c40609fccf10a806f05c8 (patch)
tree7a59d0d43951cec4f0edd903f02ead3dbe037a2f /src/util/test_connection_addressing.c
parent832d12049add37805697104b9f8eaae420eef406 (diff)
downloadgnunet-2742cca3d2180b4f615c40609fccf10a806f05c8.tar.gz
gnunet-2742cca3d2180b4f615c40609fccf10a806f05c8.zip
-cleaning up VERBOSE and check nonsense in util tests
Diffstat (limited to 'src/util/test_connection_addressing.c')
-rw-r--r--src/util/test_connection_addressing.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/util/test_connection_addressing.c b/src/util/test_connection_addressing.c
index ba7acaefc..e5c8edeeb 100644
--- a/src/util/test_connection_addressing.c
+++ b/src/util/test_connection_addressing.c
@@ -27,7 +27,6 @@
27#include "gnunet_scheduler_lib.h" 27#include "gnunet_scheduler_lib.h"
28#include "gnunet_time_lib.h" 28#include "gnunet_time_lib.h"
29 29
30#define VERBOSE GNUNET_NO
31 30
32#define PORT 12435 31#define PORT 12435
33 32
@@ -174,36 +173,17 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
174} 173}
175 174
176 175
177/**
178 * Main method, starts scheduler with task ,
179 * checks that "ok" is correct at the end.
180 */
181static int
182check ()
183{
184 int ok;
185
186 ok = 1;
187 GNUNET_SCHEDULER_run (&task, &ok);
188 return ok;
189}
190
191
192
193int 176int
194main (int argc, char *argv[]) 177main (int argc, char *argv[])
195{ 178{
196 int ret = 0; 179 int ok;
197 180
198 GNUNET_log_setup ("test_connection_addressing", 181 GNUNET_log_setup ("test_connection_addressing",
199#if VERBOSE
200 "DEBUG",
201#else
202 "WARNING", 182 "WARNING",
203#endif
204 NULL); 183 NULL);
205 ret += check (); 184 ok = 1;
206 return ret; 185 GNUNET_SCHEDULER_run (&task, &ok);
186 return ok;
207} 187}
208 188
209/* end of test_connection_addressing.c */ 189/* end of test_connection_addressing.c */