MCPcopy Create free account
hub / github.com/apache/dubbo-go-hessian2 / TestJavaSqlTimeDecode

Function TestJavaSqlTimeDecode

java_sql_time_test.go:54–62  ·  view source on GitHub ↗

test local time between go and java java encode go decode

(t *testing.T)

Source from the content-addressed store, hash-verified

52// java encode
53// go decode
54func TestJavaSqlTimeDecode(t *testing.T) {
55 sqlTime := time.Date(1997, 1, 1, 13, 15, 46, 0, time.UTC)
56 testSqlTime := java_sql_time.Time{Time: sqlTime}
57 testDecodeJavaSqlTime(t, "javaSql_decode_time", &testSqlTime)
58
59 sqlDate := time.Date(2020, 8, 9, 0, 0, 0, 0, time.UTC)
60 testDateTime := java_sql_time.Date{Time: sqlDate}
61 testDecodeJavaSqlTime(t, "javaSql_decode_date", &testDateTime)
62}
63
64func testDecodeJavaSqlTime(t *testing.T, method string, expected java_sql_time.JavaSqlTime) {
65 r, e := decodeJavaResponse(method, "", false)

Callers

nothing calls this directly

Calls 1

testDecodeJavaSqlTimeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…