aboutsummaryrefslogtreecommitdiff
path: root/tests/embind/embind.test.js
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-04-11 00:07:53 -0700
committerJukka Jylänki <jujjyl@gmail.com>2013-04-18 20:08:10 +0300
commit53c228a260b7a5e90e430860e130ed6006bd328a (patch)
tree40e66b84f3a2a5eac234f67bf390d8f34d735028 /tests/embind/embind.test.js
parent6a4574cfe44b75f8cfaa916a08b402f99baf6cc7 (diff)
Allow passing JavaScript strings to std::wstring
Diffstat (limited to 'tests/embind/embind.test.js')
-rwxr-xr-xtests/embind/embind.test.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js
index 872ee398..6f63d543 100755
--- a/tests/embind/embind.test.js
+++ b/tests/embind/embind.test.js
@@ -404,6 +404,14 @@ module({
String.fromCharCode(65535);
assert.equal(expected, cm.get_non_ascii_wstring());
});
+
+ test("passing unicode string into C++", function() {
+ var expected = String.fromCharCode(10) +
+ String.fromCharCode(1234) +
+ String.fromCharCode(2345) +
+ String.fromCharCode(65535);
+ assert.equal(expected, cm.take_and_return_std_wstring(expected));
+ });
});
BaseFixture.extend("embind", function() {