diff options
author | Chad Austin <chad@imvu.com> | 2013-05-10 23:05:15 -0700 |
---|---|---|
committer | Chad Austin <chad@imvu.com> | 2013-05-17 12:58:44 -0700 |
commit | fec256e358077534355250f08ddd47f19ec80703 (patch) | |
tree | 839aefa8d0b3e59536ec30934112af3a90d66e27 /tests/embind/embind.test.js | |
parent | 40037cce12465baa90e642c1b3c48dcc7d1ed237 (diff) |
Add support for multiple overloaded smart pointer constructors.
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); }); |