ImmutableBinaryBlob.asCPointer: fix + test (#1879)
This commit is contained in:
committed by
Nikolay Igotti
parent
a4a235be42
commit
5ad0012ab1
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user