Skip to content

Commit

Permalink
yeah yeah whatever
Browse files Browse the repository at this point in the history
  • Loading branch information
mpgerlek committed Apr 20, 2018
1 parent df33475 commit a8d7e48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions merror/Error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ func TestError(t *testing.T) {

err1 := merror.New("errtest-%d", 1)
assert.Error(err1)
exp1 := "errtest-1 (from merror_test.TestError at Error_test.go:17)"
exp1 := "errtest-1 (from merror_test.TestError at Error_test.go:24)"
assert.Equal(exp1, err1.Error())

err2 := merror.Wrap(err1, "errtest-%d", 2)
assert.Error(err2)
exp2 := "errtest-2 (from merror_test.TestError at Error_test.go:22)"
exp2 := "errtest-2 (from merror_test.TestError at Error_test.go:29)"
exp2 += " // Inner: " + exp1
assert.Equal(exp2, err2.Error())

err3 := merror.Wrap(err2)
assert.Error(err3)
exp3 := "wrapped error (from merror_test.TestError at Error_test.go:28)"
exp3 := "wrapped error (from merror_test.TestError at Error_test.go:35)"
exp3 += " // Inner: " + exp2
assert.Equal(exp3, err3.Error())

Expand Down
6 changes: 3 additions & 3 deletions mlog/Log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ func TestLogger(t *testing.T) {
buf = buf[0:n]

ex := []string{
"[DEBUG] Log_test.go:66: debug 1",
"[LOG] Log_test.go:67: print 2",
"[DEBUG] Log_test.go:73: debug 1",
"[LOG] Log_test.go:74: print 2",
"[ERROR] E",
"[LOG] Log_test.go:71: \"yow\"",
"[LOG] Log_test.go:78: \"yow\"",
}
expected := strings.Join(ex, "\n") + "\n"
assert.Equal(expected, string(buf))
Expand Down

0 comments on commit a8d7e48

Please sign in to comment.