상속: ArrayBufferView
예제 #1
0
 public void TestCtorArrayBufferOffsetLength() {
     Action f = () => {
         var a = new UInt8Array(new byte[] { 1, 2, 3, 4 });
         var v = new DataView(a.Buffer, 1, 1);
         Done(v.ByteLength == 1 && v.GetUInt8(0) == 2);
     };
     this.Start(f);
 }
예제 #2
0
 public void TestCtorArrayBuffer() {
     Action f = () => {
         var a = new UInt8Array(new byte[] { 1, 2, 3, 4 });
         var v = new DataView(a.Buffer);
         Done(v.GetUInt16(0) == 0x0102);
     };
     this.Start(f);
 }
예제 #3
0
 public void TestSetGetUInt16() {
     Action f = () => {
         var b = new ArrayBuffer(16);
         var v = new DataView(b);
         v.SetUInt16(0, 5);
         v.SetUInt16(8, 6);
         Done(v.GetUInt16(0) == 5 && v.GetUInt16(8) == 6);
     };
     this.Start(f);
 }