Skip to content

Commit

Permalink
Allow SPDX Identifier matches to be additive to all subsequent find f…
Browse files Browse the repository at this point in the history
…unctions

Signed-off-by: Matt Rutkowski <[email protected]>
  • Loading branch information
mrutkows committed Jun 12, 2024
1 parent 618061a commit 1256b05
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions identifier/identifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,13 @@ func Test_identifyLicensesInString(t *testing.T) {
err := IdentifyLicensesInString(&identifierResults, tt.args.input, options, licenseLibrary)
if (err != nil) != tt.wantErr {
t.Errorf("identifyLicensesInString() error = %v, wantErr %v", err, tt.wantErr)
} else if d := cmp.Diff(tt.want.Matches, got.Matches, cmp.AllowUnexported(Match{})); d != "" {
} else if d := cmp.Diff(tt.want.Matches, identifierResults.Matches, cmp.AllowUnexported(Match{})); d != "" {
t.Errorf("Didn't get expected result: (-want, +got): %v", d)
} else if d := cmp.Diff(tt.want.CopyRightStatements, got.CopyRightStatements); d != "" {
} else if d := cmp.Diff(tt.want.CopyRightStatements, identifierResults.CopyRightStatements); d != "" {
t.Errorf("Didn't get expected result: (-want, +got): %v", d)
} else if d := cmp.Diff(tt.want.Blocks, got.Blocks); d != "" {
} else if d := cmp.Diff(tt.want.Blocks, identifierResults.Blocks); d != "" {
t.Errorf("Didn't get expected result: (-want, +got): %v", d)
} else if d := cmp.Diff(tt.want.Hash, got.Hash); d != "" {
} else if d := cmp.Diff(tt.want.Hash, identifierResults.Hash); d != "" {
t.Errorf("Didn't get expected result: (-want, +got): %v", d)
}
})
Expand Down Expand Up @@ -609,9 +609,9 @@ func Test_identifyLicensesInStringPreChecks(t *testing.T) {
err := IdentifyLicensesInString(&identifierResults, tt.input, options, ll)

Check failure on line 609 in identifier/identifier_test.go

View workflow job for this annotation

GitHub Actions / build

no new variables on left side of :=
if err != nil {
t.Errorf("identifyLicensesInString() error = %v", err)
} else if d := cmp.Diff(tt.want.Matches, got.Matches, cmp.AllowUnexported(Match{})); d != "" {
} else if d := cmp.Diff(tt.want.Matches, identifierResults.Matches, cmp.AllowUnexported(Match{})); d != "" {
t.Errorf("Didn't get expected result: (-want, +got): %v", d)
} else if d := cmp.Diff(tt.want.Blocks, got.Blocks); d != "" {
} else if d := cmp.Diff(tt.want.Blocks, identifierResults.Blocks); d != "" {
t.Errorf("Didn't get expected result: (-want, +got): %v", d)
}
})
Expand Down

0 comments on commit 1256b05

Please sign in to comment.