summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/unsigned-right-shift/bigint.js
blob: 1943d1109b3b66e542f04744e350cc130e5a58c3 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (C) 2017 Josh Wolfe. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
description: Unsigned right shift always throws for BigInt values
esid: sec-numeric-types-bigint-unsignedRightShift
info: |
  BigInt::unsignedRightShift (x, y)

  The abstract operation BigInt::unsignedRightShift with two arguments x and y of type BigInt:

  1. Throw a TypeError exception.

features: [BigInt]
---*/

assert.throws(TypeError, function() { 0n >>> 0n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 5n >>> 1n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 5n >>> 2n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 5n >>> 3n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 5n >>> -1n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 5n >>> -2n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 5n >>> -3n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 0n >>> 128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 0n >>> -128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 582n >>> 0n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 582n >>> 127n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 582n >>> 128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 582n >>> 129n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 582n >>> -128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> 64n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> 32n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> 16n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> 0n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> -16n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> -32n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> -64n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> -127n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> -128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { 405972677036361916727469983882855107238581880n >>> -129n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -5n >>> 1n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -5n >>> 2n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -5n >>> 3n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -5n >>> -1n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -5n >>> -2n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -5n >>> -3n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -1n >>> 128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -1n >>> 0n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -1n >>> -128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -582n >>> 0n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -582n >>> 127n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -582n >>> 128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -582n >>> 129n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -582n >>> -128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> 64n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> 32n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> 16n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> 0n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> -16n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> -32n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> -64n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> -127n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> -128n; }, "bigint >>> bigint throws a TypeError");
assert.throws(TypeError, function() { -405972677036361916727469983882855107238581880n >>> -129n; }, "bigint >>> bigint throws a TypeError");

reportCompare(0, 0);