소스 검색

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",

Loading…
취소
저장