Mercurial > projects > dstress
annotate run/typeid_74.d @ 342:111c6744074d
typeid(type).tsize == type.sizeof
ahiru <ahiru@1dk.jp>
2005-03-01
news:d015pr$1t80$1@digitaldaemon.com
author | thomask |
---|---|
date | Tue, 22 Mar 2005 08:02:21 +0000 |
parents | c1ca2f37362b |
children | ec6d35cccfb5 |
rev | line source |
---|---|
133 | 1 /* $HeadURL$ |
2 * $Date$ | |
3 * $Author$ | |
4 */ | |
5 | |
6 module dstress.run.typeid_74; | |
7 | |
8 struct MyClass{ | |
9 int dummy; | |
10 } | |
11 | |
12 int main(){ | |
13 TypeInfo ti = typeid(MyClass*); | |
14 assert(!(ti is null)); | |
342 | 15 assert(ti.tsize==(MyClass*).sizeof); |
334
c1ca2f37362b
added TypeInfo.toString checks to detect 'cheating'
thomask
parents:
133
diff
changeset
|
16 assert(ti.toString()=="MyClass*"); |
133 | 17 return 0; |
18 } |