MarkRS
08/14/2024, 1:50 PMTarget JRE version (17.0.11) does not match project JDK version (JetBrains Runtime version 17.0.6), will use sources from JDK: jbr-17
Which doesn't seem a big enough thing to cause the test to fail, which it does, saying:
Testing started at 12:51 ...
Connected to the target VM, address: '127.0.0.1:38889', transport: 'socket'
<http://uk.co|uk.co>.goodunlimited.mobilemanege.shared.testActions.CircleTest
Disconnected from the target VM, address: '127.0.0.1:38889', transport: 'socket'
Process finished with exit code 255
What gives?MarkRS
08/14/2024, 1:58 PMChris Lee
08/14/2024, 3:06 PMCLOVIS
08/14/2024, 3:52 PMTarget JRE version (17.0.11) does not match project JDK version (JetBrains Runtime version 17.0.6), will use sources from JDK: jbr-17This happens because IDEA isn't configured to use the exact same version as the project is using. Most likely, you haven't configured JVM toolchains. Since the difference is so small, you can safely ignore it, the only consequence is that if you step into some code from the JDK itself, what is displayed may not match what IDEA displays. Most people don't step into JDK code, so they can ignore that.
MarkRS
08/15/2024, 1:20 PMclass CircleTest : FunSpec({
val tStart = Points()
tStart.widthPos = 300F
tStart.lengthPos = 300F
val circleExh = Exhaustive.cartesian(
Exhaustive.of(tStart),
Exhaustive.ints(0..360),
Exhaustive.of(400),
Exhaustive.of("left", "right"),
Exhaustive.of(90, 180, 270, 360),
Exhaustive.of(Pair(400, 300), Pair(200, 300), Pair(300, 400), Pair(300, 200),
Pair(400, 200), Pair(400, 400), Pair(200, 400), Pair(200, 200)),
Exhaustive.of(5)
) { start: Points, startAngle: Int, radius: Int, direction: String, turn: Int, centre: Pair<Int, Int>, duration: Int ->
Circle(listOf(start, startAngle, radius, turn, centre, direction, duration)) }
test("makeXOffset") {
checkAll(circleExh) { theCircle ->
val newX = theCircle.makeXOffset(1)
when (theCircle.direction) {
"left" -> {
when (theCircle.startAngle + theCircle.turn) {
in 0..180 -> {
newX < theCircle.startPos.widthPos
}
in 181..359 -> {
newX > theCircle.startPos.widthPos
}
}
}
"right" -> {
when (theCircle.startAngle + theCircle.turn) {
in 0..180 -> {
newX > theCircle.startPos.widthPos
}
in 181..359 -> {
newX < theCircle.startPos.widthPos
}
}
}
}
}
}
}
"Test failed: 0ms" in the header.Emil Kantis
08/15/2024, 6:18 PMEmil Kantis
08/15/2024, 6:18 PMMarkRS
08/20/2024, 10:49 AM