Mercurial > projects > ldc
annotate tests/mini/classinfo3.d @ 445:cc40db549aea
Changed the handling of variadic intrinsics a bit.
Removed the -fp80 option and made real be 80bit floats on X86, this is what the D spec really says it should be and fixes a bunch of issues.
Changed the handling of parameter attributes to a bit more generalized approach.
Added sext/zext attributes for byte/short/ubyte/ushort parameters, fixes #60 .
Parameter attribs now properly set for intrinsic calls if necessary.
Made the tango.math.Math patch less intrusive.
Fixed/added some mini tests.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Fri, 01 Aug 2008 17:59:58 +0200 |
parents | 1bb99290e03a |
children | 8f0b24bc55f0 |
rev | line source |
---|---|
110 | 1 module classinfo3; |
2 | |
3 class C | |
4 { | |
5 int i; | |
6 float f; | |
7 long l; | |
8 int j; | |
9 } | |
10 | |
11 void main() | |
12 { | |
13 auto c = C.classinfo; | |
14 assert(c.offTi !is null); | |
15 assert(c.offTi.length == 4); | |
16 | |
17 size_t base = 2*size_t.sizeof; | |
18 | |
19 assert(c.offTi[0].offset == base); | |
20 assert(c.offTi[0].ti == typeid(int)); | |
21 assert(c.offTi[1].offset == base+4); | |
22 assert(c.offTi[1].ti == typeid(float)); | |
23 assert(c.offTi[2].offset == base+8); | |
24 assert(c.offTi[2].ti == typeid(long)); | |
25 assert(c.offTi[3].offset == base+16); | |
26 assert(c.offTi[3].ti == typeid(int)); | |
27 } |