diff --git a/net/goai/goai_z_unit_test.go b/net/goai/goai_z_unit_test.go index 1c58610c8..f52c748fa 100644 --- a/net/goai/goai_z_unit_test.go +++ b/net/goai/goai_z_unit_test.go @@ -1151,7 +1151,7 @@ func Test_NameFromJsonTag(t *testing.T) { gtest.C(t, func(t *gtest.T) { type CreateReq struct { gmeta.Meta `path:"/CreateReq" method:"POST"` - Name string `json:"nick_name, omitempty"` + Name string `json:"nick_name,omitempty"` } var ( @@ -1172,7 +1172,7 @@ func Test_NameFromJsonTag(t *testing.T) { gtest.C(t, func(t *gtest.T) { type CreateReq struct { gmeta.Meta `path:"/CreateReq" method:"GET"` - Name string `json:"nick_name, omitempty" in:"header"` + Name string `json:"nick_name,omitempty" in:"header"` } var ( err error diff --git a/util/gconv/gconv_z_unit_builtin_gtime_theory_test.go b/util/gconv/gconv_z_unit_builtin_gtime_theory_test.go index 67c26166e..6bce71177 100644 --- a/util/gconv/gconv_z_unit_builtin_gtime_theory_test.go +++ b/util/gconv/gconv_z_unit_builtin_gtime_theory_test.go @@ -1,3 +1,9 @@ +// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. +// +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, +// You can obtain one at https://github.com/gogf/gf. + package gconv_test import ( diff --git a/util/gconv/gconv_z_unit_string_test.go b/util/gconv/gconv_z_unit_string_test.go index 509e4cc8e..d085ecd4a 100644 --- a/util/gconv/gconv_z_unit_string_test.go +++ b/util/gconv/gconv_z_unit_string_test.go @@ -70,6 +70,9 @@ var stringTests = []struct { {gvar.New(123), "123"}, {gvar.New(123.456), "123.456"}, + {myString("123"), "123"}, + {(*myString)(nil), ""}, + {goTime, "1911-10-10 00:00:00 +0000 UTC"}, {&goTime, "1911-10-10 00:00:00 +0000 UTC"}, // TODO The String method of gtime not equals to time.Time @@ -77,6 +80,7 @@ var stringTests = []struct { {&gfTime, "1911-10-10 00:00:00"}, //{gfTime, "1911-10-10 00:00:00 +0000 UTC"}, //{&gfTime, "1911-10-10 00:00:00 +0000 UTC"}, + } var (