(t *testing.T)
| 346 | } |
| 347 | |
| 348 | func TestSerializeBeginWithMagicNumber(t *testing.T) { |
| 349 | strSlice := []string{"str1", "str1", "", "", "str2"} |
| 350 | fory := NewFory(WithXlang(true), WithCompatible(false), WithRefTracking(true)) |
| 351 | bytes, err := fory.Marshal(strSlice) |
| 352 | require.Nil(t, err, fmt.Sprintf("serialize value %s with type %s failed: %s", |
| 353 | reflect.ValueOf(strSlice), reflect.TypeOf(strSlice), err)) |
| 354 | // Contains at least one byte for the bitmap. |
| 355 | require.True(t, len(bytes) >= 1) |
| 356 | } |
| 357 | |
| 358 | type Foo struct { |
| 359 | F1 int32 |
nothing calls this directly
no test coverage detected