(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestLevel_String(t *testing.T) { |
| 15 | tests := []struct { |
| 16 | name string |
| 17 | level Level |
| 18 | expected string |
| 19 | }{ |
| 20 | {"debug level", LevelDebug, "DEBUG"}, |
| 21 | {"info level", LevelInfo, "INFO"}, |
| 22 | {"error level", LevelError, "ERROR"}, |
| 23 | {"unknown level", Level(999), "UNKNOWN"}, |
| 24 | } |
| 25 | |
| 26 | for _, tt := range tests { |
| 27 | t.Run(tt.name, func(t *testing.T) { |
| 28 | assert.Equal(t, tt.expected, tt.level.String()) |
| 29 | }) |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func TestDefaultConfig(t *testing.T) { |
| 34 | config := DefaultConfig() |