You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
285 B

  1. package humanize
  2. import (
  3. "testing"
  4. )
  5. type testList []struct {
  6. name, got, exp string
  7. }
  8. func (tl testList) validate(t *testing.T) {
  9. for _, test := range tl {
  10. if test.got != test.exp {
  11. t.Errorf("On %v, expected '%v', but got '%v'",
  12. test.name, test.exp, test.got)
  13. }
  14. }
  15. }