aboutsummaryrefslogtreecommitdiff
path: root/tests/embind/embind.test.js
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-04-10 23:59:51 -0700
committerJukka Jylänki <jujjyl@gmail.com>2013-04-18 20:08:09 +0300
commit6a4574cfe44b75f8cfaa916a08b402f99baf6cc7 (patch)
treeb9bb8c88e5ce73bddcd96da4897eab07d91ed59c /tests/embind/embind.test.js
parentbcf017994524b515274344dcf667dc03b8153448 (diff)
Add support for returning std::wstring
Diffstat (limited to 'tests/embind/embind.test.js')
-rwxr-xr-xtests/embind/embind.test.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js
index 07f093ea..872ee398 100755
--- a/tests/embind/embind.test.js
+++ b/tests/embind/embind.test.js
@@ -389,11 +389,21 @@ module({
});
BaseFixture.extend("string", function() {
- var expected = '';
- for (var i = 0; i < 128; ++i) {
- expected += String.fromCharCode(128 + i);
- }
- assert.equal(expected, cm.get_non_ascii_string());
+ test("non-ascii strings", function() {
+ var expected = '';
+ for (var i = 0; i < 128; ++i) {
+ expected += String.fromCharCode(128 + i);
+ }
+ assert.equal(expected, cm.get_non_ascii_string());
+ });
+
+ test("non-ascii wstrings", function() {
+ var expected = String.fromCharCode(10) +
+ String.fromCharCode(1234) +
+ String.fromCharCode(2345) +
+ String.fromCharCode(65535);
+ assert.equal(expected, cm.get_non_ascii_wstring());
+ });
});
BaseFixture.extend("embind", function() {