Debian Codegraph @

js/src/jit-test/tests/ctypes/incompatible-ctype.js

raw
1 load(libdir + 'asserts.js');
2
3 function test() {
4 assertTypeErrorMessage(() => { ctypes.int32_t.toString.call(1); },
5 "CType.prototype.toString called on incompatible object, got the number 1");
6 if (ctypes.int32_t.prototype.toSource) {
7 assertTypeErrorMessage(() => { ctypes.int32_t.toSource.call(1); },
8 "CType.prototype.toSource called on incompatible object, got the number 1");
9 }
10 }
11
12 if (typeof ctypes === "object")
13 test();