()
| 394 | TestOutOfRange(); |
| 395 | |
| 396 | function TestGeneralAccessors() { |
| 397 | var a = new DataView(new ArrayBuffer(256)); |
| 398 | function CheckAccessor(name) { |
| 399 | var f = a[name]; |
| 400 | assertThrows(function() { f(); }, TypeError); |
| 401 | f.call(a, 0, 0); // should not throw |
| 402 | assertThrows(function() { f.call({}, 0, 0); }, TypeError); |
| 403 | f.call(a); |
| 404 | f.call(a, 1); // should not throw |
| 405 | } |
| 406 | CheckAccessor("getUint8"); |
| 407 | CheckAccessor("setUint8"); |
| 408 | CheckAccessor("getInt8"); |
| 409 | CheckAccessor("setInt8"); |
| 410 | CheckAccessor("getUint16"); |
| 411 | CheckAccessor("setUint16"); |
| 412 | CheckAccessor("getInt16"); |
| 413 | CheckAccessor("setInt16"); |
| 414 | CheckAccessor("getUint32"); |
| 415 | CheckAccessor("setUint32"); |
| 416 | CheckAccessor("getInt32"); |
| 417 | CheckAccessor("setInt32"); |
| 418 | CheckAccessor("getFloat32"); |
| 419 | CheckAccessor("setFloat32"); |
| 420 | CheckAccessor("getFloat64"); |
| 421 | CheckAccessor("setFloat64"); |
| 422 | } |
| 423 | |
| 424 | TestGeneralAccessors(); |
| 425 |
no test coverage detected