blob: 2cc4d0540029e73d7f939db49693e4483ba3b59d [file] [log] [blame]
Test DataView.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Test for constructor not called as a function
PASS DataView(new ArrayBuffer) threw exception
Test for constructor taking 1 argument
PASS view = new DataView(arrayBuffer) is defined.
PASS view.byteOffset is 0
PASS view.byteLength is 2
Test for constructor taking 2 arguments
PASS view = new DataView(arrayBuffer, 1) is defined.
PASS view.byteOffset is 1
PASS view.byteLength is 1
Test for constructor taking 3 arguments
PASS view = new DataView(arrayBuffer, 0, 1) is defined.
PASS view.byteOffset is 0
PASS view.byteLength is 1
Test for constructor throwing exception
PASS view = new DataView(arrayBuffer, 0, 3) threw exception RangeError: Length out of range of buffer.
PASS view = new DataView(arrayBuffer, 1, 2) threw exception RangeError: Length out of range of buffer.
PASS view = new DataView(arrayBuffer, 2, 1) threw exception RangeError: Length out of range of buffer.
Test for constructor throwing wrong byteoffset exception
PASS view = new Int32Array(new ArrayBuffer(100), 1, 1) threw exception RangeError: Byte offset is not aligned.
Test for constructor wrong length exception takes precedence over wrong byteoffset exception
PASS view = new Int32Array(new ArrayBuffer(100), 1, 101) threw exception RangeError: Length out of range of buffer.
Test for get methods that work
PASS view.getInt8(0) is 0
PASS view.getInt8(8) is -128
PASS view.getInt8(15) is -1
PASS view.getUint8(0) is 0
PASS view.getUint8(8) is 128
PASS view.getUint8(15) is 255
PASS view.getInt16(0, true) is 256
PASS view.getInt16(5, true) is 26213
PASS view.getInt16(9, true) is -32127
PASS view.getInt16(14, true) is -2
PASS view.getInt16(0) is 1
PASS view.getInt16(5) is 25958
PASS view.getInt16(9) is -32382
PASS view.getInt16(14) is -257
PASS view.getUint16(0, true) is 256
PASS view.getUint16(5, true) is 26213
PASS view.getUint16(9, true) is 33409
PASS view.getUint16(14, true) is 65534
PASS view.getUint16(0) is 1
PASS view.getUint16(5) is 25958
PASS view.getUint16(9) is 33154
PASS view.getUint16(14) is 65279
PASS view.getInt32(0, true) is 50462976
PASS view.getInt32(3, true) is 1717920771
PASS view.getInt32(6, true) is -2122291354
PASS view.getInt32(9, true) is -58490239
PASS view.getInt32(12, true) is -66052
PASS view.getInt32(0) is 66051
PASS view.getInt32(3) is 56911206
PASS view.getInt32(6) is 1718059137
PASS view.getInt32(9) is -2122152964
PASS view.getInt32(12) is -50462977
PASS view.getUint32(0, true) is 50462976
PASS view.getUint32(3, true) is 1717920771
PASS view.getUint32(6, true) is 2172675942
PASS view.getUint32(9, true) is 4236477057
PASS view.getUint32(12, true) is 4294901244
PASS view.getUint32(0) is 66051
PASS view.getUint32(3) is 56911206
PASS view.getUint32(6) is 1718059137
PASS view.getUint32(9) is 2172814332
PASS view.getUint32(12) is 4244504319
PASS view.getFloat32(0, true) is 10
PASS view.getFloat32(3, true) is 10
PASS view.getFloat32(7, true) is 10
PASS view.getFloat32(10, true) is 10
PASS view.getFloat32(0, false) is 10
PASS view.getFloat32(3, false) is 10
PASS view.getFloat32(7, false) is 10
PASS view.getFloat32(10, false) is 10
PASS view.getFloat32(0, true) is 1.2300000190734863
PASS view.getFloat32(3, true) is 1.2300000190734863
PASS view.getFloat32(7, true) is 1.2300000190734863
PASS view.getFloat32(10, true) is 1.2300000190734863
PASS view.getFloat32(0, false) is 1.2300000190734863
PASS view.getFloat32(3, false) is 1.2300000190734863
PASS view.getFloat32(7, false) is 1.2300000190734863
PASS view.getFloat32(10, false) is 1.2300000190734863
PASS view.getFloat32(0, true) is -45621.37109375
PASS view.getFloat32(3, true) is -45621.37109375
PASS view.getFloat32(7, true) is -45621.37109375
PASS view.getFloat32(10, true) is -45621.37109375
PASS view.getFloat32(0, false) is -45621.37109375
PASS view.getFloat32(3, false) is -45621.37109375
PASS view.getFloat32(7, false) is -45621.37109375
PASS view.getFloat32(10, false) is -45621.37109375
PASS view.getFloat32(0, true) is NaN
PASS view.getFloat32(3, true) is NaN
PASS view.getFloat32(7, true) is NaN
PASS view.getFloat32(10, true) is NaN
PASS view.getFloat32(0, false) is NaN
PASS view.getFloat32(3, false) is NaN
PASS view.getFloat32(7, false) is NaN
PASS view.getFloat32(10, false) is NaN
PASS view.getFloat32(0, true) is -NaN
PASS view.getFloat32(3, true) is -NaN
PASS view.getFloat32(7, true) is -NaN
PASS view.getFloat32(10, true) is -NaN
PASS view.getFloat32(0, false) is -NaN
PASS view.getFloat32(3, false) is -NaN
PASS view.getFloat32(7, false) is -NaN
PASS view.getFloat32(10, false) is -NaN
PASS view.getFloat64(0, true) is 10
PASS view.getFloat64(3, true) is 10
PASS view.getFloat64(7, true) is 10
PASS view.getFloat64(10, true) is 10
PASS view.getFloat64(0, false) is 10
PASS view.getFloat64(3, false) is 10
PASS view.getFloat64(7, false) is 10
PASS view.getFloat64(10, false) is 10
PASS view.getFloat64(0, true) is 1.23
PASS view.getFloat64(3, true) is 1.23
PASS view.getFloat64(7, true) is 1.23
PASS view.getFloat64(10, true) is 1.23
PASS view.getFloat64(0, false) is 1.23
PASS view.getFloat64(3, false) is 1.23
PASS view.getFloat64(7, false) is 1.23
PASS view.getFloat64(10, false) is 1.23
PASS view.getFloat64(0, true) is -6213576.4839
PASS view.getFloat64(3, true) is -6213576.4839
PASS view.getFloat64(7, true) is -6213576.4839
PASS view.getFloat64(10, true) is -6213576.4839
PASS view.getFloat64(0, false) is -6213576.4839
PASS view.getFloat64(3, false) is -6213576.4839
PASS view.getFloat64(7, false) is -6213576.4839
PASS view.getFloat64(10, false) is -6213576.4839
PASS view.getFloat64(0, true) is NaN
PASS view.getFloat64(3, true) is NaN
PASS view.getFloat64(7, true) is NaN
PASS view.getFloat64(10, true) is NaN
PASS view.getFloat64(0, false) is NaN
PASS view.getFloat64(3, false) is NaN
PASS view.getFloat64(7, false) is NaN
PASS view.getFloat64(10, false) is NaN
PASS view.getFloat64(0, true) is -NaN
PASS view.getFloat64(3, true) is -NaN
PASS view.getFloat64(7, true) is -NaN
PASS view.getFloat64(10, true) is -NaN
PASS view.getFloat64(0, false) is -NaN
PASS view.getFloat64(3, false) is -NaN
PASS view.getFloat64(7, false) is -NaN
PASS view.getFloat64(10, false) is -NaN
Test for get methods that might read beyond range
PASS view.getInt8(0) is 0
PASS view.getInt8(8) threw exception RangeError: Out of bounds access.
PASS view.getInt8(15) threw exception RangeError: Out of bounds access.
PASS view.getUint8(0) is 0
PASS view.getUint8(8) threw exception RangeError: Out of bounds access.
PASS view.getUint8(15) threw exception RangeError: Out of bounds access.
PASS view.getInt16(0, true) is 256
PASS view.getInt16(5, true) threw exception RangeError: Out of bounds access.
PASS view.getInt16(9, true) threw exception RangeError: Out of bounds access.
PASS view.getInt16(14, true) threw exception RangeError: Out of bounds access.
PASS view.getInt16(0) is 1
PASS view.getInt16(5) threw exception RangeError: Out of bounds access.
PASS view.getInt16(9) threw exception RangeError: Out of bounds access.
PASS view.getInt16(14) threw exception RangeError: Out of bounds access.
PASS view.getUint16(0, true) is 256
PASS view.getUint16(5, true) threw exception RangeError: Out of bounds access.
PASS view.getUint16(9, true) threw exception RangeError: Out of bounds access.
PASS view.getUint16(14, true) threw exception RangeError: Out of bounds access.
PASS view.getUint16(0) is 1
PASS view.getUint16(5) threw exception RangeError: Out of bounds access.
PASS view.getUint16(9) threw exception RangeError: Out of bounds access.
PASS view.getUint16(14) threw exception RangeError: Out of bounds access.
PASS view.getInt32(0, true) threw exception RangeError: Out of bounds access.
PASS view.getInt32(3, true) threw exception RangeError: Out of bounds access.
PASS view.getInt32(6, true) threw exception RangeError: Out of bounds access.
PASS view.getInt32(9, true) threw exception RangeError: Out of bounds access.
PASS view.getInt32(12, true) threw exception RangeError: Out of bounds access.
PASS view.getInt32(0) threw exception RangeError: Out of bounds access.
PASS view.getInt32(3) threw exception RangeError: Out of bounds access.
PASS view.getInt32(6) threw exception RangeError: Out of bounds access.
PASS view.getInt32(9) threw exception RangeError: Out of bounds access.
PASS view.getInt32(12) threw exception RangeError: Out of bounds access.
PASS view.getUint32(0, true) threw exception RangeError: Out of bounds access.
PASS view.getUint32(3, true) threw exception RangeError: Out of bounds access.
PASS view.getUint32(6, true) threw exception RangeError: Out of bounds access.
PASS view.getUint32(9, true) threw exception RangeError: Out of bounds access.
PASS view.getUint32(12, true) threw exception RangeError: Out of bounds access.
PASS view.getUint32(0) threw exception RangeError: Out of bounds access.
PASS view.getUint32(3) threw exception RangeError: Out of bounds access.
PASS view.getUint32(6) threw exception RangeError: Out of bounds access.
PASS view.getUint32(9) threw exception RangeError: Out of bounds access.
PASS view.getUint32(12) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(0, false) is 10
PASS view.getFloat32(3, false) is 10
PASS view.getFloat32(7, false) is 10
PASS view.getFloat32(10, false) is 10
PASS view.getFloat32(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(0, false) is 1.2300000190734863
PASS view.getFloat32(3, false) is 1.2300000190734863
PASS view.getFloat32(7, false) is 1.2300000190734863
PASS view.getFloat32(10, false) is 1.2300000190734863
PASS view.getFloat32(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(0, false) is -45621.37109375
PASS view.getFloat32(3, false) is -45621.37109375
PASS view.getFloat32(7, false) is -45621.37109375
PASS view.getFloat32(10, false) is -45621.37109375
PASS view.getFloat32(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(0, false) is NaN
PASS view.getFloat32(3, false) is NaN
PASS view.getFloat32(7, false) is NaN
PASS view.getFloat32(10, false) is NaN
PASS view.getFloat32(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat32(0, false) is -NaN
PASS view.getFloat32(3, false) is -NaN
PASS view.getFloat32(7, false) is -NaN
PASS view.getFloat32(10, false) is -NaN
PASS view.getFloat64(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(0, false) is 10
PASS view.getFloat64(3, false) is 10
PASS view.getFloat64(7, false) is 10
PASS view.getFloat64(10, false) is 10
PASS view.getFloat64(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(0, false) is 1.23
PASS view.getFloat64(3, false) is 1.23
PASS view.getFloat64(7, false) is 1.23
PASS view.getFloat64(10, false) is 1.23
PASS view.getFloat64(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(0, false) is -6213576.4839
PASS view.getFloat64(3, false) is -6213576.4839
PASS view.getFloat64(7, false) is -6213576.4839
PASS view.getFloat64(10, false) is -6213576.4839
PASS view.getFloat64(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(0, false) is NaN
PASS view.getFloat64(3, false) is NaN
PASS view.getFloat64(7, false) is NaN
PASS view.getFloat64(10, false) is NaN
PASS view.getFloat64(0, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(3, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(7, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(10, true) threw exception RangeError: Out of bounds access.
PASS view.getFloat64(0, false) is -NaN
PASS view.getFloat64(3, false) is -NaN
PASS view.getFloat64(7, false) is -NaN
PASS view.getFloat64(10, false) is -NaN
Test for get methods that read from negative index
PASS view.getInt8(-1) threw exception RangeError: byteOffset cannot be negative.
PASS view.getInt8(-2) threw exception RangeError: byteOffset cannot be negative.
PASS view.getUint8(-1) threw exception RangeError: byteOffset cannot be negative.
PASS view.getUint8(-2) threw exception RangeError: byteOffset cannot be negative.
PASS view.getInt16(-1) threw exception RangeError: byteOffset cannot be negative.
PASS view.getInt16(-2) threw exception RangeError: byteOffset cannot be negative.
PASS view.getInt16(-3) threw exception RangeError: byteOffset cannot be negative.
PASS view.getUint16(-1) threw exception RangeError: byteOffset cannot be negative.
PASS view.getUint16(-2) threw exception RangeError: byteOffset cannot be negative.
PASS view.getUint16(-3) threw exception RangeError: byteOffset cannot be negative.
PASS view.getInt32(-1) threw exception RangeError: byteOffset cannot be negative.
PASS view.getInt32(-3) threw exception RangeError: byteOffset cannot be negative.
PASS view.getInt32(-5) threw exception RangeError: byteOffset cannot be negative.
PASS view.getUint32(-1) threw exception RangeError: byteOffset cannot be negative.
PASS view.getUint32(-3) threw exception RangeError: byteOffset cannot be negative.
PASS view.getUint32(-5) threw exception RangeError: byteOffset cannot be negative.
PASS view.getFloat32(-1) threw exception RangeError: byteOffset cannot be negative.
PASS view.getFloat32(-3) threw exception RangeError: byteOffset cannot be negative.
PASS view.getFloat32(-5) threw exception RangeError: byteOffset cannot be negative.
PASS view.getFloat64(-1) threw exception RangeError: byteOffset cannot be negative.
PASS view.getFloat64(-5) threw exception RangeError: byteOffset cannot be negative.
PASS view.getFloat64(-9) threw exception RangeError: byteOffset cannot be negative.
Test for missing arguments passed to get methods
PASS view.getInt8() did not throw exception.
PASS view.getUint8() did not throw exception.
PASS view.getInt16() did not throw exception.
PASS view.getUint16() did not throw exception.
PASS view.getInt32() did not throw exception.
PASS view.getUint32() did not throw exception.
PASS view.getFloat32() did not throw exception.
PASS view.getFloat64() did not throw exception.
Test for set methods that work
PASS view.setInt8(0, 0) is undefined.
PASS view.getInt8(0) is 0
PASS view.setInt8(8, -128) is undefined.
PASS view.getInt8(8) is -128
PASS view.setInt8(15, -1) is undefined.
PASS view.getInt8(15) is -1
PASS view.setUint8(0, 0) is undefined.
PASS view.getUint8(0) is 0
PASS view.setUint8(8, 128) is undefined.
PASS view.getUint8(8) is 128
PASS view.setUint8(15, 255) is undefined.
PASS view.getUint8(15) is 255
PASS view.setInt16(0, 256, true) is undefined.
PASS view.getInt16(0, true) is 256
PASS view.setInt16(5, 26213, true) is undefined.
PASS view.getInt16(5, true) is 26213
PASS view.setInt16(9, -32127, true) is undefined.
PASS view.getInt16(9, true) is -32127
PASS view.setInt16(14, -2, true) is undefined.
PASS view.getInt16(14, true) is -2
PASS view.setInt16(0, 1) is undefined.
PASS view.getInt16(0) is 1
PASS view.setInt16(5, 25958) is undefined.
PASS view.getInt16(5) is 25958
PASS view.setInt16(9, -32382) is undefined.
PASS view.getInt16(9) is -32382
PASS view.setInt16(14, -257) is undefined.
PASS view.getInt16(14) is -257
PASS view.setUint16(0, 256, true) is undefined.
PASS view.getUint16(0, true) is 256
PASS view.setUint16(5, 26213, true) is undefined.
PASS view.getUint16(5, true) is 26213
PASS view.setUint16(9, 33409, true) is undefined.
PASS view.getUint16(9, true) is 33409
PASS view.setUint16(14, 65534, true) is undefined.
PASS view.getUint16(14, true) is 65534
PASS view.setUint16(0, 1) is undefined.
PASS view.getUint16(0) is 1
PASS view.setUint16(5, 25958) is undefined.
PASS view.getUint16(5) is 25958
PASS view.setUint16(9, 33154) is undefined.
PASS view.getUint16(9) is 33154
PASS view.setUint16(14, 65279) is undefined.
PASS view.getUint16(14) is 65279
PASS view.setInt32(0, 50462976, true) is undefined.
PASS view.getInt32(0, true) is 50462976
PASS view.setInt32(3, 1717920771, true) is undefined.
PASS view.getInt32(3, true) is 1717920771
PASS view.setInt32(6, -2122291354, true) is undefined.
PASS view.getInt32(6, true) is -2122291354
PASS view.setInt32(9, -58490239, true) is undefined.
PASS view.getInt32(9, true) is -58490239
PASS view.setInt32(12, -66052, true) is undefined.
PASS view.getInt32(12, true) is -66052
PASS view.setInt32(0, 66051) is undefined.
PASS view.getInt32(0) is 66051
PASS view.setInt32(3, 56911206) is undefined.
PASS view.getInt32(3) is 56911206
PASS view.setInt32(6, 1718059137) is undefined.
PASS view.getInt32(6) is 1718059137
PASS view.setInt32(9, -2122152964) is undefined.
PASS view.getInt32(9) is -2122152964
PASS view.setInt32(12, -50462977) is undefined.
PASS view.getInt32(12) is -50462977
PASS view.setUint32(0, 50462976, true) is undefined.
PASS view.getUint32(0, true) is 50462976
PASS view.setUint32(3, 1717920771, true) is undefined.
PASS view.getUint32(3, true) is 1717920771
PASS view.setUint32(6, 2172675942, true) is undefined.
PASS view.getUint32(6, true) is 2172675942
PASS view.setUint32(9, 4236477057, true) is undefined.
PASS view.getUint32(9, true) is 4236477057
PASS view.setUint32(12, 4294901244, true) is undefined.
PASS view.getUint32(12, true) is 4294901244
PASS view.setUint32(0, 66051) is undefined.
PASS view.getUint32(0) is 66051
PASS view.setUint32(3, 56911206) is undefined.
PASS view.getUint32(3) is 56911206
PASS view.setUint32(6, 1718059137) is undefined.
PASS view.getUint32(6) is 1718059137
PASS view.setUint32(9, 2172814332) is undefined.
PASS view.getUint32(9) is 2172814332
PASS view.setUint32(12, 4244504319) is undefined.
PASS view.getUint32(12) is 4244504319
PASS view.setFloat32(0, 10, true) is undefined.
PASS view.getFloat32(0, true) is 10
PASS view.setFloat32(3, 10, true) is undefined.
PASS view.getFloat32(3, true) is 10
PASS view.setFloat32(7, 10, true) is undefined.
PASS view.getFloat32(7, true) is 10
PASS view.setFloat32(10, 10, true) is undefined.
PASS view.getFloat32(10, true) is 10
PASS view.setFloat32(0, 10, false) is undefined.
PASS view.getFloat32(0, false) is 10
PASS view.setFloat32(3, 10, false) is undefined.
PASS view.getFloat32(3, false) is 10
PASS view.setFloat32(7, 10, false) is undefined.
PASS view.getFloat32(7, false) is 10
PASS view.setFloat32(10, 10, false) is undefined.
PASS view.getFloat32(10, false) is 10
PASS view.setFloat32(0, 1.2300000190734863, true) is undefined.
PASS view.getFloat32(0, true) is 1.2300000190734863
PASS view.setFloat32(3, 1.2300000190734863, true) is undefined.
PASS view.getFloat32(3, true) is 1.2300000190734863
PASS view.setFloat32(7, 1.2300000190734863, true) is undefined.
PASS view.getFloat32(7, true) is 1.2300000190734863
PASS view.setFloat32(10, 1.2300000190734863, true) is undefined.
PASS view.getFloat32(10, true) is 1.2300000190734863
PASS view.setFloat32(0, 1.2300000190734863, false) is undefined.
PASS view.getFloat32(0, false) is 1.2300000190734863
PASS view.setFloat32(3, 1.2300000190734863, false) is undefined.
PASS view.getFloat32(3, false) is 1.2300000190734863
PASS view.setFloat32(7, 1.2300000190734863, false) is undefined.
PASS view.getFloat32(7, false) is 1.2300000190734863
PASS view.setFloat32(10, 1.2300000190734863, false) is undefined.
PASS view.getFloat32(10, false) is 1.2300000190734863
PASS view.setFloat32(0, -45621.37109375, true) is undefined.
PASS view.getFloat32(0, true) is -45621.37109375
PASS view.setFloat32(3, -45621.37109375, true) is undefined.
PASS view.getFloat32(3, true) is -45621.37109375
PASS view.setFloat32(7, -45621.37109375, true) is undefined.
PASS view.getFloat32(7, true) is -45621.37109375
PASS view.setFloat32(10, -45621.37109375, true) is undefined.
PASS view.getFloat32(10, true) is -45621.37109375
PASS view.setFloat32(0, -45621.37109375, false) is undefined.
PASS view.getFloat32(0, false) is -45621.37109375
PASS view.setFloat32(3, -45621.37109375, false) is undefined.
PASS view.getFloat32(3, false) is -45621.37109375
PASS view.setFloat32(7, -45621.37109375, false) is undefined.
PASS view.getFloat32(7, false) is -45621.37109375
PASS view.setFloat32(10, -45621.37109375, false) is undefined.
PASS view.getFloat32(10, false) is -45621.37109375
PASS view.setFloat32(0, NaN, true) is undefined.
PASS view.getFloat32(0, true) is NaN
PASS view.setFloat32(3, NaN, true) is undefined.
PASS view.getFloat32(3, true) is NaN
PASS view.setFloat32(7, NaN, true) is undefined.
PASS view.getFloat32(7, true) is NaN
PASS view.setFloat32(10, NaN, true) is undefined.
PASS view.getFloat32(10, true) is NaN
PASS view.setFloat32(0, NaN, false) is undefined.
PASS view.getFloat32(0, false) is NaN
PASS view.setFloat32(3, NaN, false) is undefined.
PASS view.getFloat32(3, false) is NaN
PASS view.setFloat32(7, NaN, false) is undefined.
PASS view.getFloat32(7, false) is NaN
PASS view.setFloat32(10, NaN, false) is undefined.
PASS view.getFloat32(10, false) is NaN
PASS view.setFloat32(0, -NaN, true) is undefined.
PASS view.getFloat32(0, true) is -NaN
PASS view.setFloat32(3, -NaN, true) is undefined.
PASS view.getFloat32(3, true) is -NaN
PASS view.setFloat32(7, -NaN, true) is undefined.
PASS view.getFloat32(7, true) is -NaN
PASS view.setFloat32(10, -NaN, true) is undefined.
PASS view.getFloat32(10, true) is -NaN
PASS view.setFloat32(0, -NaN, false) is undefined.
PASS view.getFloat32(0, false) is -NaN
PASS view.setFloat32(3, -NaN, false) is undefined.
PASS view.getFloat32(3, false) is -NaN
PASS view.setFloat32(7, -NaN, false) is undefined.
PASS view.getFloat32(7, false) is -NaN
PASS view.setFloat32(10, -NaN, false) is undefined.
PASS view.getFloat32(10, false) is -NaN
PASS view.setFloat64(0, 10, true) is undefined.
PASS view.getFloat64(0, true) is 10
PASS view.setFloat64(3, 10, true) is undefined.
PASS view.getFloat64(3, true) is 10
PASS view.setFloat64(7, 10, true) is undefined.
PASS view.getFloat64(7, true) is 10
PASS view.setFloat64(10, 10, true) is undefined.
PASS view.getFloat64(10, true) is 10
PASS view.setFloat64(0, 10, false) is undefined.
PASS view.getFloat64(0, false) is 10
PASS view.setFloat64(3, 10, false) is undefined.
PASS view.getFloat64(3, false) is 10
PASS view.setFloat64(7, 10, false) is undefined.
PASS view.getFloat64(7, false) is 10
PASS view.setFloat64(10, 10, false) is undefined.
PASS view.getFloat64(10, false) is 10
PASS view.setFloat64(0, 1.23, true) is undefined.
PASS view.getFloat64(0, true) is 1.23
PASS view.setFloat64(3, 1.23, true) is undefined.
PASS view.getFloat64(3, true) is 1.23
PASS view.setFloat64(7, 1.23, true) is undefined.
PASS view.getFloat64(7, true) is 1.23
PASS view.setFloat64(10, 1.23, true) is undefined.
PASS view.getFloat64(10, true) is 1.23
PASS view.setFloat64(0, 1.23, false) is undefined.
PASS view.getFloat64(0, false) is 1.23
PASS view.setFloat64(3, 1.23, false) is undefined.
PASS view.getFloat64(3, false) is 1.23
PASS view.setFloat64(7, 1.23, false) is undefined.
PASS view.getFloat64(7, false) is 1.23
PASS view.setFloat64(10, 1.23, false) is undefined.
PASS view.getFloat64(10, false) is 1.23
PASS view.setFloat64(0, -6213576.4839, true) is undefined.
PASS view.getFloat64(0, true) is -6213576.4839
PASS view.setFloat64(3, -6213576.4839, true) is undefined.
PASS view.getFloat64(3, true) is -6213576.4839
PASS view.setFloat64(7, -6213576.4839, true) is undefined.
PASS view.getFloat64(7, true) is -6213576.4839
PASS view.setFloat64(10, -6213576.4839, true) is undefined.
PASS view.getFloat64(10, true) is -6213576.4839
PASS view.setFloat64(0, -6213576.4839, false) is undefined.
PASS view.getFloat64(0, false) is -6213576.4839
PASS view.setFloat64(3, -6213576.4839, false) is undefined.
PASS view.getFloat64(3, false) is -6213576.4839
PASS view.setFloat64(7, -6213576.4839, false) is undefined.
PASS view.getFloat64(7, false) is -6213576.4839
PASS view.setFloat64(10, -6213576.4839, false) is undefined.
PASS view.getFloat64(10, false) is -6213576.4839
PASS view.setFloat64(0, NaN, true) is undefined.
PASS view.getFloat64(0, true) is NaN
PASS view.setFloat64(3, NaN, true) is undefined.
PASS view.getFloat64(3, true) is NaN
PASS view.setFloat64(7, NaN, true) is undefined.
PASS view.getFloat64(7, true) is NaN
PASS view.setFloat64(10, NaN, true) is undefined.
PASS view.getFloat64(10, true) is NaN
PASS view.setFloat64(0, NaN, false) is undefined.
PASS view.getFloat64(0, false) is NaN
PASS view.setFloat64(3, NaN, false) is undefined.
PASS view.getFloat64(3, false) is NaN
PASS view.setFloat64(7, NaN, false) is undefined.
PASS view.getFloat64(7, false) is NaN
PASS view.setFloat64(10, NaN, false) is undefined.
PASS view.getFloat64(10, false) is NaN
PASS view.setFloat64(0, -NaN, true) is undefined.
PASS view.getFloat64(0, true) is -NaN
PASS view.setFloat64(3, -NaN, true) is undefined.
PASS view.getFloat64(3, true) is -NaN
PASS view.setFloat64(7, -NaN, true) is undefined.
PASS view.getFloat64(7, true) is -NaN
PASS view.setFloat64(10, -NaN, true) is undefined.
PASS view.getFloat64(10, true) is -NaN
PASS view.setFloat64(0, -NaN, false) is undefined.
PASS view.getFloat64(0, false) is -NaN
PASS view.setFloat64(3, -NaN, false) is undefined.
PASS view.getFloat64(3, false) is -NaN
PASS view.setFloat64(7, -NaN, false) is undefined.
PASS view.getFloat64(7, false) is -NaN
PASS view.setFloat64(10, -NaN, false) is undefined.
PASS view.getFloat64(10, false) is -NaN
Test for set methods that might write beyond the range
PASS view.setInt8(0, 0) is undefined.
PASS view.getInt8(0) is 0
PASS view.setInt8(8, -128) threw exception RangeError: Out of bounds access.
PASS view.setInt8(15, -1) threw exception RangeError: Out of bounds access.
PASS view.setUint8(0, 0) is undefined.
PASS view.getUint8(0) is 0
PASS view.setUint8(8, 128) threw exception RangeError: Out of bounds access.
PASS view.setUint8(15, 255) threw exception RangeError: Out of bounds access.
PASS view.setInt16(0, 256, true) is undefined.
PASS view.getInt16(0, true) is 256
PASS view.setInt16(5, 26213, true) threw exception RangeError: Out of bounds access.
PASS view.setInt16(9, -32127, true) threw exception RangeError: Out of bounds access.
PASS view.setInt16(14, -2, true) threw exception RangeError: Out of bounds access.
PASS view.setInt16(0, 1) is undefined.
PASS view.getInt16(0) is 1
PASS view.setInt16(5, 25958) threw exception RangeError: Out of bounds access.
PASS view.setInt16(9, -32382) threw exception RangeError: Out of bounds access.
PASS view.setInt16(14, -257) threw exception RangeError: Out of bounds access.
PASS view.setUint16(0, 256, true) is undefined.
PASS view.getUint16(0, true) is 256
PASS view.setUint16(5, 26213, true) threw exception RangeError: Out of bounds access.
PASS view.setUint16(9, 33409, true) threw exception RangeError: Out of bounds access.
PASS view.setUint16(14, 65534, true) threw exception RangeError: Out of bounds access.
PASS view.setUint16(0, 1) is undefined.
PASS view.getUint16(0) is 1
PASS view.setUint16(5, 25958) threw exception RangeError: Out of bounds access.
PASS view.setUint16(9, 33154) threw exception RangeError: Out of bounds access.
PASS view.setUint16(14, 65279) threw exception RangeError: Out of bounds access.
PASS view.setInt32(0, 50462976, true) threw exception RangeError: Out of bounds access.
PASS view.setInt32(3, 1717920771, true) threw exception RangeError: Out of bounds access.
PASS view.setInt32(6, -2122291354, true) threw exception RangeError: Out of bounds access.
PASS view.setInt32(9, -58490239, true) threw exception RangeError: Out of bounds access.
PASS view.setInt32(12, -66052, true) threw exception RangeError: Out of bounds access.
PASS view.setInt32(0, 66051) threw exception RangeError: Out of bounds access.
PASS view.setInt32(3, 56911206) threw exception RangeError: Out of bounds access.
PASS view.setInt32(6, 1718059137) threw exception RangeError: Out of bounds access.
PASS view.setInt32(9, -2122152964) threw exception RangeError: Out of bounds access.
PASS view.setInt32(12, -50462977) threw exception RangeError: Out of bounds access.
PASS view.setUint32(0, 50462976, true) threw exception RangeError: Out of bounds access.
PASS view.setUint32(3, 1717920771, true) threw exception RangeError: Out of bounds access.
PASS view.setUint32(6, 2172675942, true) threw exception RangeError: Out of bounds access.
PASS view.setUint32(9, 4236477057, true) threw exception RangeError: Out of bounds access.
PASS view.setUint32(12, 4294901244, true) threw exception RangeError: Out of bounds access.
PASS view.setUint32(0, 66051) threw exception RangeError: Out of bounds access.
PASS view.setUint32(3, 56911206) threw exception RangeError: Out of bounds access.
PASS view.setUint32(6, 1718059137) threw exception RangeError: Out of bounds access.
PASS view.setUint32(9, 2172814332) threw exception RangeError: Out of bounds access.
PASS view.setUint32(12, 4244504319) threw exception RangeError: Out of bounds access.
PASS view.setFloat32(0, 10, true) is undefined.
PASS view.getFloat32(0, true) is 10
PASS view.setFloat32(3, 10, true) is undefined.
PASS view.getFloat32(3, true) is 10
PASS view.setFloat32(7, 10, true) is undefined.
PASS view.getFloat32(7, true) is 10
PASS view.setFloat32(10, 10, true) is undefined.
PASS view.getFloat32(10, true) is 10
PASS view.setFloat32(0, 10, false) is undefined.
PASS view.getFloat32(0, false) is 10
PASS view.setFloat32(3, 10, false) is undefined.
PASS view.getFloat32(3, false) is 10
PASS view.setFloat32(7, 10, false) is undefined.
PASS view.getFloat32(7, false) is 10
PASS view.setFloat32(10, 10, false) is undefined.
PASS view.getFloat32(10, false) is 10
PASS view.setFloat32(0, 1.2300000190734863, true) is undefined.
PASS view.getFloat32(0, true) is 1.2300000190734863
PASS view.setFloat32(3, 1.2300000190734863, true) is undefined.
PASS view.getFloat32(3, true) is 1.2300000190734863
PASS view.setFloat32(7, 1.2300000190734863, true) is undefined.
PASS view.getFloat32(7, true) is 1.2300000190734863
PASS view.setFloat32(10, 1.2300000190734863, true) is undefined.
PASS view.getFloat32(10, true) is 1.2300000190734863
PASS view.setFloat32(0, 1.2300000190734863, false) is undefined.
PASS view.getFloat32(0, false) is 1.2300000190734863
PASS view.setFloat32(3, 1.2300000190734863, false) is undefined.
PASS view.getFloat32(3, false) is 1.2300000190734863
PASS view.setFloat32(7, 1.2300000190734863, false) is undefined.
PASS view.getFloat32(7, false) is 1.2300000190734863
PASS view.setFloat32(10, 1.2300000190734863, false) is undefined.
PASS view.getFloat32(10, false) is 1.2300000190734863
PASS view.setFloat32(0, -45621.37109375, true) is undefined.
PASS view.getFloat32(0, true) is -45621.37109375
PASS view.setFloat32(3, -45621.37109375, true) is undefined.
PASS view.getFloat32(3, true) is -45621.37109375
PASS view.setFloat32(7, -45621.37109375, true) is undefined.
PASS view.getFloat32(7, true) is -45621.37109375
PASS view.setFloat32(10, -45621.37109375, true) is undefined.
PASS view.getFloat32(10, true) is -45621.37109375
PASS view.setFloat32(0, -45621.37109375, false) is undefined.
PASS view.getFloat32(0, false) is -45621.37109375
PASS view.setFloat32(3, -45621.37109375, false) is undefined.
PASS view.getFloat32(3, false) is -45621.37109375
PASS view.setFloat32(7, -45621.37109375, false) is undefined.
PASS view.getFloat32(7, false) is -45621.37109375
PASS view.setFloat32(10, -45621.37109375, false) is undefined.
PASS view.getFloat32(10, false) is -45621.37109375
PASS view.setFloat32(0, NaN, true) is undefined.
PASS view.getFloat32(0, true) is NaN
PASS view.setFloat32(3, NaN, true) is undefined.
PASS view.getFloat32(3, true) is NaN
PASS view.setFloat32(7, NaN, true) is undefined.
PASS view.getFloat32(7, true) is NaN
PASS view.setFloat32(10, NaN, true) is undefined.
PASS view.getFloat32(10, true) is NaN
PASS view.setFloat32(0, NaN, false) is undefined.
PASS view.getFloat32(0, false) is NaN
PASS view.setFloat32(3, NaN, false) is undefined.
PASS view.getFloat32(3, false) is NaN
PASS view.setFloat32(7, NaN, false) is undefined.
PASS view.getFloat32(7, false) is NaN
PASS view.setFloat32(10, NaN, false) is undefined.
PASS view.getFloat32(10, false) is NaN
PASS view.setFloat32(0, -NaN, true) is undefined.
PASS view.getFloat32(0, true) is -NaN
PASS view.setFloat32(3, -NaN, true) is undefined.
PASS view.getFloat32(3, true) is -NaN
PASS view.setFloat32(7, -NaN, true) is undefined.
PASS view.getFloat32(7, true) is -NaN
PASS view.setFloat32(10, -NaN, true) is undefined.
PASS view.getFloat32(10, true) is -NaN
PASS view.setFloat32(0, -NaN, false) is undefined.
PASS view.getFloat32(0, false) is -NaN
PASS view.setFloat32(3, -NaN, false) is undefined.
PASS view.getFloat32(3, false) is -NaN
PASS view.setFloat32(7, -NaN, false) is undefined.
PASS view.getFloat32(7, false) is -NaN
PASS view.setFloat32(10, -NaN, false) is undefined.
PASS view.getFloat32(10, false) is -NaN
PASS view.setFloat64(0, 10, true) is undefined.
PASS view.getFloat64(0, true) is 10
PASS view.setFloat64(3, 10, true) is undefined.
PASS view.getFloat64(3, true) is 10
PASS view.setFloat64(7, 10, true) is undefined.
PASS view.getFloat64(7, true) is 10
PASS view.setFloat64(10, 10, true) is undefined.
PASS view.getFloat64(10, true) is 10
PASS view.setFloat64(0, 10, false) is undefined.
PASS view.getFloat64(0, false) is 10
PASS view.setFloat64(3, 10, false) is undefined.
PASS view.getFloat64(3, false) is 10
PASS view.setFloat64(7, 10, false) is undefined.
PASS view.getFloat64(7, false) is 10
PASS view.setFloat64(10, 10, false) is undefined.
PASS view.getFloat64(10, false) is 10
PASS view.setFloat64(0, 1.23, true) is undefined.
PASS view.getFloat64(0, true) is 1.23
PASS view.setFloat64(3, 1.23, true) is undefined.
PASS view.getFloat64(3, true) is 1.23
PASS view.setFloat64(7, 1.23, true) is undefined.
PASS view.getFloat64(7, true) is 1.23
PASS view.setFloat64(10, 1.23, true) is undefined.
PASS view.getFloat64(10, true) is 1.23
PASS view.setFloat64(0, 1.23, false) is undefined.
PASS view.getFloat64(0, false) is 1.23
PASS view.setFloat64(3, 1.23, false) is undefined.
PASS view.getFloat64(3, false) is 1.23
PASS view.setFloat64(7, 1.23, false) is undefined.
PASS view.getFloat64(7, false) is 1.23
PASS view.setFloat64(10, 1.23, false) is undefined.
PASS view.getFloat64(10, false) is 1.23
PASS view.setFloat64(0, -6213576.4839, true) is undefined.
PASS view.getFloat64(0, true) is -6213576.4839
PASS view.setFloat64(3, -6213576.4839, true) is undefined.
PASS view.getFloat64(3, true) is -6213576.4839
PASS view.setFloat64(7, -6213576.4839, true) is undefined.
PASS view.getFloat64(7, true) is -6213576.4839
PASS view.setFloat64(10, -6213576.4839, true) is undefined.
PASS view.getFloat64(10, true) is -6213576.4839
PASS view.setFloat64(0, -6213576.4839, false) is undefined.
PASS view.getFloat64(0, false) is -6213576.4839
PASS view.setFloat64(3, -6213576.4839, false) is undefined.
PASS view.getFloat64(3, false) is -6213576.4839
PASS view.setFloat64(7, -6213576.4839, false) is undefined.
PASS view.getFloat64(7, false) is -6213576.4839
PASS view.setFloat64(10, -6213576.4839, false) is undefined.
PASS view.getFloat64(10, false) is -6213576.4839
PASS view.setFloat64(0, NaN, true) is undefined.
PASS view.getFloat64(0, true) is NaN
PASS view.setFloat64(3, NaN, true) is undefined.
PASS view.getFloat64(3, true) is NaN
PASS view.setFloat64(7, NaN, true) is undefined.
PASS view.getFloat64(7, true) is NaN
PASS view.setFloat64(10, NaN, true) is undefined.
PASS view.getFloat64(10, true) is NaN
PASS view.setFloat64(0, NaN, false) is undefined.
PASS view.getFloat64(0, false) is NaN
PASS view.setFloat64(3, NaN, false) is undefined.
PASS view.getFloat64(3, false) is NaN
PASS view.setFloat64(7, NaN, false) is undefined.
PASS view.getFloat64(7, false) is NaN
PASS view.setFloat64(10, NaN, false) is undefined.
PASS view.getFloat64(10, false) is NaN
PASS view.setFloat64(0, -NaN, true) is undefined.
PASS view.getFloat64(0, true) is -NaN
PASS view.setFloat64(3, -NaN, true) is undefined.
PASS view.getFloat64(3, true) is -NaN
PASS view.setFloat64(7, -NaN, true) is undefined.
PASS view.getFloat64(7, true) is -NaN
PASS view.setFloat64(10, -NaN, true) is undefined.
PASS view.getFloat64(10, true) is -NaN
PASS view.setFloat64(0, -NaN, false) is undefined.
PASS view.getFloat64(0, false) is -NaN
PASS view.setFloat64(3, -NaN, false) is undefined.
PASS view.getFloat64(3, false) is -NaN
PASS view.setFloat64(7, -NaN, false) is undefined.
PASS view.getFloat64(7, false) is -NaN
PASS view.setFloat64(10, -NaN, false) is undefined.
PASS view.getFloat64(10, false) is -NaN
Test for set methods that write to negative index
PASS view.setInt8(-1, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setInt8(-2, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setUint8(-1, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setUint8(-2, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setInt16(-1, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setInt16(-2, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setInt16(-3, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setUint16(-1, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setUint16(-2, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setUint16(-3, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setInt32(-1, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setInt32(-3, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setInt32(-5, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setUint32(-1, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setUint32(-3, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setUint32(-5, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setFloat32(-1, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setFloat32(-3, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setFloat32(-5, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setFloat64(-1, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setFloat64(-5, 0) threw exception RangeError: byteOffset cannot be negative.
PASS view.setFloat64(-9, 0) threw exception RangeError: byteOffset cannot be negative.
Test for missing arguments passed to set methods
PASS view.setInt8() did not throw exception.
PASS view.setUint8() did not throw exception.
PASS view.setInt16() did not throw exception.
PASS view.setUint16() did not throw exception.
PASS view.setInt32() did not throw exception.
PASS view.setUint32() did not throw exception.
PASS view.setFloat32() did not throw exception.
PASS view.setFloat64() did not throw exception.
PASS view.setInt8(1) did not throw exception.
PASS view.setUint8(1) did not throw exception.
PASS view.setInt16(1) did not throw exception.
PASS view.setUint16(1) did not throw exception.
PASS view.setInt32(1) did not throw exception.
PASS view.setUint32(1) did not throw exception.
PASS view.setFloat32(1) did not throw exception.
PASS view.setFloat64(1) did not throw exception.
Test for indexing that should not work
PASS view[0] is undefined.
PASS view[0] = 3 is defined.
PASS view.getUint8(0) is 1
PASS successfullyParsed is true
TEST COMPLETE