Skip to content

Commit 78157e3

Browse files
committed
fix unit test
Signed-off-by: lance6716 <[email protected]>
1 parent b7e35fe commit 78157e3

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

serialization/serialization_test.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -235,52 +235,52 @@ func TestUmarshal_event1(t *testing.T) {
235235
Fields: []Field{
236236
{
237237
Name: "gtid_flags",
238-
Type: FieldIntFixed{
238+
Type: &FieldIntFixed{
239239
Length: 1,
240240
},
241241
},
242242
{
243243
Name: "uuid",
244-
Type: FieldIntFixed{
244+
Type: &FieldIntFixed{
245245
Length: 16,
246246
},
247247
},
248248
{
249249
Name: "gno",
250-
Type: FieldIntVar{},
250+
Type: &FieldIntVar{},
251251
},
252252
{
253253
Name: "tag",
254-
Type: FieldString{},
254+
Type: &FieldString{},
255255
},
256256
{
257257
Name: "last_committed",
258-
Type: FieldIntVar{},
258+
Type: &FieldIntVar{},
259259
},
260260
{
261261
Name: "sequence_number",
262-
Type: FieldIntVar{},
262+
Type: &FieldIntVar{},
263263
},
264264
{
265265
Name: "immediate_commit_timestamp",
266-
Type: FieldUintVar{},
266+
Type: &FieldUintVar{},
267267
},
268268
{
269269
Name: "original_commit_timestamp",
270-
Type: FieldUintVar{},
270+
Type: &FieldUintVar{},
271271
Optional: true,
272272
},
273273
{
274274
Name: "transaction_length",
275-
Type: FieldUintVar{},
275+
Type: &FieldUintVar{},
276276
},
277277
{
278278
Name: "immediate_server_version",
279-
Type: FieldUintVar{},
279+
Type: &FieldUintVar{},
280280
},
281281
{
282282
Name: "original_server_version",
283-
Type: FieldUintVar{},
283+
Type: &FieldUintVar{},
284284
Optional: true,
285285
},
286286
{
@@ -299,15 +299,15 @@ func TestUmarshal_event1(t *testing.T) {
299299
{
300300
Name: "gtid_flags",
301301
ID: 0,
302-
Type: FieldIntFixed{
302+
Type: &FieldIntFixed{
303303
Length: 1,
304304
Value: []uint8{0o1},
305305
},
306306
},
307307
{
308308
Name: "uuid",
309309
ID: 1,
310-
Type: FieldIntFixed{
310+
Type: &FieldIntFixed{
311311
Length: 16,
312312
Value: []uint8{
313313
0x89, 0x6e, 0x78, 0x82, 0x18, 0xfe, 0x11, 0xef, 0xab,
@@ -318,63 +318,63 @@ func TestUmarshal_event1(t *testing.T) {
318318
{
319319
Name: "gno",
320320
ID: 2,
321-
Type: FieldIntVar{
321+
Type: &FieldIntVar{
322322
Value: 1,
323323
},
324324
},
325325
{
326326
Name: "tag",
327327
ID: 3,
328-
Type: FieldString{
328+
Type: &FieldString{
329329
Value: "foobaz",
330330
},
331331
},
332332
{
333333
Name: "last_committed",
334334
ID: 4,
335-
Type: FieldIntVar{
335+
Type: &FieldIntVar{
336336
Value: 0,
337337
},
338338
},
339339
{
340340
Name: "sequence_number",
341341
ID: 5,
342-
Type: FieldIntVar{
342+
Type: &FieldIntVar{
343343
Value: 1,
344344
},
345345
},
346346
{
347347
Name: "immediate_commit_timestamp",
348348
ID: 6,
349-
Type: FieldUintVar{
349+
Type: &FieldUintVar{
350350
Value: 1739823289369365,
351351
},
352352
},
353353
{
354354
Name: "original_commit_timestamp",
355355
ID: 7,
356-
Type: FieldUintVar{},
356+
Type: &FieldUintVar{},
357357
Optional: true,
358358
Skipped: true,
359359
},
360360
{
361361
Name: "transaction_length",
362362
ID: 8,
363-
Type: FieldUintVar{
363+
Type: &FieldUintVar{
364364
Value: 210,
365365
},
366366
},
367367
{
368368
Name: "immediate_server_version",
369369
ID: 9,
370-
Type: FieldUintVar{
370+
Type: &FieldUintVar{
371371
Value: 90200,
372372
},
373373
},
374374
{
375375
Name: "original_server_version",
376376
ID: 10,
377-
Type: FieldUintVar{},
377+
Type: &FieldUintVar{},
378378
Optional: true,
379379
Skipped: true,
380380
},

0 commit comments

Comments
 (0)