summaryrefslogtreecommitdiff
path: root/src/testing/test_testing_hello_world.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-03-15 10:45:45 +0100
committert3sserakt <t3ss@posteo.de>2021-03-15 10:45:45 +0100
commita550f7863bff0792c8972609869d409b77efc1dd (patch)
tree3e176423be8a3bdafb16d8891ebc3befc7fe3ffe /src/testing/test_testing_hello_world.c
parentb47586e76bc4f3c2c4ab6829028b5dd2f03e702d (diff)
- added hello world test with command style
Diffstat (limited to 'src/testing/test_testing_hello_world.c')
-rw-r--r--src/testing/test_testing_hello_world.c31
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 @@
*/
#include "platform.h"
#include "gnunet_testing_ng_lib.h"
+#include "gnunet_util_lib.h"
/**
- * Main function that will tell the interpreter what commands to
- * run.
+ * Main function to run the test cases.
+ *
+ * @param cls not used.
*
- * @param cls closure
*/
static void
-run (void *cls,
- struct GNUNET_TESTING_Interpreter *is)
+run (void *cls)
{
+ (void *) cls;
struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
struct GNUNET_TESTING_Command commands[] = {
GNUNET_TESTING_cmd_hello_world_birth ("hello-world-birth-0",
&now),
- GNUNET_TESTING_cmd_hello_world ("hello-world-0",""),
+ GNUNET_TESTING_cmd_hello_world ("hello-world-0","hello-world-birth-0",""),
GNUNET_TESTING_cmd_end ()
};
- GNUNET_TESTING_run (is,
+ GNUNET_TESTING_run (NULL,
commands,
GNUNET_TIME_UNIT_FOREVER_REL);
}
-
int
main (int argc,
char *const *argv)
{
- return GNUNET_TESTING_setup (&run,
- NULL,
- NULL,
- NULL,
- GNUNET_NO);
+ int rv = 0;
+
+ GNUNET_log_setup ("test-hello-world",
+ "DEBUG",
+ NULL);
+
+ GNUNET_SCHEDULER_run (&run,
+ NULL);
+
+ return rv;
}