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