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_plugin.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_plugin.c')
-rw-r--r-- | src/util/test_plugin.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/util/test_plugin.c b/src/util/test_plugin.c index 428cdaffb..122d5f480 100644 --- a/src/util/test_plugin.c +++ b/src/util/test_plugin.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_plugin_lib.h" | 25 | #include "gnunet_plugin_lib.h" |
26 | 26 | ||
27 | #define VERBOSE GNUNET_NO | ||
28 | 27 | ||
29 | static void | 28 | static void |
30 | test_cb (void *cls, const char *libname, void *lib_ret) | 29 | test_cb (void *cls, const char *libname, void *lib_ret) |
@@ -39,11 +38,12 @@ test_cb (void *cls, const char *libname, void *lib_ret) | |||
39 | } | 38 | } |
40 | 39 | ||
41 | 40 | ||
42 | static int | 41 | int |
43 | check () | 42 | main (int argc, char *argv[]) |
44 | { | 43 | { |
45 | void *ret; | 44 | void *ret; |
46 | 45 | ||
46 | GNUNET_log_setup ("test-plugin", "WARNING", NULL); | ||
47 | GNUNET_log_skip (1, GNUNET_NO); | 47 | GNUNET_log_skip (1, GNUNET_NO); |
48 | ret = GNUNET_PLUGIN_load ("libgnunet_plugin_missing", NULL); | 48 | ret = GNUNET_PLUGIN_load ("libgnunet_plugin_missing", NULL); |
49 | GNUNET_log_skip (0, GNUNET_NO); | 49 | GNUNET_log_skip (0, GNUNET_NO); |
@@ -52,7 +52,7 @@ check () | |||
52 | ret = GNUNET_PLUGIN_load ("libgnunet_plugin_test", "in"); | 52 | ret = GNUNET_PLUGIN_load ("libgnunet_plugin_test", "in"); |
53 | if (ret == NULL) | 53 | if (ret == NULL) |
54 | return 1; | 54 | return 1; |
55 | if (0 != strcmp (ret, "Hello")) | 55 | if (0 != strcmp (ret, "Hello")) |
56 | return 2; | 56 | return 2; |
57 | ret = GNUNET_PLUGIN_unload ("libgnunet_plugin_test", "out"); | 57 | ret = GNUNET_PLUGIN_unload ("libgnunet_plugin_test", "out"); |
58 | if (ret == NULL) | 58 | if (ret == NULL) |
@@ -60,20 +60,8 @@ check () | |||
60 | if (0 != strcmp (ret, "World")) | 60 | if (0 != strcmp (ret, "World")) |
61 | return 4; | 61 | return 4; |
62 | free (ret); | 62 | free (ret); |
63 | |||
64 | GNUNET_PLUGIN_load_all ("libgnunet_plugin_tes", "in", &test_cb, "test"); | 63 | GNUNET_PLUGIN_load_all ("libgnunet_plugin_tes", "in", &test_cb, "test"); |
65 | return 0; | 64 | return 0; |
66 | } | 65 | } |
67 | 66 | ||
68 | int | ||
69 | main (int argc, char *argv[]) | ||
70 | { | ||
71 | int ret; | ||
72 | |||
73 | GNUNET_log_setup ("test-plugin", "WARNING", NULL); | ||
74 | ret = check (); | ||
75 | |||
76 | return ret; | ||
77 | } | ||
78 | |||
79 | /* end of test_plugin.c */ | 67 | /* end of test_plugin.c */ |