Mercurial > projects > dstress
comparison run/Alternate_Wysiwyg_String_01.d @ 1559:ec5e144583ea
D1 -> D2 : 1/N
author | thomask |
---|---|
date | Sun, 19 Aug 2007 19:11:54 +0000 |
parents | f87ba6507260 |
children | 36bedfa079e6 |
comparison
equal
deleted
inserted
replaced
1558:d40d75fcd5c5 | 1559:ec5e144583ea |
---|---|
3 // $Author$ | 3 // $Author$ |
4 | 4 |
5 module dstress.run.Alternate_Wysiwyg_String_01; | 5 module dstress.run.Alternate_Wysiwyg_String_01; |
6 | 6 |
7 int main(){ | 7 int main(){ |
8 char[] string=`hello`; | 8 string string=`hello`; |
9 assert(string.length==5); | 9 if(5 != string.length){ assert(0); } |
10 assert(string[0]=='h'); | 10 if('h' != string[0]){ assert(0); } |
11 assert(string[1]=='e'); | 11 if('e' != string[1]){ assert(0); } |
12 assert(string[2]=='l'); | 12 if('l' != string[2]){ assert(0); } |
13 assert(string[3]=='l'); | 13 if('l' != string[3]){ assert(0); } |
14 assert(string[4]=='o'); | 14 if('o' != string[4]){ assert(0); } |
15 return 0; | 15 return 0; |
16 } | 16 } |