* fixed all headers to use extern "C" so C/C++ linking will work properly
[libundertow.git] / tests / 000_dispatcher_not_running.c
blob4c0eba0d8df150fc0e24e73f8fa56708909f7d69
1 #include <libundertow.h>
3 #include "testing-common.h"
5 int
6 main (void)
8 lut_errno retval;
10 retval = lut_main_stop();
11 if (retval != LUT_ERROR_DISPATCHER_NOT_RUNNING)
12 die ("lut_main_stop() returned '%s'", lut_strerror (retval));
14 retval = lut_main_defer_with_timeout (0, NULL, NULL, NULL);
15 if (retval != LUT_ERROR_DISPATCHER_NOT_RUNNING)
16 die ("lut_main_defer_with_timeout() returned '%s'", lut_strerror (retval));
18 retval = lut_main_defer (NULL, NULL, NULL);
19 if (retval != LUT_ERROR_DISPATCHER_NOT_RUNNING)
20 die ("lut_main_defer() returned '%s'", lut_strerror (retval));
22 retval = lut_main_cancel_deferred (0);
23 if (retval != LUT_ERROR_DISPATCHER_NOT_RUNNING)
24 die ("lut_main_cancel_deferred() returned '%s'", lut_strerror (retval));
26 return TEST_PASSED;