@@ -157,6 +157,7 @@ func TestDecodeVar(t *testing.T) {
157
157
{
158
158
// From the example on https://dev.mysql.com/doc/dev/mysql-server/latest/PageLibsMysqlSerialization.html
159
159
// But converted to LE
160
+ // unsigned integer, 65535
160
161
[]byte {0b11111011 , 0b11111111 , 0b00000111 },
161
162
true ,
162
163
uint64 (65535 ),
@@ -165,27 +166,30 @@ func TestDecodeVar(t *testing.T) {
165
166
{
166
167
// From the example on https://dev.mysql.com/doc/dev/mysql-server/latest/PageLibsMysqlSerialization.html
167
168
// But converted to LE
168
- []byte {0b11111011 , 0b11111111 , 0b00001111 },
169
+ // signed integer, 65535
170
+ []byte {0b11110011 , 0b11111111 , 0b00001111 },
169
171
false ,
170
172
int64 (65535 ),
171
173
"" ,
172
174
},
173
- // {
174
- // // From the example on https://dev.mysql.com/doc/dev/mysql-server/latest/PageLibsMysqlSerialization.html
175
- // // But converted to LE
176
- // []byte{0b11101011, 0b11111111, 0b00001111},
177
- // false,
178
- // int64(-65535),
179
- // "",
180
- // },
181
- // {
182
- // // From the example on https://dev.mysql.com/doc/dev/mysql-server/latest/PageLibsMysqlSerialization.html
183
- // // But converted to LE
184
- // []byte{0b11111011, 0b11111111, 0b00001111},
185
- // false,
186
- // int64(-65536),
187
- // "",
188
- // },
175
+ {
176
+ // From the example on https://dev.mysql.com/doc/dev/mysql-server/latest/PageLibsMysqlSerialization.html
177
+ // But converted to LE
178
+ // signed integer, -65535
179
+ []byte {0b11101011 , 0b11111111 , 0b00001111 },
180
+ false ,
181
+ int64 (- 65535 ),
182
+ "" ,
183
+ },
184
+ {
185
+ // From the example on https://dev.mysql.com/doc/dev/mysql-server/latest/PageLibsMysqlSerialization.html
186
+ // But converted to LE
187
+ // signed integer, 65536
188
+ []byte {0b11111011 , 0b11111111 , 0b00001111 },
189
+ false ,
190
+ int64 (- 65536 ),
191
+ "" ,
192
+ },
189
193
{
190
194
[]byte {0x5d , 0x03 },
191
195
true ,
0 commit comments