update TestParseForm
Showing
1 changed file
with
5 additions
and
5 deletions
| ... | @@ -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 | } | ... | ... |
-
Please register or sign in to post a comment