diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-23 15:32:43 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-23 15:32:43 -0700 |
commit | 2ebcf95b0e305f777143e3ad783896c17b769324 (patch) | |
tree | e0a60a9c313bf4526bec8fe2029d341302caa2f9 /tests/embind/embind.test.js | |
parent | 8c6578568956816cbb518584cbfa1321587727a7 (diff) | |
parent | 3eb16db0edc678ca6183b3d0254b925aee575469 (diff) |
Merge branch 'incoming' into proxyGL
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(); |