x/model: add roundtrip for String test

This commit is contained in:
Blake Mizerany
2024-04-07 16:08:46 -07:00
parent 2100129e83
commit bdff89bc4c
3 changed files with 55 additions and 59 deletions

View File

@@ -49,5 +49,10 @@ func TestDigestString(t *testing.T) {
if got != want {
t.Errorf("ParseDigest(%q).String() = %q; want %q", s, got, want)
}
got = ParseDigest(s).String()
if got != want {
t.Errorf("roundtrip ParseDigest(%q).String() = %q; want %q", s, got, want)
}
}
}