(t *testing.T)
| 558 | } |
| 559 | |
| 560 | func TestWrongLength(t *testing.T) { |
| 561 | _, err := Parse("12345") |
| 562 | if err == nil { |
| 563 | t.Errorf("expected ‘12345’ was invalid") |
| 564 | } else if err.Error() != "invalid UUID length: 5" { |
| 565 | t.Errorf("expected a different error message for an invalid length") |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | func TestIsWrongLength(t *testing.T) { |
| 570 | _, err := Parse("12345") |