Skip to content

Commit

Permalink
Fixing level_test.go (absmach#406)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Finley <[email protected]>
  • Loading branch information
mfinley3 authored and drasko committed Sep 26, 2018
1 parent 6600d26 commit b20a846
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions logger/level_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ func TestUnmarshalText(t *testing.T) {
output Level
err error
}{
"select log level Not_A_Level": {"Not_A_Level", 1, ErrInvalidLogLevel},
"select log level Bad_Input": {"Bad_Input", 1, ErrInvalidLogLevel},
"select log level Not_A_Level": {"Not_A_Level", 0, ErrInvalidLogLevel},
"select log level Bad_Input": {"Bad_Input", 0, ErrInvalidLogLevel},

"select log level debug": {"debug", Debug, nil},
"select log level DEBUG": {"DEBUG", Debug, nil},
Expand All @@ -25,8 +25,8 @@ func TestUnmarshalText(t *testing.T) {
"select log level ERROR": {"ERROR", Error, nil},
}

var logLevel Level
for desc, tc := range cases {
var logLevel Level
err := logLevel.UnmarshalText(tc.input)
assert.Equal(t, tc.output, logLevel, fmt.Sprintf("%s: expected %s got %d", desc, tc.output, logLevel))
assert.Equal(t, tc.err, err, fmt.Sprintf("%s: expected %s got %d", desc, tc.err, err))
Expand Down

0 comments on commit b20a846

Please sign in to comment.