blob: 56a1497f481588463c0d9173b825ba4f0e01fede (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
load(libdir + 'asserts.js');
function test() {
assertTypeErrorMessage(() => { ctypes.int32_t(0).address(1); },
"CData.prototype.address takes no arguments");
assertTypeErrorMessage(() => { ctypes.char.array(10)().readString(1); },
"CData.prototype.readString takes no arguments");
assertTypeErrorMessage(() => { ctypes.char.array(10)().readStringReplaceMalformed(1); },
"CData.prototype.readStringReplaceMalformed takes no arguments");
assertTypeErrorMessage(() => { ctypes.int32_t(0).toSource(1); },
"CData.prototype.toSource takes no arguments");
}
if (typeof ctypes === "object")
test();
|