Skip to content

Commit 7af65e2

Browse files
Add test
1 parent a9b8b27 commit 7af65e2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/es6/ES6ArrayAPI.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) 2022 ChakraCore Project Contributors. All rights reserved.
34
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
45
//-------------------------------------------------------------------------------------------------------
56

@@ -951,7 +952,21 @@ var tests = [
951952
assert.throws(function () { Array.from.call(Arr, "a"); }, TypeError, "of constructs an array with non-config property", "Cannot redefine property '0'");
952953
}
953954
},
955+
{
956+
name: "Issue #6770 (Assertion failure in copyWithin)",
957+
body() {
958+
function opt() {
959+
const v2 = [-1000000000.0];
960+
v2.length = 4294967295;
961+
const v3 = v2.copyWithin();
962+
return v3;
963+
}
954964

965+
for (let i = 0; i < 0x200; i++) {
966+
opt(false);
967+
}
968+
}
969+
}
955970
];
956971

957972
testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });

0 commit comments

Comments
 (0)