Debian Codegraph @

compiler-rt/test/sanitizer_common/TestCases/wctomb.c

raw
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 }