aboutsummaryrefslogtreecommitdiff
path: root/tests/embind/embind.test.js
diff options
context:
space:
mode:
authorChad Austin <caustin@gmail.com>2014-03-22 23:52:57 -0700
committerChad Austin <chad@chadaustin.me>2014-03-28 23:56:40 -0700
commit6291f97039f94eb2eaeae7535a7dbe9c6ff8bbe5 (patch)
tree2c6eb2deb474a78bff5410953e19eb96d07f141e /tests/embind/embind.test.js
parent464f4a3cace3eba27c145d347d031930b9630a51 (diff)
make val::new_ compatible with asm.js
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 64b3e889..b303d51c 100644
--- a/tests/embind/embind.test.js
+++ b/tests/embind/embind.test.js
@@ -1973,6 +1973,18 @@ module({
assert.equal(cm.Enum.ONE, cm.val_as_enum(cm.Enum.ONE));
});
});
+
+ BaseFixture.extend("val::new_", function() {
+ test("variety of types", function() {
+ function factory() {
+ this.arguments = Array.prototype.slice.call(arguments, 0);
+ }
+ var instance = cm.construct_with_6_arguments(factory);
+ assert.deepEqual(
+ [6, -12.5, "a3", {x: 1, y: 2, z: 3, w: 4}, cm.EnumClass.TWO, [-1, -2, -3, -4]],
+ instance.arguments);
+ });
+ });
});
/* global run_all_tests */