1 /** Null character in string tests.
3 storage: data, xdata, code,
7 {storage} char string1[] = "";
8 {storage} char string2[] = "a\0b\0c";
9 {storage} char string3[5] = "a\0b\0c";
14 /* Make sure the strings are the correct size */
15 /* and have the terminating null character */
16 ASSERT(sizeof(string1)==1);
17 ASSERT(sizeof(string2)==6);
18 ASSERT(sizeof(string3)==5);
19 ASSERT(string1[0]==0);
20 ASSERT(string2[5]==0);
22 ASSERT(string2[0]=='a');
23 ASSERT(string2[2]=='b');
24 ASSERT(string2[4]=='c');
31 char * constStr1 = "";
32 char * constStr2 = "a\0b\0c";
34 ASSERT (constStr1[0]==0);
35 ASSERT (constStr2[5]==0);