Debian Codegraph @

js/src/jit-test/tests/ctypes/argument-length-function.js

raw
1 load(libdir + 'asserts.js');
2
3 function test() {
4 assertTypeErrorMessage(() => { ctypes.FunctionType(); },
5 "FunctionType takes two or three arguments");
6 assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, []).ptr({}, 1); },
7 "FunctionType constructor takes one argument");
8 }
9
10 if (typeof ctypes === "object")
11 test();