Skip to content

Commit 703b1b4

Browse files
committed
fixup! fixup! fixup! ffi: add shared-buffer fast path for numeric and pointer signatures
1 parent 844973a commit 703b1b4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

test/ffi/test-ffi-shared-buffer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ test('i64/u64 BigInt round-trip', () => {
8282
});
8383

8484
test('zero-arg function', () => {
85-
const { lib, functions } = ffi.dlopen(null, {
86-
uv_os_getpid: { result: 'i32', parameters: [] },
85+
const { lib, functions } = ffi.dlopen(libraryPath, {
86+
char_is_signed: { result: 'i32', parameters: [] },
8787
});
8888
try {
89-
const pid = functions.uv_os_getpid();
90-
assert.strictEqual(typeof pid, 'number');
91-
assert.ok(pid > 0);
89+
const result = functions.char_is_signed();
90+
assert.strictEqual(typeof result, 'number');
91+
assert.ok(result === 0 || result === 1);
9292
} finally {
9393
lib.close();
9494
}

0 commit comments

Comments
 (0)