diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-13 15:18:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-13 15:18:35 +0000 |
commit | 2742cca3d2180b4f615c40609fccf10a806f05c8 (patch) | |
tree | 7a59d0d43951cec4f0edd903f02ead3dbe037a2f /src/util/test_connection_addressing.c | |
parent | 832d12049add37805697104b9f8eaae420eef406 (diff) | |
download | gnunet-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.c | 28 |
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 | */ | ||
181 | static int | ||
182 | check () | ||
183 | { | ||
184 | int ok; | ||
185 | |||
186 | ok = 1; | ||
187 | GNUNET_SCHEDULER_run (&task, &ok); | ||
188 | return ok; | ||
189 | } | ||
190 | |||
191 | |||
192 | |||
193 | int | 176 | int |
194 | main (int argc, char *argv[]) | 177 | main (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 */ |