From b99a09d73bf70efa33a16137bb053939f4a69905 Mon Sep 17 00:00:00 2001 From: miraclesu Date: Thu, 25 Jul 2013 22:50:29 +0800 Subject: [PATCH] Add two test cases for ParseForm --- utils_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils_test.go b/utils_test.go index 8fc4d45c..bfaa8c35 100644 --- a/utils_test.go +++ b/utils_test.go @@ -27,6 +27,12 @@ func TestParseForm(t *testing.T) { if err := ParseForm(form, &u); err != nil { t.Fatal(err) } + if u.Id != 0 { + t.Error("Id should not be changed") + } + if len(u.tag) != 0 { + t.Error("tag should not be changed") + } if u.Name.(string) != "test" { t.Error("should be equal") }