summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/harmony/bigint/regressions.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/harmony/bigint/regressions.js')
-rw-r--r--deps/v8/test/mjsunit/harmony/bigint/regressions.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/harmony/bigint/regressions.js b/deps/v8/test/mjsunit/harmony/bigint/regressions.js
new file mode 100644
index 0000000000..45c8816fe7
--- /dev/null
+++ b/deps/v8/test/mjsunit/harmony/bigint/regressions.js
@@ -0,0 +1,18 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-bigint --noopt
+
+var a = 5n;
+var b = a / -1n;
+assertEquals(5n, a);
+assertEquals(-5n, b);
+assertEquals(5n, 5n / 1n);
+assertEquals(5n, -5n / -1n);
+assertEquals(-5n, -5n / 1n);
+
+assertEquals(0n, 5n % 1n);
+assertEquals(0n, -5n % 1n);
+assertEquals(0n, 5n % -1n);
+assertEquals(0n, -5n % -1n);