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.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js
index 6473573a..821355d2 100755
--- a/tests/embind/embind.test.js
+++ b/tests/embind/embind.test.js
@@ -409,6 +409,16 @@ module({
});
});
+ test("can pass Uint8Array to std::string", function() {
+ var e = cm.emval_test_take_and_return_std_string(new Uint8Array([65, 66, 67, 68]));
+ assert.equal('ABCD', e);
+ });
+
+ test("can pass Int8Array to std::string", function() {
+ var e = cm.emval_test_take_and_return_std_string(new Int8Array([65, 66, 67, 68]));
+ assert.equal('ABCD', e);
+ });
+
test("non-ascii wstrings", function() {
var expected = String.fromCharCode(10) +
String.fromCharCode(1234) +