repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
compiler-rt
/
test
/
sanitizer_common
/
TestCases
/
wctomb.c
blob
87089d2ce489ee70d75a3d15042d2e25d39ba8c2
1
// RUN: %clang %s -o %t && %run %t 2>&1
2
3
#include <assert.h>
4
#include <stdlib.h>
5
6
int
main
(
int
argc
,
char
**
argv
) {
7
char
buff
[
10
];
8
wchar_t
x
=
L
'a'
;
9
wctomb
(
NULL
,
x
);
10
int
res
=
wctomb
(
buff
,
x
);
11
assert
(
res
==
1
);
12
assert
(
buff
[
0
] ==
'a'
);
13
return
0
;
14
}