17 private byte[] _bytes;
21 _bytes =
new byte[128];
22 for (
int i = 0; i < _bytes.Length; i++) {
23 _bytes[i] = (byte)
UnityEngine.Random.Range(
int.MinValue,
int.MaxValue);
30 Single expected = BitConverter.ToSingle(_bytes, 0);
31 Single actual = _BitConverterTestMock_.ToSingle(_bytes, 0);
33 Assert.That(actual, Is.EqualTo(expected));
38 Single value = (Single)
UnityEngine.Random.Range(
float.MinValue,
float.MaxValue);
39 var actual = BitConverter.GetBytes(value);
42 _BitConverterTestMock_.GetBytes(value, _bytes, ref offset);
44 Assert.That(offset, Is.EqualTo(actual.Length));
45 Assert.That(_bytes.Take(offset), Is.EquivalentTo(actual));