mirror of https://github.com/tc39/test262.git
Merge pull request #1525 from anba/test-bugs-apr2018
Fix various test bugs
This commit is contained in:
commit
621b3b0478
|
@ -154,4 +154,3 @@ WeakSet
|
|||
# object, go here.
|
||||
|
||||
IsHTMLDDA
|
||||
CannotSuspendMainAgent
|
||||
|
|
|
@ -18,5 +18,5 @@ if (typeof BigInt !== "undefined") {
|
|||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.throws(TypeError, (() => Atomics.store(new TA(ab), 0, 0)));
|
||||
assert.throws(TypeError, (() => Atomics.store(new TA(buffer), 0, 0)));
|
||||
}, views);
|
||||
|
|
|
@ -18,5 +18,5 @@ if (typeof BigInt !== "undefined") {
|
|||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.throws(TypeError, (() => Atomics.sub(new TA(ab), 0, 0)));
|
||||
assert.throws(TypeError, (() => Atomics.sub(new TA(buffer), 0, 0)));
|
||||
}, views);
|
||||
|
|
|
@ -38,5 +38,5 @@ var int32Array = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEME
|
|||
$262.agent.broadcast(int32Array.buffer);
|
||||
$262.agent.sleep(500); // Ample time
|
||||
|
||||
assert.sameValue(getReport(), null);
|
||||
assert.sameValue(Atomics.wake(int32Array, 0), 1);
|
||||
assert.sameValue(getReport(), "ok");
|
||||
|
|
|
@ -27,10 +27,32 @@ assert.sameValue(
|
|||
"BigInt(-Number.MAX_SAFE_INTEGER) === -9007199254740991n"
|
||||
);
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
BigInt(Number.MAX_SAFE_INTEGER + 1);
|
||||
}, "BigInt(Number.MAX_SAFE_INTEGER + 1) throws RangeError");
|
||||
assert.sameValue(
|
||||
BigInt(Number.MAX_SAFE_INTEGER + 1), 9007199254740992n,
|
||||
"BigInt(Number.MAX_SAFE_INTEGER + 1) === 9007199254740992n"
|
||||
);
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
BigInt(-Number.MAX_SAFE_INTEGER - 1);
|
||||
}, "BigInt(-Number.MAX_SAFE_INTEGER - 1) throws RangeError");
|
||||
assert.sameValue(
|
||||
BigInt(-Number.MAX_SAFE_INTEGER - 1), -9007199254740992n,
|
||||
"BigInt(-Number.MAX_SAFE_INTEGER - 1) === -9007199254740992n"
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
BigInt(Number.MAX_SAFE_INTEGER + 2), 9007199254740992n,
|
||||
"BigInt(Number.MAX_SAFE_INTEGER + 2) === 9007199254740992n"
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
BigInt(-Number.MAX_SAFE_INTEGER - 2), -9007199254740992n,
|
||||
"BigInt(-Number.MAX_SAFE_INTEGER - 2) === -9007199254740992n"
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
BigInt(Number.MAX_SAFE_INTEGER + 3), 9007199254740994n,
|
||||
"BigInt(Number.MAX_SAFE_INTEGER + 3) === 9007199254740994n"
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
BigInt(-Number.MAX_SAFE_INTEGER - 3), -9007199254740994n,
|
||||
"BigInt(-Number.MAX_SAFE_INTEGER - 3) === -9007199254740994n"
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue