mirror of https://github.com/tc39/test262.git
Align detached buffer semantics with web reality, R5. Fixes gh-2879
This commit is contained in:
parent
82f38efbab
commit
5c546996ba
|
@ -50,5 +50,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
assert.sameValue(desc.get, fnget, "accessor's get");
|
||||
assert.sameValue(desc.set, fnset, "accessor's set");
|
||||
assert.sameValue(desc.enumerable, true);
|
||||
verifyNotConfigurable(sample, s2);
|
||||
verifyConfigurable(sample, s2);
|
||||
});
|
||||
|
|
|
@ -35,5 +35,5 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
true,
|
||||
"defineProperty's result"
|
||||
);
|
||||
assert.sameValue(sample[0], 0, "side effect check");
|
||||
assert.sameValue(sample[0], 42, "side effect check");
|
||||
});
|
||||
|
|
|
@ -37,11 +37,9 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
);
|
||||
|
||||
assert.sameValue(sample[0], 8, "property value was set");
|
||||
var desc = Object.getOwnPropertyDescriptor(sample, "0");
|
||||
|
||||
assert.sameValue(desc.value, 8, "desc.value");
|
||||
assert.sameValue(desc.writable, true, "property is writable");
|
||||
|
||||
verifyEnumerable(sample, "0");
|
||||
verifyNotConfigurable(sample, "0");
|
||||
let descriptor0 = Object.getOwnPropertyDescriptor(sample, "0");
|
||||
assert.sameValue(descriptor0.value, 8);
|
||||
assert.sameValue(descriptor0.configurable, true);
|
||||
assert.sameValue(descriptor0.enumerable, true);
|
||||
assert.sameValue(descriptor0.writable, true);
|
||||
});
|
||||
|
|
|
@ -20,14 +20,17 @@ features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray]
|
|||
---*/
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
var sample = new TA([42n, 43n]);
|
||||
var desc0 = Object.getOwnPropertyDescriptor(sample, 0);
|
||||
assert.sameValue(desc0.value, 42n, 'The value of desc0.value is 42n');
|
||||
assert.sameValue(desc0.writable, true, 'The value of desc0.writable is true');
|
||||
verifyEnumerable(sample, '0', 'index descriptor is enumerable [0]');
|
||||
verifyConfigurable(sample, '0', 'index descriptor is configurable [0]');
|
||||
var desc1 = Object.getOwnPropertyDescriptor(sample, 1);
|
||||
assert.sameValue(desc1.value, 43n, 'The value of desc1.value is 43n');
|
||||
assert.sameValue(desc1.writable, true, 'The value of desc1.writable is true');
|
||||
verifyEnumerable(sample, '1', 'index descriptor is enumerable [1]');
|
||||
verifyConfigurable(sample, '1', 'index descriptor is configurable [1]');
|
||||
|
||||
let descriptor0 = Object.getOwnPropertyDescriptor(sample, "0");
|
||||
let descriptor1 = Object.getOwnPropertyDescriptor(sample, "1");
|
||||
|
||||
assert.sameValue(descriptor0.value, 42n);
|
||||
assert.sameValue(descriptor0.configurable, true);
|
||||
assert.sameValue(descriptor0.enumerable, true);
|
||||
assert.sameValue(descriptor0.writable, true);
|
||||
|
||||
assert.sameValue(descriptor1.value, 42n);
|
||||
assert.sameValue(descriptor1.configurable, true);
|
||||
assert.sameValue(descriptor1.enumerable, true);
|
||||
assert.sameValue(descriptor1.writable, true);
|
||||
});
|
||||
|
|
|
@ -22,17 +22,16 @@ features: [align-detached-buffer-semantics-with-web-reality, TypedArray]
|
|||
testWithTypedArrayConstructors(function(TA) {
|
||||
var sample = new TA([42, 43]);
|
||||
|
||||
verifyProperty(sample, "0", {
|
||||
value: 42,
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
});
|
||||
let descriptor0 = Object.getOwnPropertyDescriptor(sample, "0");
|
||||
let descriptor1 = Object.getOwnPropertyDescriptor(sample, "1");
|
||||
|
||||
verifyProperty(sample, "1", {
|
||||
value: 43,
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
});
|
||||
assert.sameValue(descriptor0.value, 42);
|
||||
assert.sameValue(descriptor0.configurable, true);
|
||||
assert.sameValue(descriptor0.enumerable, true);
|
||||
assert.sameValue(descriptor0.writable, true);
|
||||
|
||||
assert.sameValue(descriptor1.value, 42);
|
||||
assert.sameValue(descriptor1.configurable, true);
|
||||
assert.sameValue(descriptor1.enumerable, true);
|
||||
assert.sameValue(descriptor1.writable, true);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue