Remove struct padding which was making this test fail on 64-bit systems.

This commit is contained in:
Frits van Bommel
2009-03-24 03:14:22 +01:00
parent 058998f1ad
commit 143e95680f

View File

@@ -2,14 +2,14 @@ struct V(T...) {
T v;
}
alias V!(Object, int) MyV;
alias V!(float, int) MyV;
void main()
{
assert(MyV.sizeof == Object.sizeof + int.sizeof);
auto o = new Object;
auto v = MyV(o, 3);
assert(v.v[0] is o);
assert(MyV.sizeof == float.sizeof + int.sizeof);
auto f = 3.75f;
auto v = MyV(f, 3);
assert(v.v[0] == 3.75f);
assert(v.v[1] == 3);
}