Skip to content
Snippets Groups Projects
Unverified Commit ead09a50 authored by Leo Balter's avatar Leo Balter Committed by GitHub
Browse files

Merge pull request #1658 from test262-automation/javascriptcore-test262-automation-export-4314e2ca

Import test changes from JavaScriptCore
parents aba414ca 9d20f507
No related branches found
No related tags found
No related merge requests found
{ {
"sourceRevisionAtLastExport": "00228d3ccc", "sourceRevisionAtLastExport": "5895364ed5",
"targetRevisionAtLastExport": "4314e2cab", "targetRevisionAtLastExport": "df1fc484e",
"curatedFiles": {} "curatedFiles": {}
} }
\ No newline at end of file
function shouldBe(actual, expected)
{
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
noInline(shouldBe);
function test1(array)
{
for (var i = 0; i < 5; ++i) {
array[0] = array[0] + 1;
}
return array;
}
noInline(test1);
function test2(array)
{
for (var i = 0; i < 5; ++i) {
array[0] = array[0] + 1;
}
return array;
}
noInline(test2);
function test3(array)
{
for (var i = 0; i < 5; ++i) {
array[0] = array[0] + 1;
}
return array;
}
noInline(test3);
for (var i = 0; i < 1e5; ++i) {
shouldBe(String(test1([0, 1, 2, 3, 4])), `5,1,2,3,4`);
shouldBe(String(test2([0.1, 1.1, 2.1, 3.1, 4.1])), `5.1,1.1,2.1,3.1,4.1`);
shouldBe(String(test3(['C', 'o', 'c', 'o', 'a'])), `C11111,o,c,o,a`);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment