public void SetNormalArrayWithOffsetWorks() { var arr = new Int16Array(6); arr.Set(new short[] { 3, 6, 7 }, 2); AssertContent(arr, new[] { 0, 0, 3, 6, 7, 0 }, "Content"); }
public void SetNormalArrayWorks() { var arr = new Int16Array(4); arr.Set(new short[] { 3, 6, 7 }); AssertContent(arr, new[] { 3, 6, 7, 0 }, "Content"); }
public void Int16SetArray() { var buffer = new ArrayBuffer(4); var i16 = new Int16Array(buffer); i16.Set(new short[] { 1 }, 1); CollectionAssert.AreEqual(new[] { 0, 0, 1, 0 }, buffer.Data); }
public void Int16SetTypedArray() { var buffer = new ArrayBuffer(4); var buffer2 = new ArrayBuffer(2); var arr1 = new Int16Array(buffer); var arr2 = new Int16Array(buffer2); arr2[0] = 1; arr1.Set(arr2, 1); CollectionAssert.AreEqual(new[] { 0, 0, 1, 0 }, buffer.Data); }