Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
sofia-sip
Commits
eb0886e0
Commit
eb0886e0
authored
Oct 28, 2005
by
Pekka Pessi
Browse files
Added test for SET_STATUS1().
darcs-hash:20051028162527-65a35-cc1d2238f03772bb858d62afb3a6973e5ad54efd.gz
parent
8bd189e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
libsofia-sip-ua/nua/test_nua.c
libsofia-sip-ua/nua/test_nua.c
+12
-0
No files found.
libsofia-sip-ua/nua/test_nua.c
View file @
eb0886e0
...
...
@@ -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
)
{
BEGIN
();
...
...
@@ -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_1
(
check_set_status
(
SET_STATUS1
(
SIP_200_OK
)));
TEST
(
status
,
200
);
TEST_S
(
phrase
,
sip_200_OK
);
su_log_init
(
nua_log
);
level
=
nua_log
->
log_level
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment