mirror of
https://github.com/tc39/test262.git
synced 2025-07-12 08:34:41 +02:00
Merge pull request #1991 from test262-automation/javascriptcore-test262-automation-export-cab19d71a6
Import test changes from JavaScriptCore
This commit is contained in:
commit
f33a34b83e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"sourceRevisionAtLastExport": "205489c4f0",
|
||||
"targetRevisionAtLastExport": "cab19d71a6",
|
||||
"sourceRevisionAtLastExport": "2b233fa3c0",
|
||||
"targetRevisionAtLastExport": "8e3c6d0484",
|
||||
"curatedFiles": {
|
||||
"/stress/Number-isNaN-basics.js": "DELETED_IN_TARGET",
|
||||
"/stress/Object_static_methods_Object.getOwnPropertyDescriptors-proxy.js": "DELETED_IN_TARGET",
|
||||
|
@ -0,0 +1,23 @@
|
||||
//@ runBigIntEnabled
|
||||
|
||||
function assert(a, e) {
|
||||
if (a !== e) {
|
||||
throw new Error("Bad!");
|
||||
}
|
||||
}
|
||||
|
||||
function branchTest(a) {
|
||||
if (a)
|
||||
return a;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
noInline(branchTest);
|
||||
|
||||
for (let i = 0; i < 100000; i++) {
|
||||
assert(branchTest(10n), 10n);
|
||||
assert(branchTest(1n), 1n);
|
||||
assert(branchTest(0n), false);
|
||||
assert(branchTest(-1n), -1n);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
//@ runBigIntEnabled
|
||||
|
||||
function assert(a, e) {
|
||||
if (a !== e) {
|
||||
throw new Error("Bad!");
|
||||
}
|
||||
}
|
||||
|
||||
function logicalAnd(a, b) {
|
||||
return a && b;
|
||||
}
|
||||
noInline(logicalAnd);
|
||||
|
||||
for (let i = 0; i < 100000; i++) {
|
||||
assert(logicalAnd(1n, 10n), 10n);
|
||||
assert(logicalAnd(1n, 1n), 1n);
|
||||
assert(logicalAnd(1n, 0n), 0n);
|
||||
assert(logicalAnd(1n, -1n), -1n);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
//@ runBigIntEnabled
|
||||
|
||||
function assert(a, e) {
|
||||
if (a !== e) {
|
||||
throw new Error("Bad!");
|
||||
}
|
||||
}
|
||||
|
||||
function logicalNot(a) {
|
||||
return !a;
|
||||
}
|
||||
noInline(logicalNot);
|
||||
|
||||
for (let i = 0; i < 100000; i++) {
|
||||
assert(logicalNot(10n), false);
|
||||
assert(logicalNot(1n), false);
|
||||
assert(logicalNot(0n), true);
|
||||
assert(logicalNot(-1n), false);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
//@ runBigIntEnabled
|
||||
|
||||
function assert(a, e) {
|
||||
if (a !== e) {
|
||||
throw new Error("Bad!");
|
||||
}
|
||||
}
|
||||
|
||||
function logicalOr(a, b) {
|
||||
return a || b;
|
||||
}
|
||||
noInline(logicalOr);
|
||||
|
||||
for (let i = 0; i < 100000; i++) {
|
||||
assert(logicalOr(10n, "abc"), 10n);
|
||||
assert(logicalOr(1n, "abc"), 1n);
|
||||
assert(logicalOr(0n, "abc"), "abc");
|
||||
assert(logicalOr(-1n, "abc"), -1n);
|
||||
}
|
||||
|
@ -1,4 +1,11 @@
|
||||
//@ skip if $memoryLimited
|
||||
|
||||
function test() {
|
||||
|
||||
// We don't support WebAssembly everywhere, so check for its existance before doing anything else.
|
||||
if (!this.WebAssembly)
|
||||
return;
|
||||
|
||||
let bigArray = new Array(0x7000000);
|
||||
bigArray[0] = 1.1;
|
||||
bigArray[1] = 1.2;
|
||||
@ -32,3 +39,7 @@ try {
|
||||
|
||||
if (ok)
|
||||
throw "Error: did not throw error";
|
||||
|
||||
}
|
||||
|
||||
test();
|
||||
|
@ -1,4 +1,11 @@
|
||||
//@ skip if $memoryLimited
|
||||
|
||||
function test() {
|
||||
|
||||
// We don't support WebAssembly everywhere, so check for its existance before doing anything else.
|
||||
if (!this.WebAssembly)
|
||||
return;
|
||||
|
||||
let bigArray = new Array(0x7000000);
|
||||
bigArray[0] = 1.1;
|
||||
bigArray[1] = 1.2;
|
||||
@ -32,3 +39,7 @@ try {
|
||||
|
||||
if (ok)
|
||||
throw "Error: did not throw error";
|
||||
|
||||
}
|
||||
|
||||
test();
|
||||
|
@ -1,4 +1,11 @@
|
||||
//@ skip if $memoryLimited
|
||||
|
||||
function test() {
|
||||
|
||||
// We don't support WebAssembly everywhere, so check for its existance before doing anything else.
|
||||
if (!this.WebAssembly)
|
||||
return;
|
||||
|
||||
let bigArray = new Array(0x7000000);
|
||||
bigArray[0] = 1.1;
|
||||
bigArray[1] = 1.2;
|
||||
@ -30,3 +37,7 @@ try {
|
||||
|
||||
if (ok)
|
||||
throw "Error: did not throw error";
|
||||
|
||||
}
|
||||
|
||||
test();
|
||||
|
@ -0,0 +1,12 @@
|
||||
//@ requireOptions("--jitPolicyScale=0")
|
||||
|
||||
function foo(x) {
|
||||
try {
|
||||
new x();
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
foo(function() {});
|
||||
for (let i = 0; i < 10000; ++i)
|
||||
foo(() => undefined);
|
@ -0,0 +1,12 @@
|
||||
//@ requireOptions("--jitPolicyScale=0")
|
||||
|
||||
// This test passes if it does not crash.
|
||||
|
||||
let x = {}
|
||||
let enUS = ['en', 'US'].join('-')
|
||||
for (let i=0; i<100; i++) {
|
||||
Intl.NumberFormat(enUS)
|
||||
}
|
||||
for (let i=0; i<10000; i++) {
|
||||
x[enUS]
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user