浏览代码

Add unmarshal nil test for prefer ip

tags/v2.0.0-rc1
9seconds 5 年前
父节点
当前提交
3d9a63a1f0
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      config/type_prefer_ip_test.go

+ 6
- 0
config/type_prefer_ip_test.go 查看文件

@@ -18,6 +18,12 @@ type TypePreferIPTestSuite struct {
18 18
 	suite.Suite
19 19
 }
20 20
 
21
+func (suite *TypePreferIPTestSuite) TestUnmarshalNil() {
22
+	typ := &config.TypePreferIP{}
23
+	suite.NoError(typ.UnmarshalText(nil))
24
+	suite.Empty(typ.String())
25
+}
26
+
21 27
 func (suite *TypePreferIPTestSuite) TestUnmarshalFail() {
22 28
 	testData := []string{
23 29
 		"p",

正在加载...
取消
保存