summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ctypes/argument-length-pointer.js
blob: 8ac404aaf75155b24d5b9c2d9875c986a51c2ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
load(libdir + 'asserts.js');

function test() {
  assertTypeErrorMessage(() => { ctypes.PointerType(); },
                         "PointerType takes one argument");
  assertTypeErrorMessage(() => { ctypes.int32_t.ptr(1, 2, 3, 4); },
                         "PointerType constructor takes 0, 1, 2, or 3 arguments");
}

if (typeof ctypes === "object")
  test();