mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-01 17:49:03 +02:00
Remove struct padding which was making this test fail on 64-bit systems.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user