Skip to content

Commit

Permalink
Merge pull request #39 from github/elr/dup-tests
Browse files Browse the repository at this point in the history
remove duplicate tests
  • Loading branch information
elrayle authored Feb 8, 2023
2 parents 9e28f22 + 3d115ff commit 9f2f2c0
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions spdxexp/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1084,12 +1084,6 @@ func TestParseTokens(t *testing.T) {
{"operator error - missing operator", getMissingOperatorTokens(0),
&node{}, "", errors.New("licenses or expressions are not separated by an operator"),
},
{"operator error - missing license after OR", getMissingSecondLicenseInORTokens(0),
&node{}, "", errors.New("expected expression following OR, but found none"),
},
{"operator error - missing license after AND", getMissingSecondLicenseInANDTokens(0),
&node{}, "", errors.New("expected expression following AND, but found none"),
},
{"operator error - starts with close parenthesis", getStartsWithCloseParenTokens(0),
&node{}, "", errors.New("expression starts with close parenthesis"),
},
Expand Down Expand Up @@ -1371,20 +1365,6 @@ func getMissingOperatorTokens(index int) *tokenStream {
return getTokenStream(tokens, index)
}

func getMissingSecondLicenseInORTokens(index int) *tokenStream {
var tokens []token
tokens = append(tokens, token{role: licenseToken, value: "MIT"})
tokens = append(tokens, token{role: operatorToken, value: "OR"})
return getTokenStream(tokens, index)
}

func getMissingSecondLicenseInANDTokens(index int) *tokenStream {
var tokens []token
tokens = append(tokens, token{role: licenseToken, value: "MIT"})
tokens = append(tokens, token{role: operatorToken, value: "AND"})
return getTokenStream(tokens, index)
}

func getStartsWithCloseParenTokens(index int) *tokenStream {
var tokens []token
tokens = append(tokens, token{role: operatorToken, value: ")"})
Expand Down

0 comments on commit 9f2f2c0

Please sign in to comment.