[Wasm] Add box and stdlib tests in wasi mode

This commit is contained in:
Igor Yakovlev
2023-07-31 15:46:48 +02:00
committed by Zalim Bashorov
parent f42d0b1ed4
commit 983991d46c
37 changed files with 560 additions and 93 deletions
@@ -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)
}
}
}