Delete wrong toString() extension, fix StringJVMTest
This commit is contained in:
@@ -105,9 +105,7 @@ public val ByteArray.inputStream : ByteArrayInputStream
|
||||
public fun ByteArray.inputStream(offset: Int, length: Int) : ByteArrayInputStream = ByteArrayInputStream(this, offset, length)
|
||||
|
||||
public fun ByteArray.toString(encoding: String): String = String(this, encoding)
|
||||
public fun ByteArray.toString(): String = String(this)
|
||||
|
||||
public fun ByteArray.toString(encoding: Charset) : String = String(this, encoding)
|
||||
public fun ByteArray.toString(encoding: Charset): String = String(this, encoding)
|
||||
|
||||
[Intrinsic("kotlin.collections.copyToArray")] public fun <reified T> Collection<T>.copyToArray(): Array<T> =
|
||||
throw UnsupportedOperationException()
|
||||
|
||||
@@ -324,8 +324,8 @@ class StringJVMTest {
|
||||
test fun toByteArrayEncodings() {
|
||||
val s = "hello"
|
||||
val defaultCharset = java.nio.charset.Charset.defaultCharset()!!
|
||||
assertEquals(s.toByteArray().toString(), s.toByteArray(defaultCharset).toString())
|
||||
assertEquals(s.toByteArray().toString(), s.toByteArray(defaultCharset.name()).toString())
|
||||
assertEquals(String(s.toByteArray()), String(s.toByteArray(defaultCharset)))
|
||||
assertEquals(String(s.toByteArray()), String(s.toByteArray(defaultCharset.name())))
|
||||
}
|
||||
|
||||
test fun testReplaceAllClosure() {
|
||||
|
||||
Reference in New Issue
Block a user