aboutsummaryrefslogtreecommitdiff
path: root/test/script/basic/typedarrays.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/script/basic/typedarrays.js')
-rw-r--r--test/script/basic/typedarrays.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/script/basic/typedarrays.js b/test/script/basic/typedarrays.js
index b15f5dd1..d66c79b8 100644
--- a/test/script/basic/typedarrays.js
+++ b/test/script/basic/typedarrays.js
@@ -28,6 +28,17 @@
* @run
*/
+//JDK-8066217, constructor for arraybuffer not behaving as per spec
+function checkLength(ab, l) {
+ if (ab.byteLength != l) {
+ throw "length error: " + ab.byteLength + " != " + l;
+ }
+}
+checkLength(new ArrayBuffer(), 0);
+checkLength(new ArrayBuffer(0), 0);
+checkLength(new ArrayBuffer(1024), 1024);
+checkLength(new ArrayBuffer(1,2,3), 1);
+checkLength(new ArrayBuffer([17]), 17);
var typeDefinitions = [
Int8Array,