shortid_generator_test.go 255 B

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