mirror of
https://github.com/jwetzell/osc-js.git
synced 2026-09-08 07:38:58 +00:00
more tests
This commit is contained in:
@@ -154,12 +154,23 @@ const badTests = [
|
|||||||
throwsMessage: { name: /^Error$/, message: /not enough bytes/ },
|
throwsMessage: { name: /^Error$/, message: /not enough bytes/ },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: 'float64 bytes too small',
|
description: 'float64 missing bytes',
|
||||||
bytes: new Uint8Array([
|
bytes: new Uint8Array([
|
||||||
47, 104, 101, 108, 108, 111, 0, 0, 44, 100, 0, 0, 0x40, 0x29, 0x87, 0xec, 0x82, 0x74, 0xb9,
|
47, 104, 101, 108, 108, 111, 0, 0, 44, 100, 0, 0, 0x40, 0x29, 0x87, 0xec, 0x82, 0x74, 0xb9,
|
||||||
]),
|
]),
|
||||||
throwsMessage: { name: /^Error$/, message: /not enough bytes/ },
|
throwsMessage: { name: /^Error$/, message: /not enough bytes/ },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
description: 'int64 missing bytes',
|
||||||
|
bytes: new Uint8Array([47, 104, 101, 108, 108, 111, 0, 0, 44, 104, 0, 0, 0, 0, 255, 255, 255, 255, 255]),
|
||||||
|
throwsMessage: { name: /^Error$/, message: /must be at least/ },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
description: 'color missing bytes',
|
||||||
|
bytes: new Uint8Array([47, 104, 101, 108, 108, 111, 0, 0, 44, 114, 0, 0, 20, 21, 22]),
|
||||||
|
throwsMessage: { name: /^Error$/, message: /must be at least/ },
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
describe('OSC Message Decoding Pass', () => {
|
describe('OSC Message Decoding Pass', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user