Skip to content

Commit f917a53

Browse files
committed
test(euclidean-geometry): use shouldBeNaN instead of shouldBe Double.NaN
1 parent 9c162b6 commit f917a53

File tree

1 file changed

+4
-3
lines changed
  • alchemist-euclidean-geometry/src/test/kotlin/it/unibo/alchemist/model/interfaces/geometry/euclidean2d

1 file changed

+4
-3
lines changed

alchemist-euclidean-geometry/src/test/kotlin/it/unibo/alchemist/model/interfaces/geometry/euclidean2d/TestSegment2DImpl.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ package it.unibo.alchemist.model.interfaces.geometry.euclidean2d
1111

1212
import io.kotest.core.spec.style.StringSpec
1313
import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
14+
import io.kotest.matchers.doubles.shouldBeNaN
1415
import io.kotest.matchers.shouldBe
1516
import io.kotest.matchers.types.shouldBeTypeOf
1617
import it.unibo.alchemist.model.geometry.Intersection2D
@@ -130,11 +131,11 @@ class TestSegment2DImpl : StringSpec() {
130131
horizontalSegment.toLine().let {
131132
it.slope shouldBeAbout 0.0
132133
it.yIntercept shouldBeAbout 2.0
133-
it.xIntercept shouldBe Double.NaN
134+
it.xIntercept.shouldBeNaN()
134135
}
135136
verticalSegment.toLine().let {
136-
it.slope shouldBe Double.NaN
137-
it.yIntercept shouldBe Double.NaN
137+
it.slope.shouldBeNaN()
138+
it.yIntercept.shouldBeNaN()
138139
it.xIntercept shouldBeAbout 2.0
139140
}
140141
obliqueSegment.toLine().let {

0 commit comments

Comments
 (0)