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

function test() {
  assertTypeErrorMessage(() => { ctypes.int32_t(1, 2, 3); },
                         "CType constructor takes at most one argument");
  assertTypeErrorMessage(() => { ctypes.int32_t.array(1, 2); },
                         "CType.prototype.array takes at most one argument");
}

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