summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/simple/test-typed-arrays.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/simple/test-typed-arrays.js b/test/simple/test-typed-arrays.js
index 803f18a72..00bf61354 100644
--- a/test/simple/test-typed-arrays.js
+++ b/test/simple/test-typed-arrays.js
@@ -174,3 +174,11 @@ uint8c.set(1, 260);
assert.equal(uint8c[0], 0);
assert.equal(uint8c[1], 255);
+
+(function() {
+ var numbers = [];
+ for (var i = 128; i <= 255; ++i) numbers.push(i);
+ var array = new Uint8Array(numbers);
+ var view = new DataView(array.buffer);
+ for (var i = 128; i <= 255; ++i) assert.equal(view.getInt8(i - 128), i - 256);
+})();