@@ -7,53 +7,53 @@ import (
77)
88
99var testCases = []struct {
10- name string
10+ name string
1111 dec , enc []byte
1212}{
1313 {
1414 name : "Empty" ,
15- dec : []byte {},
16- enc : []byte {0x01 },
15+ dec : []byte {},
16+ enc : []byte {0x01 },
1717 },
1818 {
1919 name : "1 character" ,
20- dec : []byte {'1' },
21- enc : []byte {0x02 , '1' },
20+ dec : []byte {'1' },
21+ enc : []byte {0x02 , '1' },
2222 },
2323 {
2424 name : "1 zero" ,
25- dec : []byte {0x00 },
26- enc : []byte {0x01 , 0x01 },
25+ dec : []byte {0x00 },
26+ enc : []byte {0x01 , 0x01 },
2727 },
2828 {
2929 name : "2 zeroes" ,
30- dec : []byte {0x00 , 0x00 },
31- enc : []byte {0x01 , 0x01 , 0x01 },
30+ dec : []byte {0x00 , 0x00 },
31+ enc : []byte {0x01 , 0x01 , 0x01 },
3232 },
3333 {
3434 name : "3 zeroes" ,
35- dec : []byte {0x00 , 0x00 , 0x00 },
36- enc : []byte {0x01 , 0x01 , 0x01 , 0x01 },
35+ dec : []byte {0x00 , 0x00 , 0x00 },
36+ enc : []byte {0x01 , 0x01 , 0x01 , 0x01 },
3737 },
3838 {
3939 name : "5 characters" ,
40- dec : []byte ("12345" ),
41- enc : []byte ("\x06 12345" ),
40+ dec : []byte ("12345" ),
41+ enc : []byte ("\x06 12345" ),
4242 },
4343 {
4444 name : "Embedded zero" ,
45- dec : []byte ("12345\x00 6789" ),
46- enc : []byte ("\x06 12345\x05 6789" ),
45+ dec : []byte ("12345\x00 6789" ),
46+ enc : []byte ("\x06 12345\x05 6789" ),
4747 },
4848 {
4949 name : "Starting and embedded zero" ,
50- dec : []byte ("\x00 12345\x00 6789" ),
51- enc : []byte ("\x01 \x06 12345\x05 6789" ),
50+ dec : []byte ("\x00 12345\x00 6789" ),
51+ enc : []byte ("\x01 \x06 12345\x05 6789" ),
5252 },
5353 {
5454 name : "Embedded and trailing zero" ,
55- dec : []byte ("12345\x00 6789\x00 " ),
56- enc : []byte ("\x06 12345\x05 6789\x01 " ),
55+ dec : []byte ("12345\x00 6789\x00 " ),
56+ enc : []byte ("\x06 12345\x05 6789\x01 " ),
5757 },
5858 {
5959 name : "253 non-zero bytes" ,
0 commit comments