[orx-composition] Try fix failing test on github actions

The test passes locally on JVM, jsBrowser and jsNode.
This commit is contained in:
Abe Pazos
2025-07-13 12:44:51 +02:00
committed by GitHub
parent 148c478412
commit 20b462d332

View File

@@ -61,7 +61,7 @@ class TestCompositionIntersections {
fun `use a shape as a mask for line segments`() {
// Make sure intersections do not fail randomly, which was fixed in
// https://github.com/openrndr/orx/commit/e8f50b3dd153ed82de121e9017cf42f6ea95ac8e
val svg = List(100) {
val svg = List(50) {
drawComposition {
lineSegments(List(num) { segNum ->
val yNorm = (segNum / (num - 1.0))
@@ -76,12 +76,12 @@ class TestCompositionIntersections {
}
}
val shapes = svg[50].findShapes()
val dimensions = svg[50].bounds.dimensions
val shapes = svg.last().findShapes()
val dimensions = svg.last().bounds.dimensions
assertTrue(shapes.isNotEmpty())
assertTrue(shapes.first().shape.contours.isNotEmpty())
assertTrue(dimensions.x > 0.0)
assertTrue(dimensions.y > 0.0)
assertTrue(shapes.isNotEmpty(), "shapes should not be empty")
assertTrue(shapes.first().shape.contours.isNotEmpty(), "contour should not be empty")
assertTrue(dimensions.x > 0.0, "dimensions.x should be greater than 0.0")
assertTrue(dimensions.y > 0.0, "dimensions.y should be greater than 0.0")
}
}
}