mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 16:34:27 +02:00
Merge pull request #1695 from test262-automation/javascriptcore-test262-automation-export-5032c509e
Import test changes from JavaScriptCore
This commit is contained in:
commit
93fb9b9423
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sourceRevisionAtLastExport": "12df785646",
|
"sourceRevisionAtLastExport": "8a25978f29",
|
||||||
"targetRevisionAtLastExport": "5032c509e",
|
"targetRevisionAtLastExport": "70dc33467",
|
||||||
"curatedFiles": {
|
"curatedFiles": {
|
||||||
"/stress/Number-isNaN-basics.js": "DELETED_IN_TARGET",
|
"/stress/Number-isNaN-basics.js": "DELETED_IN_TARGET",
|
||||||
"/stress/Object_static_methods_Object.getOwnPropertyDescriptors-proxy.js": "DELETED_IN_TARGET",
|
"/stress/Object_static_methods_Object.getOwnPropertyDescriptors-proxy.js": "DELETED_IN_TARGET",
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
function shouldBe(actual, expected) {
|
||||||
|
if (actual !== expected)
|
||||||
|
throw new Error('bad value: ' + actual);
|
||||||
|
}
|
||||||
|
|
||||||
|
function reverseInt()
|
||||||
|
{
|
||||||
|
var array = [0, 1, 2, 3];
|
||||||
|
return array.reverse();
|
||||||
|
}
|
||||||
|
|
||||||
|
function reverseDouble()
|
||||||
|
{
|
||||||
|
var array = [0.0, 1.1, 2.2, 3.3];
|
||||||
|
return array.reverse();
|
||||||
|
}
|
||||||
|
|
||||||
|
function reverseContiguous()
|
||||||
|
{
|
||||||
|
var array = [0.0, 1.1, 2.2, 'hello'];
|
||||||
|
return array.reverse();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < 1e4; ++i) {
|
||||||
|
shouldBe(JSON.stringify(reverseInt()), `[3,2,1,0]`);
|
||||||
|
shouldBe(JSON.stringify(reverseDouble()), `[3.3,2.2,1.1,0]`);
|
||||||
|
shouldBe(JSON.stringify(reverseContiguous()), `["hello",2.2,1.1,0]`);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user