digest: better test coverage

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2016-12-15 17:21:57 -08:00
parent 6a74c94bf8
commit ecb2ee3824
No known key found for this signature in database
GPG key ID: FB5F6B2905D7ECF3
4 changed files with 116 additions and 11 deletions

View file

@ -72,6 +72,10 @@ func (a *Algorithm) Set(value string) error {
*a = Algorithm(value)
}
if !a.Available() {
return ErrDigestUnsupported
}
return nil
}