(t *testing.T)
| 740 | } |
| 741 | |
| 742 | func TestSliceEachIndividually(t *testing.T) { |
| 743 | fory := NewFory(WithXlang(true), WithCompatible(false), WithRefTracking(true)) |
| 744 | for _, srcAny := range commonSlice() { |
| 745 | srcType := reflect.TypeOf(srcAny) |
| 746 | endPtr := reflect.New(srcType) |
| 747 | data, _ := fory.Marshal(srcAny) |
| 748 | _ = fory.Unmarshal(data, endPtr.Interface()) |
| 749 | endVal := endPtr.Elem() |
| 750 | endAny := endVal.Interface() |
| 751 | require.Equal(t, srcAny, endAny) |
| 752 | } |
| 753 | } |
| 754 | |
| 755 | // Test Fory's serialization and deserialization of a struct with a slice of nested structs. |
| 756 | func TestStructWithNestedSlice(t *testing.T) { |
nothing calls this directly
no test coverage detected