mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-14 19:12:04 +08:00
完善虚拟机连接
This commit is contained in:
15
VM/novnc/tests/test.int.js
Normal file
15
VM/novnc/tests/test.int.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const expect = chai.expect;
|
||||
|
||||
import { toUnsigned32bit, toSigned32bit } from '../core/util/int.js';
|
||||
|
||||
describe('Integer casting', function () {
|
||||
it('should cast unsigned to signed', function () {
|
||||
let expected = 4294967286;
|
||||
expect(toUnsigned32bit(-10)).to.equal(expected);
|
||||
});
|
||||
|
||||
it('should cast signed to unsigned', function () {
|
||||
let expected = -10;
|
||||
expect(toSigned32bit(4294967286)).to.equal(expected);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user