diff --git a/tape/dynamic_test.go b/tape/dynamic_test.go index 57986c5..1023063 100644 --- a/tape/dynamic_test.go +++ b/tape/dynamic_test.go @@ -27,6 +27,12 @@ var samplePayloads = [][]byte { 0x02, 0x23, byte(LSI.WithCN(1)), 0x45, 0x67, 0x02, 0x24, byte(LI.WithCN(3)), 0x45, 0x67, 0x89, 0xAB, }, + /* map[uint16] any */ []byte { + byte(KTV.WithCN(0)), 3, + 0x00, 0x01, 0x63, 0x43, 0xF4, 0xC0, 0x00, + 0x00, 0x02, 0x82, 'h', 'i', + 0x00, 0x03, 0x21, 0x39, 0x92, + }, } var sampleValues = []any { @@ -49,6 +55,11 @@ var sampleValues = []any { 0x0223: int16(0x4567), 0x0224: uint32(0x456789AB), }, + /* map[uint16] any */ map[uint16] any { + 0x0001: float32(489.5), + 0x0002: "hi", + 0x0003: uint16(0x3992), + }, } type userDefinedInteger int16 @@ -195,7 +206,7 @@ func TestDecodeWrongType(test *testing.T) { { var dest []string; arrayCase(&dest) } } // tables should only assign to other tables - if index != 12 { + if index != 12 && index != 13 { test.Log("- map[uint16] any") { var dest = map[uint16] any { }; arrayCase(&dest) } }