]> git.proxmox.com Git - mirror_novnc.git/blame - tests/test.int.js
Merge branch 'camelcase' of https://github.com/samhed/noVNC
[mirror_novnc.git] / tests / test.int.js
CommitLineData
9575ded8
NL
1/* eslint-disable no-console */
2const expect = chai.expect;
3
4import { toUnsigned32bit, toSigned32bit } from '../core/util/int.js';
5
6describe('Integer casting', function () {
7 it('should cast unsigned to signed', function () {
8 let expected = 4294967286;
9 expect(toUnsigned32bit(-10)).to.equal(expected);
10 });
11
12 it('should cast signed to unsigned', function () {
13 let expected = -10;
14 expect(toSigned32bit(4294967286)).to.equal(expected);
15 });
16});