diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-06-20 19:08:10 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 19:08:10 +0530 |
commit | 354fa6cd0013aeca9f0749822b3ef3050c764370 (patch) | |
tree | ef860e48149850afa2a785b4e9b95f04c668bd44 /cli/tests | |
parent | 79b42808a474c0a049ae17a3b6b1f93ad83d217b (diff) |
BREAKING(ext/ffi): Remove `Deno.UnsafePointer` indirection (#14915)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/ffi_test.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/tests/unit/ffi_test.ts b/cli/tests/unit/ffi_test.ts index 22da88d27..18b831137 100644 --- a/cli/tests/unit/ffi_test.ts +++ b/cli/tests/unit/ffi_test.ts @@ -28,9 +28,8 @@ Deno.test({ permissions: { ffi: false } }, function ffiPermissionDenied() { assertThrows(() => { Deno.dlopen("/usr/lib/libc.so.6", {}); }, Deno.errors.PermissionDenied); - const ptr = new Deno.UnsafePointer(0n); const fnptr = new Deno.UnsafeFnPointer( - ptr, + 0n, { parameters: ["u32", "pointer"], result: "void", @@ -42,7 +41,7 @@ Deno.test({ permissions: { ffi: false } }, function ffiPermissionDenied() { assertThrows(() => { Deno.UnsafePointer.of(new Uint8Array(0)); }, Deno.errors.PermissionDenied); - const ptrView = new Deno.UnsafePointerView(ptr); + const ptrView = new Deno.UnsafePointerView(0n); assertThrows(() => { ptrView.copyInto(new Uint8Array(0)); }, Deno.errors.PermissionDenied); |