Skip to content

Commit

Permalink
make tests pass again
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlehane committed Apr 24, 2023
1 parent 3b742e9 commit 637f684
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pkg/pronom/parseable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,19 @@ func TestParseDroid(t *testing.T) {
}
}
dpmap, rpmap := d.Priorities(), r.Priorities()
if len(dpmap) != len(rpmap) {
t.Errorf("Parse Droid: Expecting length of priorities of droid and reports to be the same, got %d and %d", len(dpmap), len(rpmap))
}
for k, v := range dpmap {
w, ok := rpmap[k]
for k, v := range rpmap {
w, ok := dpmap[k]
if !ok {
t.Errorf("Parse Droid: Can't find %s in reports priorities", k)
errs = append(errs, fmt.Sprintf("Parse Droid: Can't find %s in droid priorities", k))
continue
}
if len(v) != len(w) {
errs = append(errs, fmt.Sprintf("Parse Droid: priorites for %s are not equal:\nReports: %v\nDroid: %v", k, w, v))
errs = append(errs, fmt.Sprintf("Parse Droid: priorites for %s are not equal:\nReports: %v\nDroid: %v", k, v, w))
continue
}
for i, vv := range v {
if w[i] != vv {
errs = append(errs, fmt.Sprintf("Parse Droid: priorites for %s are not equal:\nReports: %v\nDroid: %v", k, w, v))
errs = append(errs, fmt.Sprintf("Parse Droid: priorites for %s are not equal:\nReports: %v\nDroid: %v", k, v, w))
break
}
}
Expand Down

0 comments on commit 637f684

Please sign in to comment.