forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbug_4653428.js
More file actions
25 lines (21 loc) · 894 Bytes
/
bug_4653428.js
File metadata and controls
25 lines (21 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
/// <reference path="../UnitTestFramework/UnitTestFramework.js" />
if (this.WScript && this.WScript.LoadScriptFile) { // Check for running in ch
this.WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
}
[
(-1 >>> 0) + 1,
(-1 >>> 0) + 2,
Infinity,
].forEach(function(len) {
assert.throws(function() {
new Uint8Array(len);
}, RangeError);
assert.throws(function() {
new Uint8Array({length: len});
}, RangeError);
});
print("pass");