Update level_test.go

This commit is contained in:
pgxiaolianzi 2024-02-06 23:41:37 +08:00 committed by GitHub
parent 5d991e1cd0
commit 20dc20bd32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -51,9 +51,9 @@ func TestLevelVar(t *testing.T) {
}
func TestMarshalJSON(t *testing.T) {
func TestLevelMarshalJSON(t *testing.T) {
want := LevelWarn - 3
want_data := []byte{'"', 'I', 'N', 'F', 'O', '+', '1', '"'}
want_data := []byte(`"INFO+1"`)
data, err := want.MarshalJSON()
if err != nil {
t.Fatal(err)
@ -72,7 +72,7 @@ func TestMarshalJSON(t *testing.T) {
func TestLevelMarshalText(t *testing.T) {
want := LevelWarn - 3
want_data := []byte{'I', 'N', 'F', 'O', '+', '1'}
want_data := []byte("INFO+1")
data, err := want.MarshalText()
if err != nil {
t.Fatal(err)