aboutsummaryrefslogtreecommitdiff
path: root/tests/embind/embind.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/embind/embind.test.js')
-rwxr-xr-xtests/embind/embind.test.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js
index 821355d2..82029de4 100755
--- a/tests/embind/embind.test.js
+++ b/tests/embind/embind.test.js
@@ -419,6 +419,11 @@ module({
assert.equal('ABCD', e);
});
+ test("can pass ArrayBuffer to std::string", function() {
+ var e = cm.emval_test_take_and_return_std_string((new Int8Array([65, 66, 67, 68])).buffer);
+ assert.equal('ABCD', e);
+ });
+
test("non-ascii wstrings", function() {
var expected = String.fromCharCode(10) +
String.fromCharCode(1234) +