Skip to content

Commit e6c0092

Browse files
committed
Revert problematic test
1 parent 6384f24 commit e6c0092

4 files changed

Lines changed: 1 addition & 75 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,5 @@ jobs:
4949
- name: Build ORX
5050
run: ./gradlew build
5151

52-
- name: Upload Test Report
53-
if: ${{ failure() }}
54-
uses: actions/upload-artifact@v4
55-
with:
56-
name: reports
57-
path: |
58-
**/build/reports/
59-
**/build/test-results/
60-
6152
- name: Collect screenshots without errors
6253
run: xvfb-run ./gradlew collectScreenshots

buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,7 @@ kotlin {
7676

7777
js(IR) {
7878
browser()
79-
nodejs {
80-
testTask {
81-
useMocha {
82-
timeout = "30s"
83-
}
84-
}
85-
}
79+
nodejs()
8680
}
8781

8882
sourceSets {

karma-config.d/karma-config.js

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
package org.openrndr.extra.composition
22

3-
import org.openrndr.math.Vector2
4-
import org.openrndr.shape.Circle
5-
import org.openrndr.shape.LineSegment
6-
import org.openrndr.shape.Rectangle
73
import org.openrndr.shape.Shape
84
import kotlin.test.Test
95
import kotlin.test.assertEquals
106
import kotlin.test.assertNull
11-
import kotlin.test.assertTrue
127

138
class TestComposition {
149
val composition = let { _ ->
@@ -43,50 +38,3 @@ class TestComposition {
4338
assertNull(composition.findImage("shape"))
4439
}
4540
}
46-
47-
class TestCompositionIntersections {
48-
@Test
49-
fun `use a shape as a mask for line segments`() {
50-
// Make sure intersections do not fail randomly, which was fixed in
51-
// https://github.com/openrndr/orx/commit/e8f50b3dd153ed82de121e9017cf42f6ea95ac8e
52-
val bounds = Rectangle(Vector2.ZERO, 640.0, 480.0)
53-
54-
// Create a 2D torus
55-
val outline = Shape(
56-
listOf(
57-
Circle(bounds.center, 70.0).contour.reversed,
58-
Circle(bounds.center, 100.0).contour,
59-
)
60-
)
61-
62-
val radius = outline.bounds.dimensions.length / 2
63-
val off = outline.bounds.center
64-
65-
val compositions = List(100) {
66-
// Create compositions featuring horizontal lines
67-
// visible inside the torus shape. Change the number of
68-
// lines to make sure the calculations are not cached.
69-
val num = radius.toInt() + it
70-
drawComposition {
71-
lineSegments(List(num) { segNum ->
72-
val yNorm = (segNum / (num - 1.0))
73-
val x = ((segNum % 2) * 2.0 - 1.0) * radius
74-
val y = (yNorm * 2.0 - 1.0) * radius
75-
val start = Vector2(-x, y) + off
76-
val end = Vector2(x, y) + off
77-
LineSegment(start, end)
78-
})
79-
clipMode = ClipMode.INTERSECT
80-
shape(outline)
81-
}
82-
}
83-
84-
val shapes = compositions.last().findShapes()
85-
val dimensions = compositions.last().bounds.dimensions
86-
87-
assertTrue(shapes.isNotEmpty(), "shapes should not be empty")
88-
assertTrue(shapes.first().shape.contours.isNotEmpty(), "contour should not be empty")
89-
assertTrue(dimensions.x > 0.0, "dimensions.x should be greater than 0.0")
90-
assertTrue(dimensions.y > 0.0, "dimensions.y should be greater than 0.0")
91-
}
92-
}

0 commit comments

Comments
 (0)