reference: TestParseAnyReference(): use sub-tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
fcbddfc6ae
commit
fa1d14c513
1 changed files with 22 additions and 18 deletions
|
@ -433,6 +433,9 @@ func TestParseAnyReference(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.Reference, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
var ref Reference
|
||||
var err error
|
||||
ref, err = ParseAnyReference(tc.Reference)
|
||||
|
@ -453,6 +456,7 @@ func TestParseAnyReference(t *testing.T) {
|
|||
if !equalReference(ref, expected) {
|
||||
t.Errorf("Unexpected reference %#v, expected %#v", ref, expected)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue