Skip to content

Commit

Permalink
TestConsoleSeparator with function
Browse files Browse the repository at this point in the history
  • Loading branch information
wijayaerick committed Jul 24, 2020
1 parent 914f3fa commit dafe1a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions zapcore/console_encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var (
Message: `hello`,
Time: _epoch,
Stack: "fake-stack",
Caller: EntryCaller{Defined: true, File: "foo.go", Line: 42},
Caller: EntryCaller{Defined: true, File: "foo.go", Line: 42, Function: "foo.Foo"},
}
)

Expand All @@ -46,22 +46,22 @@ func TestConsoleSeparator(t *testing.T) {
{
desc: "space console separator",
separator: " ",
wantConsole: "0 info main foo.go:42 hello\nfake-stack\n",
wantConsole: "0 info main foo.go:42 foo.Foo hello\nfake-stack\n",
},
{
desc: "default console separator",
separator: "",
wantConsole: "0\tinfo\tmain\tfoo.go:42\thello\nfake-stack\n",
wantConsole: "0\tinfo\tmain\tfoo.go:42\tfoo.Foo\thello\nfake-stack\n",
},
{
desc: "tag console separator",
separator: "\t",
wantConsole: "0\tinfo\tmain\tfoo.go:42\thello\nfake-stack\n",
wantConsole: "0\tinfo\tmain\tfoo.go:42\tfoo.Foo\thello\nfake-stack\n",
},
{
desc: "dash console separator",
separator: "--",
wantConsole: "0--info--main--foo.go:42--hello\nfake-stack\n",
wantConsole: "0--info--main--foo.go:42--foo.Foo--hello\nfake-stack\n",
},
}

Expand Down

0 comments on commit dafe1a2

Please sign in to comment.