ImmutableBinaryBlob.asCPointer: fix + test (#1879)

This commit is contained in:
Mike Sinkovsky
2018-08-14 15:24:23 +05:00
committed by Nikolay Igotti
parent a4a235be42
commit 5ad0012ab1
3 changed files with 14 additions and 2 deletions
+6
View File
@@ -2734,6 +2734,12 @@ task interop4(type: RunInteropKonanTest) {
interop = 'cstdio'
}
task interop5(type: RunStandaloneKonanTest) {
disabled = (project.testTarget == 'wasm32') // No interop for wasm yet.
goldValue = "Hello!\n"
source = "interop/basics/5.kt"
}
task interop_bitfields(type: RunInteropKonanTest) {
disabled = (project.testTarget == 'wasm32') // No interop for wasm yet.
expectedFail = (project.testTarget == 'linux_mips32') // fails because of big-endiannes
+7
View File
@@ -0,0 +1,7 @@
import platform.posix.printf
val golden = immutableBinaryBlobOf(0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x21, 0x00).asCPointer(0)
fun main(args: Array<String>) {
printf("%s\n", golden)
}