mirror of
https://github.com/jwetzell/osc-js.git
synced 2026-08-16 20:53:25 +00:00
add test for color type
This commit is contained in:
@@ -38,6 +38,11 @@ const tests = [
|
||||
bytes: new Uint8Array([47, 104, 101, 108, 108, 111, 0, 0, 44, 70, 0, 0]),
|
||||
expected: { address: '/hello', args: [{ type: 'F', value: false }] },
|
||||
},
|
||||
{
|
||||
description: 'simple address color arg',
|
||||
bytes: new Uint8Array([47, 104, 101, 108, 108, 111, 0, 0, 44, 114, 0, 0, 20, 21, 22, 10]),
|
||||
expected: { address: '/hello', args: [{ type: 'r', value: { r: 20, g: 21, b: 22, a: 10 } }] },
|
||||
},
|
||||
{
|
||||
description: 'osc 1.0 spec example 1',
|
||||
bytes: new Uint8Array([
|
||||
|
||||
@@ -38,6 +38,11 @@ const tests = [
|
||||
message: { address: '/hello', args: [{ type: 'F', value: false }] },
|
||||
expected: new Uint8Array([47, 104, 101, 108, 108, 111, 0, 0, 44, 70, 0, 0]),
|
||||
},
|
||||
{
|
||||
description: 'simple address color arg',
|
||||
message: { address: '/hello', args: [{ type: 'r', value: { r: 20, g: 21, b: 22, a: 10 } }] },
|
||||
expected: new Uint8Array([47, 104, 101, 108, 108, 111, 0, 0, 44, 114, 0, 0, 20, 21, 22, 10]),
|
||||
},
|
||||
{
|
||||
description: 'osc 1.0 spec example 1',
|
||||
message: { address: '/oscillator/4/frequency', args: [{ type: 'f', value: 440 }] },
|
||||
|
||||
Reference in New Issue
Block a user