[Wasm] Add box and stdlib tests in wasi mode
This commit is contained in:
committed by
Zalim Bashorov
parent
f42d0b1ed4
commit
983991d46c
@@ -0,0 +1,18 @@
|
||||
package test.wasm.unsafe
|
||||
|
||||
import kotlin.wasm.unsafe.*
|
||||
import kotlin.test.*
|
||||
|
||||
private fun jsConcatStrings(a: String, b: String): String =
|
||||
js("a + b")
|
||||
|
||||
@OptIn(UnsafeWasmMemoryApi::class)
|
||||
class MemoryAllocationJsTest {
|
||||
@Test
|
||||
fun testJsIntropInsideAllocations() {
|
||||
withScopedMemoryAllocator { allocator ->
|
||||
assertEquals(jsConcatStrings("str1", "str2"), "str1str2")
|
||||
allocator.allocate(10)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user