0044-wcslen.c - scc - simple c99 compiler
HTML git clone git://git.simple-cc.org/scc
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
0044-wcslen.c (375B)
---
1 #include <assert.h>
2 #include <stdio.h>
3 #include <wchar.h>
4
5 /*
6 output:
7 testing
8 done
9 end:
10 */
11
12 int
13 main(void)
14 {
15 wchar_t t1[] = {0, 0};
16 wchar_t t2[] = {0};
17 wchar_t t3[] = {0x31, 0};
18 wchar_t t4[] = {0x31, 0x32, 0, 0x33, 0};
19
20 puts("testing");
21 assert(wcslen(t1) == 0);
22 assert(wcslen(t2) == 0);
23 assert(wcslen(t3) == 1);
24 assert(wcslen(t4) == 2);
25 puts("done");
26
27 return 0;
28 }