793dbfd9b9
R=jarin@chromium.org Bug: v8:6791 Change-Id: I9d3787f670d44d68cc2c6474621b6c6a25642e5a Reviewed-on: https://chromium-review.googlesource.com/803434 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#49896}
21 lines
490 B
JavaScript
21 lines
490 B
JavaScript
// 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
|
|
|
|
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);
|
|
|
|
assertTrue(0n === 0n);
|