You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/03/05 01:03:34 UTC

[GitHub] [dubbo-go-hessian2] wongoo commented on pull request #258: add unit test for big decimal in map

wongoo commented on pull request #258:
URL: https://github.com/apache/dubbo-go-hessian2/pull/258#issuecomment-791066146


   @wenxuwan  try add the following code in serialize_test.go
   
   ```go
   
   func TestDecimalMapJavaDecode(t *testing.T) {
   	var d big.Decimal
   	_ = d.FromString("100.256")
   	d.Value = d.String()
   	m := map[interface{}]interface{}{"test_BigDecimal": &d}
   
   	out, err := decodeJavaResponse("customReplyTypedFixedDecimalMap", "", false)
   	if err != nil {
   		t.Errorf("%#v %v", out, err)
   		return
   	}
   
   	resp := out.(map[interface{}]interface{})
   	assert.True(t, reflect.DeepEqual(m, resp))
   }
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org