Commit eb0886e0 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

Added test for SET_STATUS1().

parent 8bd189e2
......@@ -520,6 +520,11 @@ void free_events_in_list(struct context *ctx,
void nolog(void *stream, char const *fmt, va_list ap) {}
int check_set_status(int status, char const *phrase)
return status == 200 && strcmp(phrase, sip_200_OK) == 0;
int test_api_errors(struct context *ctx)
......@@ -528,9 +533,16 @@ int test_api_errors(struct context *ctx)
int level;
int status; char const *phrase;
if (print_headings)
printf("TEST NUA-1.0: test API\n");
/* This is a nasty macro. Test it. */
#define SET_STATUS1(x) ((status = x), status), (phrase = ((void)x))
TEST(status, 200); TEST_S(phrase, sip_200_OK);
level = nua_log->log_level;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment