MCPcopy
hub / github.com/google/uuid / TestWrongLength

Function TestWrongLength

uuid_test.go:560–567  ·  uuid_test.go::TestWrongLength
(t *testing.T)

Source from the content-addressed store, hash-verified

558}
559
560func 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
569func TestIsWrongLength(t *testing.T) {
570 _, err := Parse("12345")

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected