Immutable data prototype. (#799)
This commit is contained in:
@@ -1081,6 +1081,11 @@ task array2(type: RunKonanTest) {
|
||||
source = "runtime/collections/array2.kt"
|
||||
}
|
||||
|
||||
task array3(type: RunKonanTest) {
|
||||
goldValue = "1 2 3 7 8 9 -128 -1 \n1 2 3 7 8 9 -128 -1 \n"
|
||||
source = "runtime/collections/array3.kt"
|
||||
}
|
||||
|
||||
task sort0(type: RunKonanTest) {
|
||||
goldValue = "[a, b, x]\n[-1, 0, 42, 239, 100500]\n"
|
||||
source = "runtime/collections/sort0.kt"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import konan.*
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
val data = immutableBinaryBlobOf(0x1, 0x2, 0x3, 0x7, 0x8, 0x9, 0x80, 0xff)
|
||||
for (b in data) {
|
||||
print("$b ")
|
||||
}
|
||||
println()
|
||||
|
||||
val dataClone = data.toByteArray()
|
||||
dataClone.map { print("$it ") }
|
||||
println()
|
||||
}
|
||||
Reference in New Issue
Block a user