github.com/blystad/deis@v0.11.0/logger/syslog/priority_test.go (about) 1 package syslog 2 3 import ( 4 "testing" 5 ) 6 7 func TestFacilityToString(t *testing.T) { 8 var fac Facility = 100 9 if fac.String() != "unknown" { 10 t.Errorf("facility != unknown; got %s", fac.String()) 11 } 12 fac = 20 13 if fac.String() != "local4" { 14 t.Errorf("facility != local4; got %s", fac.String()) 15 } 16 } 17 18 func TestSeverityToString(t *testing.T) { 19 var sev Severity = 100 20 if sev.String() != "unknown" { 21 t.Errorf("severity != unknown; got %s", sev.String()) 22 } 23 sev = 5 24 if sev.String() != "notice" { 25 t.Errorf("severity != local4; got %s", sev.String()) 26 } 27 }