blob: c7fe985612446061d9b9198aa6d8d6d6f2188607 [file] [log] [blame]
function shouldBe(actual, expected)
{
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
shouldBe((0xfffffffffff).toString(16), `fffffffffff`);
shouldBe((-0xfffffffffff).toString(16), `-fffffffffff`);
shouldBe((0xfffffffffff000).toString(16), `fffffffffff000`);
shouldBe((-0xfffffffffff000).toString(16), `-fffffffffff000`);
shouldBe((0x8000000000000).toString(16), `8000000000000`);
shouldBe((-0x8000000000000).toString(16), `-8000000000000`);
shouldBe((0x8000000000000 - 1).toString(16), `7ffffffffffff`);
shouldBe((-0x8000000000000 + 1).toString(16), `-7ffffffffffff`);