aboutsummaryrefslogtreecommitdiff
path: root/tests/embind/embind.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/embind/embind.test.js')
-rw-r--r--tests/embind/embind.test.js12
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();