Debian Codegraph @

js/src/jit-test/tests/ctypes/argument-type-ctypes.js

raw
1 load(libdir + 'asserts.js');
2
3 function test() {
4 assertTypeErrorMessage(() => { ctypes.cast(1, 2); },
5 "first argument of ctypes.cast must be a CData");
6 assertTypeErrorMessage(() => { ctypes.cast(ctypes.int32_t(0), 2); },
7 "second argument of ctypes.cast must be a CType");
8 assertTypeErrorMessage(() => { ctypes.getRuntime(1); },
9 "argument of ctypes.getRuntime must be a CType");
10 }
11
12 if (typeof ctypes === "object")
13 test();