tape: Change name of test to TestEncodeDecodeAnyTable
This commit is contained in:
parent
877698d402
commit
c118a4d7ef
@ -154,7 +154,7 @@ func decodeAny(decoder *Decoder, destination reflect.Value, tag Tag) (n int, err
|
||||
if err != nil { return n, err }
|
||||
nn, err = decodeAny(decoder, value.Elem(), itemTag)
|
||||
n += nn; if err != nil { return n, err }
|
||||
table.SetMapIndex(reflect.ValueOf(key), value)
|
||||
table.SetMapIndex(reflect.ValueOf(key), value.Elem())
|
||||
}
|
||||
default:
|
||||
return n, fmt.Errorf("unknown TN %d", tag.TN())
|
||||
|
@ -56,11 +56,11 @@ func TestEncodeAnyTable(test *testing.T) {
|
||||
if err != nil { test.Fatal(err) }
|
||||
}
|
||||
|
||||
func TestEncodeDecodeAnyMap(test *testing.T) {
|
||||
func TestEncodeDecodeAnyTable(test *testing.T) {
|
||||
err := testEncodeDecodeAny(test, map[uint16] any {
|
||||
0xF3B9: 1,
|
||||
0x0102: 2,
|
||||
0x0000: "hi!",
|
||||
0x0000: []byte("hi!"),
|
||||
0xFFFF: []uint16 { 0xBEE5, 0x7777 },
|
||||
0x1234: [][]uint16 { []uint16 { 0x5 }, []uint16 { 0x17, 0xAAAA} },
|
||||
}, nil)
|
||||
|
Loading…
Reference in New Issue
Block a user