diff options
Diffstat (limited to 'tests/embind/embind.test.js')
-rw-r--r-- | tests/embind/embind.test.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js index 23d50fe1..e60e1ab3 100644 --- a/tests/embind/embind.test.js +++ b/tests/embind/embind.test.js @@ -684,6 +684,15 @@ module({ c.delete(); }); + test("access multiple smart ptr ctors", function() { + var a = new cm.MultipleSmartCtors(10); + assert.equal(a.WhichCtorCalled(), 1); + var b = new cm.MultipleCtors(20, 20); + assert.equal(b.WhichCtorCalled(), 2); + a.delete(); + b.delete(); + }); + test("wrong number of constructor arguments throws", function() { assert.throws(cm.BindingError, function() { new cm.MultipleCtors(); }); assert.throws(cm.BindingError, function() { new cm.MultipleCtors(1,2,3,4); }); |