blob: 52f4d1cd175e786b27d82c6f3179bf84a094d0fb [file] [log] [blame]
load(libdir + 'asserts.js');
function test() {
let strcut = ctypes.StructType("a", [ { "x": ctypes.int32_t, } ])();
for (let arg of [1, undefined, null, false, {}, [], Symbol("foo")]) {
assertThrowsInstanceOf(() => { struct.addressOfField(arg); },
Error);
}
}
if (typeof ctypes === "object")
test();