Skip to content

Commit 5ba6731

Browse files
Added test
1 parent cd03239 commit 5ba6731

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

test/es6/ES6ArrayAPI_slow.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//-------------------------------------------------------------------------------------------------------
2+
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
4+
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
5+
//-------------------------------------------------------------------------------------------------------
6+
7+
WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
8+
9+
const uint32Max = 4294967295;
10+
const tests = [
11+
{
12+
name: "Issue #6770 (Assertion failure in copyWithin)",
13+
body() {
14+
const array = [];
15+
array.length = uint32Max;
16+
array.copyWithin();
17+
}
18+
}
19+
];
20+
testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });

test/es6/rlexe.xml

+7
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,13 @@
508508
<compile-flags>-ES6ObjectLiterals -args summary -endargs</compile-flags>
509509
</default>
510510
</test>
511+
<test>
512+
<default>
513+
<files>ES6ArrayAPI_slow.js</files>
514+
<compile-flags>-ES6ObjectLiterals -args summary -endargs</compile-flags>
515+
<tags>Slow</tags>
516+
</default>
517+
</test>
511518
<test>
512519
<default>
513520
<files>ES6ArrayUseConstructor.js</files>

0 commit comments

Comments
 (0)