v8/test/mjsunit/harmony/bigint/regressions.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
490 B
JavaScript
Raw Normal View History

// 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);