user_test.go 189 B

123456789101112
  1. package http
  2. import "testing"
  3. func TestUserinfo_Set(t *testing.T) {
  4. ui := &Userinfo{}
  5. ui.Set("name", "xxx")
  6. ui.Set("lost", "xxx")
  7. if ui.Get("lost") != "xxx" {
  8. t.Error("error")
  9. }
  10. }