Browse Source

Fix 16-bit overflow test + knownissue

pull/1635/head
Sami Vaarala 7 years ago
parent
commit
3c2a46c927
  1. 8
      tests/ecmascript/test-dev-16bit-overflows.js
  2. 13
      tests/knownissues/test-dev-16bit-overflows-3.txt

8
tests/ecmascript/test-dev-16bit-overflows.js

@ -44,8 +44,8 @@ function bufferConcatLenTest() {
var s = makeString(32768);
var t = s.substring(0, 32767);
s = Duktape.Buffer(s);
t = Duktape.Buffer(t);
s = Uint8Array.allocPlain(s);
t = Uint8Array.allocPlain(t);
print(s.length);
print(t.length);
var justok = s + t; // 65535 exactly
@ -57,9 +57,9 @@ function bufferConcatLenTest() {
function bufferConstructTest() {
var b;
b = new Duktape.Buffer(65535); // ok
b = new Uint8Array(65535); // ok
print(b.length);
b = new Duktape.Buffer(65536); // overflow
b = new Uint8Array(65536); // overflow
print(b.length);
}

13
tests/knownissues/test-dev-16bit-overflows-3.txt

@ -0,0 +1,13 @@
summary: requires lowmem 16-bit field options
---
32768
32767
65535
65536
32768
32767
38
38
65535
65536
Reached: 65535
Loading…
Cancel
Save