diff options
author | Nikolay Vorobyov <nikolay.vorobyov@doctormobile.us> | 2014-06-18 16:44:03 +0300 |
---|---|---|
committer | Nikolay Vorobyov <nikolay.vorobyov@doctormobile.us> | 2014-06-18 16:44:03 +0300 |
commit | 22d2a0fcd2729d9c0c8d53e59471432ddf206b6a (patch) | |
tree | 17bfc2400076d2e2fcd669a18de1ecaed0aa299b /tests/embind/embind.test.js | |
parent | d54f3a7b86e2b266cc86341b6e06096dc7f04d5e (diff) |
Added embind support for std::unique_ptr
Diffstat (limited to 'tests/embind/embind.test.js')
-rw-r--r-- | tests/embind/embind.test.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js index 432202ff..f1de1a12 100644 --- a/tests/embind/embind.test.js +++ b/tests/embind/embind.test.js @@ -604,6 +604,18 @@ module({ c.delete(); }); + test("can pass unique_ptr", function() { + var p = cm.embind_test_return_unique_ptr(42); + var m = cm.embind_test_accept_unique_ptr(p); + assert.equal(42, m); + }); + + test("can pass unique_ptr to constructor", function() { + var c = new cm.embind_test_construct_class_with_unique_ptr(42); + assert.equal(42, c.getValue()); + c.delete(); + }); + test("can get member classes then call its member functions", function() { var p = new cm.ParentClass(); var c = p.getBigClass(); |