Skip to content

Commit

Permalink
Remove garbage
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur White committed Jul 7, 2017
1 parent cdb91b8 commit f019654
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
27 changes: 13 additions & 14 deletions check_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package check

import (
"fmt"
"regexp"
"strconv"
"testing"
Expand All @@ -13,19 +12,19 @@ var (
testFloat = "-19001231.558877"
)

func TestCheckerCheck(t *testing.T) {
chk := &Checker{
"email": {Required, Email},
"phone": {Phone},
"stars": {Required, Range(3, 5)},
}
errs := chk.Check(map[string][]string{
"name": {"foobar"},
"phone": {"0012345678901"},
"stars": {"2"},
})
fmt.Println(errs)
}
// func TestCheckerCheck(t *testing.T) {
// chk := &Checker{
// "email": {Required, Email},
// "phone": {Phone},
// "stars": {Required, Range(3, 5)},
// }
// errs := chk.Check(map[string][]string{
// "name": {"foobar"},
// "phone": {"0012345678901"},
// "stars": {"2"},
// })
// fmt.Println(errs)
// }

func BenchmarkAlphaRegexp(b *testing.B) {
reInt := regexp.MustCompile("^[a-zA-Z]+$")
Expand Down
1 change: 0 additions & 1 deletion rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ func TestEmail(t *testing.T) {
}{
{"a@example.com", nil},
{"a+a@example.com", nil},
{"a@a.a", nil},
{"a@a.a", []string{ErrNotEmail}},
{"a+a@a.a", []string{ErrNotEmail}},
{"@a.a", []string{ErrNotEmail}},
Expand Down

0 comments on commit f019654

Please sign in to comment.