Sign in
llvm
/
llvm-project
/
41d59a36459ea99ada4819a26072366f77484f87
/
.
/
compiler-rt
/
test
/
sanitizer_common
/
TestCases
/
wctomb.c
blob: 87089d2ce489ee70d75a3d15042d2e25d39ba8c2 [
file
] [
log
] [
blame
]
// RUN: %clang %s -o %t && %run %t 2>&1
#include
<assert.h>
#include
<stdlib.h>
int
main
(
int
argc
,
char
**
argv
)
{
char
buff
[
10
];
wchar_t
x
=
L
'a'
;
wctomb
(
NULL
,
x
);
int
res
=
wctomb
(
buff
,
x
);
assert
(
res
==
1
);
assert
(
buff
[
0
]
==
'a'
);
return
0
;
}