-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update tests for TypedArrays, DataView and ArrayBuffer #669
Conversation
|
||
sample.setUint8(0, 0); | ||
sample.setUint8(-0.1, 42); | ||
assert.sameValue(typedArray[0], 42, "-0.1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little surprising, but it's definitely to-spec.
Leo, hello! This is looking good. I left a few comments in-line, but a couple others apply to multiple files:
|
They look fine here, or I couldn't find anything. Can you point me to an example? |
17e3115 fixes the resets and the different values for {}.toString and {}.valueOf |
Looks like I referenced the wrong file name--sorry for the confusion. The files --- a/test/built-ins/DataView/prototype/getFloat32/detached-buffer-after-integer-byteoffset.js
+++ b/test/built-ins/DataView/prototype/getFloat32/detached-buffer-after-integer-byteoffset.js
@@ -17,22 +17,19 @@ info: |
24.2.1.1 GetViewValue ( view, requestIndex, isLittleEndian, type )
...
6. If numberIndex ≠ getIndex or getIndex < 0, throw a RangeError exception.
...
8. Let buffer be the value of view's [[ViewedArrayBuffer]] internal slot.
9. If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
...
includes: [detachArrayBuffer.js]
---*/
var buffer = new ArrayBuffer(6);
var sample = new DataView(buffer, 0);
$DETACHBUFFER(buffer);
-assert.throws(RangeError, function() {
- sample.getFloat32(1.1);
-}); Here, the quoted steps in GetViewValue are no longer accurate. I don't think |
Merged to |
Ref tc39/ecma262#410