chore: inline log.Interface and handle empty and nil slices the same
This commit is contained in:
+2
-2
@@ -50,7 +50,7 @@ func TestMock_Check(t *testing.T) {
|
||||
name: "different",
|
||||
fields: fields{Logged: []string{"same"}},
|
||||
args: args{wantLogged: []string{"different"}},
|
||||
want: []string{"\n\tError Trace:\tmocks.go:63\n\t \t\t\t\tmocks_test.go:63\n\tError: \tNot equal: \n\t \texpected: []string{\"different\"}\n\t \tactual : []string{\"same\"}\n\t \t\n\t \tDiff:\n\t \t--- Expected\n\t \t+++ Actual\n\t \t@@ -1,3 +1,3 @@\n\t \t ([]string) (len=1) {\n\t \t- (string) (len=9) \"different\"\n\t \t+ (string) (len=4) \"same\"\n\t \t }\n\tTest: \t\n"},
|
||||
want: []string{"\n\tError Trace:\tmocks.go:67\n\t \t\t\t\tmocks_test.go:63\n\tError: \tNot equal: \n\t \texpected: []string{\"different\"}\n\t \tactual : []string{\"same\"}\n\t \t\n\t \tDiff:\n\t \t--- Expected\n\t \t+++ Actual\n\t \t@@ -1,3 +1,3 @@\n\t \t ([]string) (len=1) {\n\t \t- (string) (len=9) \"different\"\n\t \t+ (string) (len=4) \"same\"\n\t \t }\n\tTest: \t\n"},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
@@ -68,7 +68,7 @@ func TestMock_Check(t *testing.T) {
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
logger := New()
|
||||
logger.Logger.Info("logging")
|
||||
logger.Info("logging")
|
||||
logger.Check(t, []string{"info: logging"})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user