Browse Source

Testcase for JX/JC array gaps

pull/1149/head
Sami Vaarala 8 years ago
parent
commit
70d8c2ad79
  1. 18
      tests/ecmascript/test-bi-duktape-enc-jc.js
  2. 18
      tests/ecmascript/test-bi-duktape-enc-jx.js

18
tests/ecmascript/test-bi-duktape-enc-jc.js

@ -0,0 +1,18 @@
/*
* Duktape.enc() JC
*/
/*===
[{"_undef":true},null,{"_undef":true},{"_undef":true},{"_undef":true},1,{"_undef":true}]
===*/
function test() {
// Array gaps: '{"_undef":true}'
print(Duktape.enc('jc', [ void 0, null,,,, 1,, ]));
}
try {
test();
} catch (e) {
print(e.stack || e);
}

18
tests/ecmascript/test-bi-duktape-enc-jx.js

@ -0,0 +1,18 @@
/*
* Duktape.enc() JX
*/
/*===
[undefined,null,undefined,undefined,undefined,1,undefined]
===*/
function test() {
// Array gaps: 'undefined'.
print(Duktape.enc('jx', [ void 0, null,,,, 1,, ]));
}
try {
test();
} catch (e) {
print(e.stack || e);
}
Loading…
Cancel
Save