(t *testing.T)
| 66 | } |
| 67 | |
| 68 | func (s) TestNewLoggerFromConfigStringInvalid(t *testing.T) { |
| 69 | testCases := []string{ |
| 70 | "", |
| 71 | "*{}", |
| 72 | "s/m,*{}", |
| 73 | "s/m,s/m{a}", |
| 74 | |
| 75 | // Duplicate rules. |
| 76 | "s/m,-s/m", |
| 77 | "-s/m,s/m", |
| 78 | "s/m,s/m", |
| 79 | "s/m,s/m{h:1;m:1}", |
| 80 | "s/m{h:1;m:1},s/m", |
| 81 | "-s/m,-s/m", |
| 82 | "s/*,s/*{h:1;m:1}", |
| 83 | "*,*{h:1;m:1}", |
| 84 | } |
| 85 | for _, tc := range testCases { |
| 86 | l := NewLoggerFromConfigString(tc) |
| 87 | if l != nil { |
| 88 | t.Errorf("With config %q, want logger %v, got %v", tc, nil, l) |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | func (s) TestParseMethodConfigAndSuffix(t *testing.T) { |
| 94 | testCases := []struct { |
nothing calls this directly
no test coverage detected