diff options
Diffstat (limited to 'src/testing/test_testing_hello_world.c')
-rw-r--r-- | src/testing/test_testing_hello_world.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/testing/test_testing_hello_world.c b/src/testing/test_testing_hello_world.c index 2ce7b547d..6300e26a4 100644 --- a/src/testing/test_testing_hello_world.c +++ b/src/testing/test_testing_hello_world.c | |||
@@ -25,39 +25,44 @@ | |||
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_testing_ng_lib.h" | 27 | #include "gnunet_testing_ng_lib.h" |
28 | #include "gnunet_util_lib.h" | ||
28 | 29 | ||
29 | /** | 30 | /** |
30 | * Main function that will tell the interpreter what commands to | 31 | * Main function to run the test cases. |
31 | * run. | 32 | * |
33 | * @param cls not used. | ||
32 | * | 34 | * |
33 | * @param cls closure | ||
34 | */ | 35 | */ |
35 | static void | 36 | static void |
36 | run (void *cls, | 37 | run (void *cls) |
37 | struct GNUNET_TESTING_Interpreter *is) | ||
38 | { | 38 | { |
39 | (void *) cls; | ||
39 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); | 40 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); |
40 | 41 | ||
41 | struct GNUNET_TESTING_Command commands[] = { | 42 | struct GNUNET_TESTING_Command commands[] = { |
42 | GNUNET_TESTING_cmd_hello_world_birth ("hello-world-birth-0", | 43 | GNUNET_TESTING_cmd_hello_world_birth ("hello-world-birth-0", |
43 | &now), | 44 | &now), |
44 | GNUNET_TESTING_cmd_hello_world ("hello-world-0",""), | 45 | GNUNET_TESTING_cmd_hello_world ("hello-world-0","hello-world-birth-0",""), |
45 | GNUNET_TESTING_cmd_end () | 46 | GNUNET_TESTING_cmd_end () |
46 | }; | 47 | }; |
47 | 48 | ||
48 | GNUNET_TESTING_run (is, | 49 | GNUNET_TESTING_run (NULL, |
49 | commands, | 50 | commands, |
50 | GNUNET_TIME_UNIT_FOREVER_REL); | 51 | GNUNET_TIME_UNIT_FOREVER_REL); |
51 | } | 52 | } |
52 | 53 | ||
53 | |||
54 | int | 54 | int |
55 | main (int argc, | 55 | main (int argc, |
56 | char *const *argv) | 56 | char *const *argv) |
57 | { | 57 | { |
58 | return GNUNET_TESTING_setup (&run, | 58 | int rv = 0; |
59 | NULL, | 59 | |
60 | NULL, | 60 | GNUNET_log_setup ("test-hello-world", |
61 | NULL, | 61 | "DEBUG", |
62 | GNUNET_NO); | 62 | NULL); |
63 | |||
64 | GNUNET_SCHEDULER_run (&run, | ||
65 | NULL); | ||
66 | |||
67 | return rv; | ||
63 | } | 68 | } |