Mercurial > projects > dstress
comparison run/typeid_26.d @ 1086:7e8e5013a030
gdc-0.19 review
author | thomask |
---|---|
date | Tue, 18 Jul 2006 22:51:49 +0000 |
parents | 0db095345640 |
children |
comparison
equal
deleted
inserted
replaced
1085:98f634622849 | 1086:7e8e5013a030 |
---|---|
5 | 5 |
6 module dstress.run.typeid_26; | 6 module dstress.run.typeid_26; |
7 | 7 |
8 int main(){ | 8 int main(){ |
9 TypeInfo ti = typeid(short[]); | 9 TypeInfo ti = typeid(short[]); |
10 assert(!(ti is null)); | 10 if(ti is null){ |
11 assert(ti); | 11 assert(0); |
12 assert(ti.tsize==(short[]).sizeof); | 12 } |
13 assert(ti.toString()=="short[]"); | 13 if(!ti){ |
14 assert(0); | |
15 } | |
16 if(ti.tsize != (short[]).sizeof){ | |
17 assert(0); | |
18 } | |
19 if(ti.toString() != "short[]"){ | |
20 assert(0); | |
21 } | |
14 | 22 |
15 TypeInfo_Array ta = cast(TypeInfo_Array) ti; | 23 TypeInfo_Array ta = cast(TypeInfo_Array) ti; |
16 assert(!(ta is null)); | 24 if(ta is null){ |
17 assert(ta); | 25 assert(0); |
18 assert(ta.tsize==(short[]).sizeof); | 26 } |
19 assert(ta.toString()=="short[]"); | 27 if(!ta){ |
28 assert(0); | |
29 } | |
30 if(ta.tsize != (short[]).sizeof){ | |
31 assert(0); | |
32 } | |
33 if(ta.toString() != "short[]"){ | |
34 assert(0); | |
35 } | |
20 | 36 |
21 return 0; | 37 return 0; |
22 } | 38 } |