Skip to content

Commit 43553c2

Browse files
Abduqodiri Qurbonzodaqurbonzoda
authored andcommitted
Use encodeToByteArray instead of custom toByteArrayUtf8
1 parent 3df0e72 commit 43553c2

File tree

4 files changed

+3
-20
lines changed

4 files changed

+3
-20
lines changed

runtime/commonMain/src/kotlinx/benchmark/IntelliJLog.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ internal fun ijBenchmarkFinishException(
5555
append("<test id='$id' parentId='$parent'>")
5656
append("<result resultType='FAILURE' startTime='$startTime' endTime='$endTime'>")
5757
append("<errorMsg>")
58-
append("<![CDATA[${error.toByteArrayUtf8().encodeBase64()}]]>")
58+
append("<![CDATA[${error.encodeToByteArray().encodeBase64()}]]>")
5959
append("</errorMsg>")
6060
append("<stackTrace>")
61-
append("<![CDATA[${stacktrace.toByteArrayUtf8().encodeBase64()}]]>")
61+
append("<![CDATA[${stacktrace.encodeToByteArray().encodeBase64()}]]>")
6262
append("</stackTrace>")
6363
append("</result>")
6464
append("</test>")
@@ -71,7 +71,7 @@ internal fun ijLogOutput(parent: String, id: String, info: String) = buildString
7171
append("<event type='onOutput'>")
7272
append("<test id='$id' parentId='$parent'>")
7373
append("<event destination='StdOut'>")
74-
append("<![CDATA[${info.toByteArrayUtf8().encodeBase64()}]]>")
74+
append("<![CDATA[${info.encodeToByteArray().encodeBase64()}]]>")
7575
append("</event>")
7676
append("</test>")
7777
append("</event>")
@@ -105,5 +105,3 @@ private fun ByteArray.encodeBase64(): String {
105105

106106
return result.toCharArray().concatToString()
107107
}
108-
109-
expect fun String.toByteArrayUtf8(): ByteArray

runtime/jsMain/src/kotlinx/benchmark/JsIntelliJLog.kt

Lines changed: 0 additions & 9 deletions
This file was deleted.

runtime/jvmMain/src/kotlinx/benchmark/JvmIntelliJLog.kt

Lines changed: 0 additions & 3 deletions
This file was deleted.

runtime/nativeMain/src/kotlinx/benchmark/NativeIntelliJLog.kt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)