ReactOS
0.4.16-dev-550-g2186ce3
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
_vscprintf.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS api tests
3
* LICENSE: GPL - See COPYING in the top level directory
4
* PURPOSE: Test for _vscprintf
5
*/
6
7
#include <
apitest.h
>
8
9
#include <stdio.h>
10
#include <tchar.h>
11
#include <errno.h>
12
13
static
void
call_varargs
(
int
expected_ret,
LPCSTR
formatString, ...)
14
{
15
va_list
args
;
16
int
ret
;
17
/* Test the basic functionality */
18
va_start
(
args
, formatString);
19
ret
=
_vscprintf
(formatString,
args
);
20
va_end
(
args
);
21
ok
(expected_ret ==
ret
,
"Test failed: expected %i, got %i.\n"
, expected_ret,
ret
);
22
}
23
24
START_TEST
(
_vscprintf
)
25
{
26
/* Here you can mix wide and ANSI strings */
27
call_varargs
(12,
"%S world!"
,
L
"hello"
);
28
call_varargs
(12,
"%s world!"
,
"hello"
);
29
call_varargs
(11,
"%u cookies"
, 100);
30
/* Do not test NULL argument. That is verified to SEGV on a */
31
/* release-build with VC10 and MS' msvcrt. */
32
}
va_list
char * va_list
Definition:
acmsvcex.h:78
va_end
#define va_end(ap)
Definition:
acmsvcex.h:90
va_start
#define va_start(ap, A)
Definition:
acmsvcex.h:91
apitest.h
ok
#define ok(value,...)
Definition:
atltest.h:57
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
_vscprintf
_Check_return_ _CRTIMP int __cdecl _vscprintf(_In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
call_varargs
static void call_varargs(int expected_ret, LPCSTR formatString,...)
Definition:
_vscprintf.c:13
L
#define L(x)
Definition:
ntvdm.h:50
args
#define args
Definition:
format.c:66
args
Definition:
match.c:390
ret
int ret
Definition:
wcstombs-tests.c:31
LPCSTR
const char * LPCSTR
Definition:
xmlstorage.h:183
modules
rostests
apitests
crt
_vscprintf.c
Generated on Mon Jan 20 2025 06:13:44 for ReactOS by
1.9.6