From 3d115ff280f313e36aa5a0a856d1dbf7737e0013 Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Wed, 8 Feb 2023 17:49:58 -0500 Subject: [PATCH] remove duplicate tests --- spdxexp/parse_test.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/spdxexp/parse_test.go b/spdxexp/parse_test.go index 4c5c3a8..8ee3d9d 100644 --- a/spdxexp/parse_test.go +++ b/spdxexp/parse_test.go @@ -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"), }, @@ -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: ")"})