Exemplo n.º 1
0
        public void TestRandomValues_i()
        {
            var rand = new System.Random();
            var buff = new Byte[8];

            for(Int32 i = 0; i < Settings.NumTests; ++i)
            {
                rand.NextBytes(buff);
                UInt64 packed = BitConverter.ToUInt64(buff, 0);
                var packedObj = new Rgba64();
                packedObj.PackedValue = packed;
                Single realR, realG, realB, realA = 0f;
                packedObj.UnpackTo(out realR, out realG, out realB, out realA);
                var newPackedObj = new Rgba64(realR, realG, realB, realA);
                Assert.That(newPackedObj.PackedValue, Is.EqualTo(packed));
            }
        }