Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: test/mjsunit/harmony/dataview-accessors.js

Issue 2090353003: Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: enable test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/harmony/dataview-accessors.js
diff --git a/test/mjsunit/harmony/dataview-accessors.js b/test/mjsunit/harmony/dataview-accessors.js
index c54f8cc20d056ecdfdc05000af1df8d63c4017b6..d7b80c8d79ea30674382e8f1d5db205a5d44b066 100644
--- a/test/mjsunit/harmony/dataview-accessors.js
+++ b/test/mjsunit/harmony/dataview-accessors.js
@@ -400,12 +400,8 @@ function TestGeneralAccessors() {
assertThrows(function() { f(); }, TypeError);
f.call(a, 0, 0); // should not throw
assertThrows(function() { f.call({}, 0, 0); }, TypeError);
- assertThrows(function() { f.call(a); }, TypeError);
- if (name.indexOf("set") == 0) {
- assertThrows(function() { f.call(a, 1); }, TypeError);
- } else {
- f.call(a, 1); // should not throw
- }
+ f.call(a);
+ f.call(a, 1); // should not throw
}
CheckAccessor("getUint8");
CheckAccessor("setUint8");
@@ -430,32 +426,32 @@ TestGeneralAccessors();
function TestInsufficientArguments() {
var a = new DataView(new ArrayBuffer(256));
- assertThrows(function() { a.getUint8(); }, TypeError);
- assertThrows(function() { a.getInt8(); }, TypeError);
- assertThrows(function() { a.getUint16(); }, TypeError);
- assertThrows(function() { a.getInt16(); }, TypeError);
- assertThrows(function() { a.getUint32(); }, TypeError);
- assertThrows(function() { a.getInt32(); }, TypeError);
- assertThrows(function() { a.getFloat32(); }, TypeError);
- assertThrows(function() { a.getFloat64(); }, TypeError);
-
- assertThrows(function() { a.setUint8(); }, TypeError);
- assertThrows(function() { a.setInt8(); }, TypeError);
- assertThrows(function() { a.setUint16(); }, TypeError);
- assertThrows(function() { a.setInt16(); }, TypeError);
- assertThrows(function() { a.setUint32(); }, TypeError);
- assertThrows(function() { a.setInt32(); }, TypeError);
- assertThrows(function() { a.setFloat32(); }, TypeError);
- assertThrows(function() { a.setFloat64(); }, TypeError);
-
- assertThrows(function() { a.setUint8(1) }, TypeError);
- assertThrows(function() { a.setInt8(1) }, TypeError);
- assertThrows(function() { a.setUint16(1) }, TypeError);
- assertThrows(function() { a.setInt16(1) }, TypeError);
- assertThrows(function() { a.setUint32(1) }, TypeError);
- assertThrows(function() { a.setInt32(1) }, TypeError);
- assertThrows(function() { a.setFloat32(1) }, TypeError);
- assertThrows(function() { a.setFloat64(1) }, TypeError);
+ a.getUint8();
+ a.getInt8();
+ a.getUint16();
+ a.getInt16();
+ a.getUint32();
+ a.getInt32();
+ a.getFloat32();
+ a.getFloat64();
+
+ a.setUint8();
+ a.setInt8();
+ a.setUint16();
+ a.setInt16();
+ a.setUint32();
+ a.setInt32();
+ a.setFloat32();
+ a.setFloat64();
+
+ a.setUint8(1);
+ a.setInt8(1);
+ a.setUint16(1);
+ a.setInt16(1);
+ a.setUint32(1);
+ a.setInt32(1);
+ a.setFloat32(1);
+ a.setFloat64(1);
Dan Ehrenberg 2016/06/23 21:45:32 Can you assert that these get values that make sen
bakkot 2016/06/28 23:41:07 Done.
}
TestInsufficientArguments();

Powered by Google App Engine
This is Rietveld 408576698