diff options
author | Chad Austin <chad@imvu.com> | 2014-05-09 17:41:19 -0700 |
---|---|---|
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2014-05-21 23:02:32 +0700 |
commit | a8eda73be9b64636c82474a79742a578b3f2c425 (patch) | |
tree | cfe4b866fc54952b10a3bac59c077c330a52b4f9 /tests/embind/embind.test.js | |
parent | 09b00f5cd39dc986bc5797c5eb9920af04b4ac59 (diff) |
start to checkpoint some intrusive pointer tests
Diffstat (limited to 'tests/embind/embind.test.js')
-rw-r--r-- | tests/embind/embind.test.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js index 067b3f60..5e56c114 100644 --- a/tests/embind/embind.test.js +++ b/tests/embind/embind.test.js @@ -2234,6 +2234,29 @@ module({ }); }); + BaseFixture.extend("intrusive pointers", function() { + test("can pass intrusive pointers", function() { + var ic = new cm.IntrusiveClass; + var d = cm.passThroughIntrusiveClass(ic); + assert.true(ic.isAliasOf(d)); + ic.delete(); + d.delete(); + }); + + test("can hold intrusive pointers", function() { + var ic = new cm.IntrusiveClass; + var holder = new cm.IntrusiveClassHolder; + holder.set(ic); + ic.delete(); + var d = holder.get(); + d.delete(); + holder.delete(); + }); + + test("can extend from intrusive pointer class and still preserve reference in JavaScript", function() { + }); + }); + BaseFixture.extend("typeof", function() { test("typeof", function() { assert.equal("object", cm.getTypeOfVal(null)); |