add support for osc d type

This commit is contained in:
2024-10-13 21:45:03 -05:00
parent 1c68227aac
commit e5d559eb1a
3 changed files with 37 additions and 0 deletions
@@ -58,6 +58,13 @@ const tests = [
bytes: new Uint8Array([47, 104, 101, 108, 108, 111, 0, 0, 44, 104, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255]),
expected: { address: '/hello', args: [{ type: 'h', value: 281474976710655n }] },
},
{
description: 'simple address float64 arg',
bytes: new Uint8Array([
47, 104, 101, 108, 108, 111, 0, 0, 44, 100, 0, 0, 0x40, 0x29, 0x87, 0xec, 0x82, 0x74, 0xb9, 0xe6,
]),
expected: { address: '/hello', args: [{ type: 'd', value: 12.7654763 }] },
},
{
description: 'osc 1.0 spec example 1',
bytes: new Uint8Array([