From bf5c15eb3c9f2e51da02dc709768f88cdd8bcfec Mon Sep 17 00:00:00 2001 From: Martin Nonnenmacher Date: Tue, 20 Feb 2024 23:13:06 +0100 Subject: [PATCH] test(spdx-utils): Remove obsolete tests For SPDX expressions it makes no semantic difference if the `AND` and `OR` operators are left- or right-associative. With the changes from the previous commit it also makes no structural difference anymore, so remove the obsolete tests for the left associativity of operators. Signed-off-by: Martin Nonnenmacher --- .../src/test/kotlin/SpdxExpressionTest.kt | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/utils/spdx/src/test/kotlin/SpdxExpressionTest.kt b/utils/spdx/src/test/kotlin/SpdxExpressionTest.kt index 50927cebee2bc..ed512a316b028 100644 --- a/utils/spdx/src/test/kotlin/SpdxExpressionTest.kt +++ b/utils/spdx/src/test/kotlin/SpdxExpressionTest.kt @@ -335,30 +335,6 @@ class SpdxExpressionTest : WordSpec({ actualExpression shouldBe expectedExpression } - "bind the and operator left associative" { - val actualExpression = "license1 AND license2 AND license3".toSpdx() - val expectedExpression = SpdxCompoundExpression( - SpdxOperator.AND, - SpdxLicenseIdExpression("license1"), - SpdxLicenseIdExpression("license2"), - SpdxLicenseIdExpression("license3") - ) - - actualExpression shouldBe expectedExpression - } - - "bind the or operator left associative" { - val actualExpression = "license1 OR license2 OR license3".toSpdx() - val expectedExpression = SpdxCompoundExpression( - SpdxOperator.OR, - SpdxLicenseIdExpression("license1"), - SpdxLicenseIdExpression("license2"), - SpdxLicenseIdExpression("license3") - ) - - actualExpression shouldBe expectedExpression - } - "respect parentheses for binding strength of operators" { val actualExpression = "(license1 OR license2) AND license3".toSpdx() val expectedExpression = SpdxCompoundExpression(