]>
git.proxmox.com Git - mirror_novnc.git/blob - tests/test.int.js
1 /* eslint-disable no-console */
2 const expect
= chai
.expect
;
4 import { toUnsigned32bit
, toSigned32bit
} from '../core/util/int.js';
6 describe('Integer casting', function () {
7 it('should cast unsigned to signed', function () {
8 let expected
= 4294967286;
9 expect(toUnsigned32bit(-10)).to
.equal(expected
);
12 it('should cast signed to unsigned', function () {
14 expect(toSigned32bit(4294967286)).to
.equal(expected
);