diff options
| author | Aapo Alasuutari <aapo.alasuutari@gmail.com> | 2022-06-21 06:46:59 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-21 09:16:59 +0530 |
| commit | 82655b928500ca7a9762617b1c61f80fd122ccbd (patch) | |
| tree | ad5a3b6926c7d14a5fb472eacc45627a20a1991d /test_ffi/tests | |
| parent | a38a1f91cf4e0b298bf166ae0ef63166fe7c67fe (diff) | |
perf(ext/ffi): Optimize FFI Rust side type checks (#14923)
Diffstat (limited to 'test_ffi/tests')
| -rw-r--r-- | test_ffi/tests/integration_tests.rs | 1 | ||||
| -rw-r--r-- | test_ffi/tests/test.js | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/test_ffi/tests/integration_tests.rs b/test_ffi/tests/integration_tests.rs index 93f368787..77bcc758e 100644 --- a/test_ffi/tests/integration_tests.rs +++ b/test_ffi/tests/integration_tests.rs @@ -45,6 +45,7 @@ fn basic() { let expected = "\ something\n\ [1, 2, 3, 4, 5, 6, 7, 8]\n\ + [4, 5, 6]\n\ [1, 2, 3, 4, 5, 6, 7, 8] [9, 10]\n\ [1, 2, 3, 4, 5, 6, 7, 8]\n\ [ 1, 2, 3, 4, 5, 6 ]\n\ diff --git a/test_ffi/tests/test.js b/test_ffi/tests/test.js index 8190b3c8e..ab31dcb83 100644 --- a/test_ffi/tests/test.js +++ b/test_ffi/tests/test.js @@ -174,6 +174,9 @@ dylib.symbols.printSomething(); const buffer = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); const buffer2 = new Uint8Array([9, 10]); dylib.symbols.print_buffer(buffer, buffer.length); +// Test subarrays +const subarray = buffer.subarray(3); +dylib.symbols.print_buffer(subarray, subarray.length - 2); dylib.symbols.print_buffer2(buffer, buffer.length, buffer2, buffer2.length); const ptr0 = dylib.symbols.return_buffer(); dylib.symbols.print_buffer(ptr0, 8); |
