38f6f8ee by miraclesu

update TestParseForm

1 parent 115b1d03
...@@ -124,18 +124,18 @@ func TestParseForm(t *testing.T) { ...@@ -124,18 +124,18 @@ func TestParseForm(t *testing.T) {
124 t.Fatal(err) 124 t.Fatal(err)
125 } 125 }
126 if u.Id != 0 { 126 if u.Id != 0 {
127 t.Error("Id should not be changed") 127 t.Errorf("Id should equal 0 but got %v", u.Id)
128 } 128 }
129 if len(u.tag) != 0 { 129 if len(u.tag) != 0 {
130 t.Error("tag should not be changed") 130 t.Error("tag's length should equal 0 but got %v", len(u.tag))
131 } 131 }
132 if u.Name.(string) != "test" { 132 if u.Name.(string) != "test" {
133 t.Error("should be equal") 133 t.Error("Name should equal `test` but got `%v`", u.Name.(string))
134 } 134 }
135 if u.Age != 40 { 135 if u.Age != 40 {
136 t.Error("should be equal") 136 t.Error("Age should equal 40 but got %v", u.Age)
137 } 137 }
138 if u.Email != "test@gmail.com" { 138 if u.Email != "test@gmail.com" {
139 t.Error("should be equal") 139 t.Error("Email should equal `test@gmail.com` but got `%v`", u.Email)
140 } 140 }
141 } 141 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!