github.com/mundipagg/tracer-splunk-writer@v1.0.6/level_test.go (about) 1 package splunk 2 3 import ( 4 "testing" 5 6 "github.com/mralves/tracer" 7 "github.com/stretchr/testify/assert" 8 ) 9 10 func TestLevel(t *testing.T) { 11 t.Parallel() 12 is := assert.New(t) 13 cases := map[uint8]string{ 14 tracer.Debug: Debug, 15 tracer.Informational: Information, 16 tracer.Notice: Warning, 17 tracer.Warning: Warning, 18 tracer.Error: Error, 19 tracer.Critical: Error, 20 tracer.Alert: Fatal, 21 tracer.Fatal: Fatal, 22 9: Verbose, 23 } 24 for input, expected := range cases { 25 actual := Level(input) 26 is.Equal(expected, actual, "it should return the expected value") 27 } 28 }