Mark Base64 API with ExperimentalEncodingApi
This commit is contained in:
committed by
Space Team
parent
954ec1f63c
commit
ba2833b90f
@@ -1,5 +1,5 @@
|
|||||||
@kotlin.SinceKotlin(version = "1.8")
|
@kotlin.SinceKotlin(version = "1.8")
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.io.encoding.ExperimentalEncodingApi
|
||||||
public open class Base64 {
|
public open class Base64 {
|
||||||
public final fun decode(source: kotlin.ByteArray, startIndex: kotlin.Int = ..., endIndex: kotlin.Int = ...): kotlin.ByteArray
|
public final fun decode(source: kotlin.ByteArray, startIndex: kotlin.Int = ..., endIndex: kotlin.Int = ...): kotlin.ByteArray
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@kotlin.SinceKotlin(version = "1.8")
|
@kotlin.SinceKotlin(version = "1.8")
|
||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.io.encoding.ExperimentalEncodingApi
|
||||||
public open class Base64 {
|
public open class Base64 {
|
||||||
public final fun decode(source: kotlin.ByteArray, startIndex: kotlin.Int = ..., endIndex: kotlin.Int = ...): kotlin.ByteArray
|
public final fun decode(source: kotlin.ByteArray, startIndex: kotlin.Int = ..., endIndex: kotlin.Int = ...): kotlin.ByteArray
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ compileTestKotlinCommon {
|
|||||||
"-opt-in=kotlin.RequiresOptIn",
|
"-opt-in=kotlin.RequiresOptIn",
|
||||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||||
|
"-opt-in=kotlin.io.encoding.ExperimentalEncodingApi",
|
||||||
"-XXLanguage:+RangeUntilOperator",
|
"-XXLanguage:+RangeUntilOperator",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ compileTestKotlin {
|
|||||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||||
"-opt-in=kotlin.io.path.ExperimentalPathApi",
|
"-opt-in=kotlin.io.path.ExperimentalPathApi",
|
||||||
|
"-opt-in=kotlin.io.encoding.ExperimentalEncodingApi",
|
||||||
"-Xcommon-sources=${fileTree('../test').join(',')}",
|
"-Xcommon-sources=${fileTree('../test').join(',')}",
|
||||||
"-XXLanguage:+RangeUntilOperator",
|
"-XXLanguage:+RangeUntilOperator",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ compileTestKotlin {
|
|||||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||||
"-opt-in=kotlin.io.path.ExperimentalPathApi",
|
"-opt-in=kotlin.io.path.ExperimentalPathApi",
|
||||||
|
"-opt-in=kotlin.io.encoding.ExperimentalEncodingApi",
|
||||||
"-Xcommon-sources=${fileTree('../test').join(',')}",
|
"-Xcommon-sources=${fileTree('../test').join(',')}",
|
||||||
"-XXLanguage:+RangeUntilOperator",
|
"-XXLanguage:+RangeUntilOperator",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ tasks.withType<KotlinCompile<*>>().configureEach {
|
|||||||
"-opt-in=kotlin.RequiresOptIn",
|
"-opt-in=kotlin.RequiresOptIn",
|
||||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||||
|
"-opt-in=kotlin.io.encoding.ExperimentalEncodingApi",
|
||||||
"-XXLanguage:+RangeUntilOperator",
|
"-XXLanguage:+RangeUntilOperator",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ compileTestKotlin2Js {
|
|||||||
"-opt-in=kotlin.RequiresOptIn",
|
"-opt-in=kotlin.RequiresOptIn",
|
||||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||||
|
"-opt-in=kotlin.io.encoding.ExperimentalEncodingApi",
|
||||||
"-XXLanguage:+RangeUntilOperator",
|
"-XXLanguage:+RangeUntilOperator",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
package kotlin.io.encoding
|
package kotlin.io.encoding
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, startIndex: Int, endIndex: Int): ByteArray {
|
internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, startIndex: Int, endIndex: Int): ByteArray {
|
||||||
return charsToBytesImpl(source, startIndex, endIndex)
|
return charsToBytesImpl(source, startIndex, endIndex)
|
||||||
@@ -14,7 +14,7 @@ internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, sta
|
|||||||
|
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformEncodeToString(source: ByteArray, startIndex: Int, endIndex: Int): String {
|
internal actual inline fun Base64.platformEncodeToString(source: ByteArray, startIndex: Int, endIndex: Int): String {
|
||||||
val byteResult = encodeToByteArrayImpl(source, startIndex, endIndex)
|
val byteResult = encodeToByteArrayImpl(source, startIndex, endIndex)
|
||||||
@@ -22,7 +22,7 @@ internal actual inline fun Base64.platformEncodeToString(source: ByteArray, star
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformEncodeIntoByteArray(
|
internal actual inline fun Base64.platformEncodeIntoByteArray(
|
||||||
source: ByteArray,
|
source: ByteArray,
|
||||||
@@ -35,7 +35,7 @@ internal actual inline fun Base64.platformEncodeIntoByteArray(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformEncodeToByteArray(
|
internal actual inline fun Base64.platformEncodeToByteArray(
|
||||||
source: ByteArray,
|
source: ByteArray,
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ compileTestKotlin {
|
|||||||
"-opt-in=kotlin.RequiresOptIn",
|
"-opt-in=kotlin.RequiresOptIn",
|
||||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||||
|
"-opt-in=kotlin.io.encoding.ExperimentalEncodingApi",
|
||||||
"-XXLanguage:+RangeUntilOperator",
|
"-XXLanguage:+RangeUntilOperator",
|
||||||
]
|
]
|
||||||
// This is needed for JavaTypeTest; typeOf for non-reified type parameters doesn't work otherwise, for implementation reasons.
|
// This is needed for JavaTypeTest; typeOf for non-reified type parameters doesn't work otherwise, for implementation reasons.
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import kotlin.io.encoding.Base64.Default.symbolsPerGroup
|
|||||||
* Closing the returned input stream will close the underlying input stream.
|
* Closing the returned input stream will close the underlying input stream.
|
||||||
*/
|
*/
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
public fun InputStream.decodingWith(base64: Base64): InputStream {
|
public fun InputStream.decodingWith(base64: Base64): InputStream {
|
||||||
return DecodeInputStream(this, base64)
|
return DecodeInputStream(this, base64)
|
||||||
}
|
}
|
||||||
@@ -54,13 +54,13 @@ public fun InputStream.decodingWith(base64: Base64): InputStream {
|
|||||||
* Closing the returned output stream will close the underlying output stream.
|
* Closing the returned output stream will close the underlying output stream.
|
||||||
*/
|
*/
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
public fun OutputStream.encodingWith(base64: Base64): OutputStream {
|
public fun OutputStream.encodingWith(base64: Base64): OutputStream {
|
||||||
return EncodeOutputStream(this, base64)
|
return EncodeOutputStream(this, base64)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
private class DecodeInputStream(
|
private class DecodeInputStream(
|
||||||
private val input: InputStream,
|
private val input: InputStream,
|
||||||
private val base64: Base64
|
private val base64: Base64
|
||||||
@@ -228,7 +228,7 @@ private class DecodeInputStream(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
private class EncodeOutputStream(
|
private class EncodeOutputStream(
|
||||||
private val output: OutputStream,
|
private val output: OutputStream,
|
||||||
private val base64: Base64
|
private val base64: Base64
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
package kotlin.io.encoding
|
package kotlin.io.encoding
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, startIndex: Int, endIndex: Int): ByteArray {
|
internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, startIndex: Int, endIndex: Int): ByteArray {
|
||||||
return if (source is String) {
|
return if (source is String) {
|
||||||
@@ -20,7 +20,7 @@ internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, sta
|
|||||||
|
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformEncodeToString(source: ByteArray, startIndex: Int, endIndex: Int): String {
|
internal actual inline fun Base64.platformEncodeToString(source: ByteArray, startIndex: Int, endIndex: Int): String {
|
||||||
// val subArray = if (startIndex == 0 && endIndex == source.size) {
|
// val subArray = if (startIndex == 0 && endIndex == source.size) {
|
||||||
@@ -35,7 +35,7 @@ internal actual inline fun Base64.platformEncodeToString(source: ByteArray, star
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformEncodeIntoByteArray(
|
internal actual inline fun Base64.platformEncodeIntoByteArray(
|
||||||
source: ByteArray,
|
source: ByteArray,
|
||||||
@@ -55,7 +55,7 @@ internal actual inline fun Base64.platformEncodeIntoByteArray(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformEncodeToByteArray(
|
internal actual inline fun Base64.platformEncodeToByteArray(
|
||||||
source: ByteArray,
|
source: ByteArray,
|
||||||
@@ -73,7 +73,7 @@ internal actual inline fun Base64.platformEncodeToByteArray(
|
|||||||
}
|
}
|
||||||
|
|
||||||
//@SinceKotlin("1.8")
|
//@SinceKotlin("1.8")
|
||||||
//@ExperimentalStdlibApi
|
//@ExperimentalEncodingApi
|
||||||
//private fun Base64.javaEncoder(): java.util.Base64.Encoder {
|
//private fun Base64.javaEncoder(): java.util.Base64.Encoder {
|
||||||
// return if (isMimeScheme) {
|
// return if (isMimeScheme) {
|
||||||
// java.util.Base64.getMimeEncoder(Base64.mimeLineLength, Base64.mimeLineSeparatorSymbols)
|
// java.util.Base64.getMimeEncoder(Base64.mimeLineLength, Base64.mimeLineSeparatorSymbols)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
package kotlin.io.encoding
|
package kotlin.io.encoding
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, startIndex: Int, endIndex: Int): ByteArray {
|
internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, startIndex: Int, endIndex: Int): ByteArray {
|
||||||
return charsToBytesImpl(source, startIndex, endIndex)
|
return charsToBytesImpl(source, startIndex, endIndex)
|
||||||
@@ -14,7 +14,7 @@ internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, sta
|
|||||||
|
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformEncodeToString(source: ByteArray, startIndex: Int, endIndex: Int): String {
|
internal actual inline fun Base64.platformEncodeToString(source: ByteArray, startIndex: Int, endIndex: Int): String {
|
||||||
val byteResult = encodeToByteArrayImpl(source, startIndex, endIndex)
|
val byteResult = encodeToByteArrayImpl(source, startIndex, endIndex)
|
||||||
@@ -22,7 +22,7 @@ internal actual inline fun Base64.platformEncodeToString(source: ByteArray, star
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformEncodeIntoByteArray(
|
internal actual inline fun Base64.platformEncodeIntoByteArray(
|
||||||
source: ByteArray,
|
source: ByteArray,
|
||||||
@@ -35,7 +35,7 @@ internal actual inline fun Base64.platformEncodeIntoByteArray(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
internal actual inline fun Base64.platformEncodeToByteArray(
|
internal actual inline fun Base64.platformEncodeToByteArray(
|
||||||
source: ByteArray,
|
source: ByteArray,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import kotlin.native.concurrent.SharedImmutable
|
|||||||
* There are also [Base64.UrlSafe] and [Base64.Mime] instances.
|
* There are also [Base64.UrlSafe] and [Base64.Mime] instances.
|
||||||
*/
|
*/
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
public open class Base64 private constructor(
|
public open class Base64 private constructor(
|
||||||
internal val isUrlSafe: Boolean,
|
internal val isUrlSafe: Boolean,
|
||||||
internal val isMimeScheme: Boolean
|
internal val isMimeScheme: Boolean
|
||||||
@@ -574,7 +574,7 @@ private val base64EncodeMap = byteArrayOf(
|
|||||||
119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47, /* 48 - 63 */
|
119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47, /* 48 - 63 */
|
||||||
)
|
)
|
||||||
|
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@SharedImmutable
|
@SharedImmutable
|
||||||
private val base64DecodeMap = IntArray(256).apply {
|
private val base64DecodeMap = IntArray(256).apply {
|
||||||
this.fill(-1)
|
this.fill(-1)
|
||||||
@@ -593,7 +593,7 @@ private val base64UrlEncodeMap = byteArrayOf(
|
|||||||
119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 95, /* 48 - 63 */
|
119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 95, /* 48 - 63 */
|
||||||
)
|
)
|
||||||
|
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
@SharedImmutable
|
@SharedImmutable
|
||||||
private val base64UrlDecodeMap = IntArray(256).apply {
|
private val base64UrlDecodeMap = IntArray(256).apply {
|
||||||
this.fill(-1)
|
this.fill(-1)
|
||||||
@@ -605,14 +605,14 @@ private val base64UrlDecodeMap = IntArray(256).apply {
|
|||||||
|
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
internal fun isInMimeAlphabet(symbol: Int): Boolean {
|
internal fun isInMimeAlphabet(symbol: Int): Boolean {
|
||||||
return symbol in base64DecodeMap.indices && base64DecodeMap[symbol] != -1
|
return symbol in base64DecodeMap.indices && base64DecodeMap[symbol] != -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
internal expect fun Base64.platformCharsToBytes(
|
internal expect fun Base64.platformCharsToBytes(
|
||||||
source: CharSequence,
|
source: CharSequence,
|
||||||
startIndex: Int,
|
startIndex: Int,
|
||||||
@@ -621,7 +621,7 @@ internal expect fun Base64.platformCharsToBytes(
|
|||||||
|
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
internal expect fun Base64.platformEncodeToString(
|
internal expect fun Base64.platformEncodeToString(
|
||||||
source: ByteArray,
|
source: ByteArray,
|
||||||
startIndex: Int,
|
startIndex: Int,
|
||||||
@@ -629,7 +629,7 @@ internal expect fun Base64.platformEncodeToString(
|
|||||||
): String
|
): String
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
internal expect fun Base64.platformEncodeIntoByteArray(
|
internal expect fun Base64.platformEncodeIntoByteArray(
|
||||||
source: ByteArray,
|
source: ByteArray,
|
||||||
destination: ByteArray,
|
destination: ByteArray,
|
||||||
@@ -639,7 +639,7 @@ internal expect fun Base64.platformEncodeIntoByteArray(
|
|||||||
): Int
|
): Int
|
||||||
|
|
||||||
@SinceKotlin("1.8")
|
@SinceKotlin("1.8")
|
||||||
@ExperimentalStdlibApi
|
@ExperimentalEncodingApi
|
||||||
internal expect fun Base64.platformEncodeToByteArray(
|
internal expect fun Base64.platformEncodeToByteArray(
|
||||||
source: ByteArray,
|
source: ByteArray,
|
||||||
startIndex: Int,
|
startIndex: Int,
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ tasks.withType<KotlinCompile<*>>().configureEach {
|
|||||||
"-opt-in=kotlin.RequiresOptIn",
|
"-opt-in=kotlin.RequiresOptIn",
|
||||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||||
|
"-opt-in=kotlin.io.encoding.ExperimentalEncodingApi",
|
||||||
"-XXLanguage:+RangeUntilOperator",
|
"-XXLanguage:+RangeUntilOperator",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import org.junit.jupiter.api.TestFactory
|
|||||||
TC(
|
TC(
|
||||||
name = "default",
|
name = "default",
|
||||||
runnerType = TestRunnerType.DEFAULT,
|
runnerType = TestRunnerType.DEFAULT,
|
||||||
freeCompilerArgs = [ENABLE_MPP, STDLIB_IS_A_FRIEND, ENABLE_X_STDLIB_API, ENABLE_RANGE_UNTIL],
|
freeCompilerArgs = [ENABLE_MPP, STDLIB_IS_A_FRIEND, ENABLE_X_STDLIB_API, ENABLE_X_ENCODING_API, ENABLE_RANGE_UNTIL],
|
||||||
sourceLocations = [
|
sourceLocations = [
|
||||||
"libraries/stdlib/test/**.kt",
|
"libraries/stdlib/test/**.kt",
|
||||||
"libraries/stdlib/common/test/**.kt",
|
"libraries/stdlib/common/test/**.kt",
|
||||||
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.TestFactory
|
|||||||
TC(
|
TC(
|
||||||
name = "worker",
|
name = "worker",
|
||||||
runnerType = TestRunnerType.WORKER,
|
runnerType = TestRunnerType.WORKER,
|
||||||
freeCompilerArgs = [ENABLE_MPP, STDLIB_IS_A_FRIEND, ENABLE_X_STDLIB_API, ENABLE_RANGE_UNTIL],
|
freeCompilerArgs = [ENABLE_MPP, STDLIB_IS_A_FRIEND, ENABLE_X_STDLIB_API, ENABLE_X_ENCODING_API, ENABLE_RANGE_UNTIL],
|
||||||
sourceLocations = [
|
sourceLocations = [
|
||||||
"libraries/stdlib/test/**.kt",
|
"libraries/stdlib/test/**.kt",
|
||||||
"libraries/stdlib/common/test/**.kt",
|
"libraries/stdlib/common/test/**.kt",
|
||||||
@@ -55,5 +55,6 @@ class StdlibTest : AbstractNativeBlackBoxTest() {
|
|||||||
private const val ENABLE_MPP = "-Xmulti-platform"
|
private const val ENABLE_MPP = "-Xmulti-platform"
|
||||||
internal const val STDLIB_IS_A_FRIEND = "-friend-modules=$KOTLIN_NATIVE_DISTRIBUTION/klib/common/stdlib"
|
internal const val STDLIB_IS_A_FRIEND = "-friend-modules=$KOTLIN_NATIVE_DISTRIBUTION/klib/common/stdlib"
|
||||||
private const val ENABLE_X_STDLIB_API = "-opt-in=kotlin.ExperimentalStdlibApi"
|
private const val ENABLE_X_STDLIB_API = "-opt-in=kotlin.ExperimentalStdlibApi"
|
||||||
|
private const val ENABLE_X_ENCODING_API = "-opt-in=kotlin.io.encoding.ExperimentalEncodingApi"
|
||||||
private const val ENABLE_RANGE_UNTIL = "-XXLanguage:+RangeUntilOperator" // keep until 1.8
|
private const val ENABLE_RANGE_UNTIL = "-XXLanguage:+RangeUntilOperator" // keep until 1.8
|
||||||
private const val DISABLED_STDLIB_TEST = "test.collections.CollectionTest.abstractCollectionToArray"
|
private const val DISABLED_STDLIB_TEST = "test.collections.CollectionTest.abstractCollectionToArray"
|
||||||
Reference in New Issue
Block a user