diff options
author | Chad Austin <chad@imvu.com> | 2013-05-02 15:34:27 -0700 |
---|---|---|
committer | Chad Austin <chad@imvu.com> | 2013-05-02 18:56:18 -0700 |
commit | 2d628d429053984a3a463a9746c2b042f31e4361 (patch) | |
tree | 1926f29cb2336648dddc29c7c3032a6a32c8b30b /tests/embind/embind.test.js | |
parent | 58352074e51c15bd108a71a3c31354206d488eee (diff) |
Add a test for interface methods that return void.
Diffstat (limited to 'tests/embind/embind.test.js')
-rwxr-xr-x | 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 2f407471..69f933fa 100755 --- a/tests/embind/embind.test.js +++ b/tests/embind/embind.test.js @@ -1558,6 +1558,29 @@ module({ assert.equal("optionalfoo", cm.callOptionalMethod(impl, "foo")); impl.delete(); }); + + test("void methods work", function() { + var saved = {}; + var impl = cm.AbstractClass.implement({ + differentArguments: function(i, d, f, q, s) { + saved.i = i; + saved.d = d; + saved.f = f; + saved.q = q; + saved.s = s; + } + }); + + cm.callDifferentArguments(impl, 1, 2, 3, 4, "foo"); + + assert.deepEqual(saved, { + i: 1, + d: 2, + f: 3, + q: 4, + s: "foo", + }); + }); }); BaseFixture.extend("registration order", function() { |