2017-11-17 01:22:13 +00:00
|
|
|
// 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.
|
|
|
|
|
2017-12-01 09:50:28 +00:00
|
|
|
// Flags: --harmony-bigint
|
2017-11-17 01:22:13 +00:00
|
|
|
|
|
|
|
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);
|
2017-12-01 09:53:17 +00:00
|
|
|
|
|
|
|
assertTrue(0n === 0n);
|