shortid_generator_test.go 268 B

123456789101112
  1. package util
  2. import "testing"
  3. func TestAllowedCharMatchesUidPattern(t *testing.T) {
  4. for _, c := range allowedChars {
  5. err := VerifyUid(string(c))
  6. if err != nil {
  7. t.Fatalf("charset for creating new shortids contains chars not present in uid pattern")
  8. }
  9. }
  10. }