pandalee99 commented on code in PR #2703:
URL: https://github.com/apache/fory/pull/2703#discussion_r2404470998
##########
go/fory/fory_test.go:
##########
@@ -158,10 +158,11 @@ func TestSerializePtr(t *testing.T) {
}
func TestSerializeSlice(t *testing.T) {
+ t.Skip()
Review Comment:
Should this test be skipped?
##########
go/fory/map.go:
##########
@@ -121,7 +121,7 @@ func (s mapSerializer) Write(f *Fory, buf *ByteBuffer,
value reflect.Value) erro
} else {
if valValid {
if valueSerializer != nil {
- if
valueSerializer.NeedWriteRef() {
+ if
valueSerializer.NeedWriteRef() == 1 {
Review Comment:
This way of judgment seems not elegant enough. @chaokunyang Do you have any
suggestions?
##########
go/fory/fory_test.go:
##########
@@ -573,32 +574,6 @@ func TestMapEachIndividually(t *testing.T) {
}
}
-func TestArrayEachIndividually(t *testing.T) {
- fory := NewFory(true)
- for _, srcAny := range commonArray() {
- srcType := reflect.TypeOf(srcAny)
- endPtr := reflect.New(srcType)
- data, _ := fory.Marshal(srcAny)
- _ = fory.Unmarshal(data, endPtr.Interface())
- endVal := endPtr.Elem()
- endAny := endVal.Interface()
- require.Equal(t, srcAny, endAny)
- }
-}
-
-func TestSliceEachIndividually(t *testing.T) {
Review Comment:
This test code seems to have remained unchanged. Should we delete it?
##########
go/fory/fory_test.go:
##########
@@ -573,32 +574,6 @@ func TestMapEachIndividually(t *testing.T) {
}
}
-func TestArrayEachIndividually(t *testing.T) {
- fory := NewFory(true)
- for _, srcAny := range commonArray() {
- srcType := reflect.TypeOf(srcAny)
- endPtr := reflect.New(srcType)
- data, _ := fory.Marshal(srcAny)
- _ = fory.Unmarshal(data, endPtr.Interface())
- endVal := endPtr.Elem()
- endAny := endVal.Interface()
- require.Equal(t, srcAny, endAny)
- }
-}
-
-func TestSliceEachIndividually(t *testing.T) {
Review Comment:
This test code seems to have remained unchanged. Should we delete it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]