diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/embind/embind.test.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js index 6f63d543..fec7145a 100755 --- a/tests/embind/embind.test.js +++ b/tests/embind/embind.test.js @@ -397,6 +397,12 @@ module({ assert.equal(expected, cm.get_non_ascii_string()); }); + test("passing non-8-bit strings from JS to std::string throws", function() { + assert.throws(cm.BindingError, function() { + cm.emval_test_take_and_return_std_string("\u1234"); + }); + }); + test("non-ascii wstrings", function() { var expected = String.fromCharCode(10) + String.fromCharCode(1234) + |