public unsafe void Test_StructLayout_ii ()
{
for( Int32 i = 0; i < 100; ++ i)
{
Vector4 vec = GetNextRandomVector4();
GCHandle h_vec = GCHandle.Alloc(vec, GCHandleType.Pinned);
IntPtr vecAddress = h_vec.AddrOfPinnedObject();
Single[] data = new Single[4];
// nb: when Fixed32 and Half are moved back into the main
// dev branch there will be need for an extension method for
// Marshal that will perform the copy for those types.
MarshalHelper.Copy(vecAddress, data, 0, 4);
Assert.That(data[0], Is.EqualTo(vec.X));
Assert.That(data[1], Is.EqualTo(vec.Y));
Assert.That(data[2], Is.EqualTo(vec.Z));
Assert.That(data[3], Is.EqualTo(vec.W));
h_vec.Free();
}
}