Skip to content

Commit

Permalink
test(spdx-utils): Add a test for simplifying OR-operands
Browse files Browse the repository at this point in the history
Disambiguate the AND-operator's test name accordingly.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Dec 18, 2024
1 parent 419f36e commit acf9415
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion utils/spdx/src/test/kotlin/SpdxCompoundExpressionTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class SpdxCompoundExpressionTest : WordSpec({
expression.simplify().sorted().toString() shouldBe "Apache-2.0 AND MIT"
}

"create a single expression for equal operands" {
"create a single expression for equal AND-operands" {
val expression = SpdxCompoundExpression(
SpdxOperator.AND,
listOf(
Expand All @@ -74,5 +74,18 @@ class SpdxCompoundExpressionTest : WordSpec({
// Compare string representations to not rely on semantic equality.
expression.simplify().toString() shouldBe "MIT"
}

"create a single expression for equal OR-operands" {
val expression = SpdxCompoundExpression(
SpdxOperator.OR,
listOf(
SpdxLicenseIdExpression("MIT"),
SpdxLicenseIdExpression("MIT")
)
)

// Compare string representations to not rely on semantic equality.
expression.simplify().toString() shouldBe "MIT"
}
}
})

0 comments on commit acf9415

Please sign in to comment.