diff --git a/rest/src/commonTest/kotlin/request/StackTraceRecoveryTest.kt b/rest/src/commonTest/kotlin/request/StackTraceRecoveryTest.kt index df53d84ad2e..69aa3eadcd2 100644 --- a/rest/src/commonTest/kotlin/request/StackTraceRecoveryTest.kt +++ b/rest/src/commonTest/kotlin/request/StackTraceRecoveryTest.kt @@ -2,7 +2,6 @@ package dev.kord.rest.request import dev.kord.rest.json.response.GatewayResponse import dev.kord.rest.route.Route -import dev.kord.test.IgnoreOnSimulatorPlatforms import io.ktor.client.* import io.ktor.client.engine.mock.* import io.ktor.http.* @@ -16,7 +15,6 @@ expect class StackTraceElement expect fun currentThreadStackTrace(): StackTraceElement internal expect fun RecoveredStackTrace.validate(expected: StackTraceElement) -@IgnoreOnSimulatorPlatforms class StackTraceRecoveryTest { @Test diff --git a/rest/src/nativeTest/kotlin/dev/kord/rest/request/StackTrace.kt b/rest/src/nativeTest/kotlin/dev/kord/rest/request/StackTrace.kt index 41e0a08d13a..9a63fd0cd99 100644 --- a/rest/src/nativeTest/kotlin/dev/kord/rest/request/StackTrace.kt +++ b/rest/src/nativeTest/kotlin/dev/kord/rest/request/StackTrace.kt @@ -13,11 +13,11 @@ actual typealias StackTraceElement = String //-->at 5 ??? 7ff684fbdeca kfun:dev.kord.rest.request.StackTraceRecoveryTest.$test stack trace<-- actual fun currentThreadStackTrace(): StackTraceElement = Exception().stackTraceToString().lineSequence().filterNot(String::isBlank).drop(5).first().trim() - .substringAfter("???") + .substringAfter("0x") internal actual fun RecoveredStackTrace.validate(expected: StackTraceElement) { // The first few lines are artifacts from coroutines which are not present in expected val actual = stackTraceToString().lineSequence().drop(6).first().trim() - .substringAfter("???") // index is off at call site + .substringAfter("0x") // index is off at call site assertEquals(expected, actual) }