Skip to content

Commit 9f2f2c0

Browse files
authored
Merge pull request #39 from github/elr/dup-tests
remove duplicate tests
2 parents 9e28f22 + 3d115ff commit 9f2f2c0

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

spdxexp/parse_test.go

-20
Original file line numberDiff line numberDiff line change
@@ -1084,12 +1084,6 @@ func TestParseTokens(t *testing.T) {
10841084
{"operator error - missing operator", getMissingOperatorTokens(0),
10851085
&node{}, "", errors.New("licenses or expressions are not separated by an operator"),
10861086
},
1087-
{"operator error - missing license after OR", getMissingSecondLicenseInORTokens(0),
1088-
&node{}, "", errors.New("expected expression following OR, but found none"),
1089-
},
1090-
{"operator error - missing license after AND", getMissingSecondLicenseInANDTokens(0),
1091-
&node{}, "", errors.New("expected expression following AND, but found none"),
1092-
},
10931087
{"operator error - starts with close parenthesis", getStartsWithCloseParenTokens(0),
10941088
&node{}, "", errors.New("expression starts with close parenthesis"),
10951089
},
@@ -1371,20 +1365,6 @@ func getMissingOperatorTokens(index int) *tokenStream {
13711365
return getTokenStream(tokens, index)
13721366
}
13731367

1374-
func getMissingSecondLicenseInORTokens(index int) *tokenStream {
1375-
var tokens []token
1376-
tokens = append(tokens, token{role: licenseToken, value: "MIT"})
1377-
tokens = append(tokens, token{role: operatorToken, value: "OR"})
1378-
return getTokenStream(tokens, index)
1379-
}
1380-
1381-
func getMissingSecondLicenseInANDTokens(index int) *tokenStream {
1382-
var tokens []token
1383-
tokens = append(tokens, token{role: licenseToken, value: "MIT"})
1384-
tokens = append(tokens, token{role: operatorToken, value: "AND"})
1385-
return getTokenStream(tokens, index)
1386-
}
1387-
13881368
func getStartsWithCloseParenTokens(index int) *tokenStream {
13891369
var tokens []token
13901370
tokens = append(tokens, token{role: operatorToken, value: ")"})

0 commit comments

Comments
 (0)