justxuewei commented on a change in pull request #288:
URL: https://github.com/apache/dubbo-go-hessian2/pull/288#discussion_r749833232
##########
File path: hessian_test/dup_struct_name_test.go
##########
@@ -181,3 +181,9 @@ func checkResponseBody(t *testing.T, decodedResponse
*hessian.Response, h *hessi
out, _ :=
hessian.EnsureInterface(hessian.UnpackPtrValue(hessian.EnsurePackValue(decodedResponse.RspObj)),
nil)
assert.Equal(t, in, out)
}
+
+func TestGetGoName(t *testing.T) {
+ assert.Equal(t, "time.Time", hessian.GetGoName(time.Now()))
+ assert.Equal(t,
"github.com/apache/dubbo-go-hessian2/hessian_test_test/hessian_test.CaseZ",
hessian.GetGoName(&CaseZ{}))
+ assert.Equal(t,
"github.com/apache/dubbo-go-hessian2/hessian_test/hessian_test/hessian_test.CaseZ",
hessian.GetGoName(&dupclass.CaseZ{}))
+}
Review comment:
Why test GetGoName twice? I think the test cases could be removed, and
use the use cases at `pojo_test.go`.
--
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]