tape: Change name of test to TestEncodeDecodeAnyTable

This commit is contained in:
Sasha Koshka 2025-07-04 14:30:23 -04:00
parent 877698d402
commit c118a4d7ef
2 changed files with 3 additions and 3 deletions

View File

@ -154,7 +154,7 @@ func decodeAny(decoder *Decoder, destination reflect.Value, tag Tag) (n int, err
if err != nil { return n, err } if err != nil { return n, err }
nn, err = decodeAny(decoder, value.Elem(), itemTag) nn, err = decodeAny(decoder, value.Elem(), itemTag)
n += nn; if err != nil { return n, err } n += nn; if err != nil { return n, err }
table.SetMapIndex(reflect.ValueOf(key), value) table.SetMapIndex(reflect.ValueOf(key), value.Elem())
} }
default: default:
return n, fmt.Errorf("unknown TN %d", tag.TN()) return n, fmt.Errorf("unknown TN %d", tag.TN())

View File

@ -56,11 +56,11 @@ func TestEncodeAnyTable(test *testing.T) {
if err != nil { test.Fatal(err) } if err != nil { test.Fatal(err) }
} }
func TestEncodeDecodeAnyMap(test *testing.T) { func TestEncodeDecodeAnyTable(test *testing.T) {
err := testEncodeDecodeAny(test, map[uint16] any { err := testEncodeDecodeAny(test, map[uint16] any {
0xF3B9: 1, 0xF3B9: 1,
0x0102: 2, 0x0102: 2,
0x0000: "hi!", 0x0000: []byte("hi!"),
0xFFFF: []uint16 { 0xBEE5, 0x7777 }, 0xFFFF: []uint16 { 0xBEE5, 0x7777 },
0x1234: [][]uint16 { []uint16 { 0x5 }, []uint16 { 0x17, 0xAAAA} }, 0x1234: [][]uint16 { []uint16 { 0x5 }, []uint16 { 0x17, 0xAAAA} },
}, nil) }, nil)