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

Unified Diff: test/mjsunit/asm/atomics-load.js

Issue 1676613002: [Atomics] Fix atomic access index validation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge master Created 4 years, 9 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
« no previous file with comments | « test/mjsunit/asm/atomics-exchange.js ('k') | test/mjsunit/asm/atomics-or.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/asm/atomics-load.js
diff --git a/test/mjsunit/asm/atomics-load.js b/test/mjsunit/asm/atomics-load.js
index 3e1d19f3a61df0fa778b36fa77d6bc86b30b37db..9a61a237beaf7873c9a8eecd4643a91575115c9d 100644
--- a/test/mjsunit/asm/atomics-load.js
+++ b/test/mjsunit/asm/atomics-load.js
@@ -62,7 +62,7 @@ function clearArray() {
}
}
-function testElementType(taConstr, f, oobValue, offset) {
+function testElementType(taConstr, f, offset) {
clearArray();
var ta = new taConstr(sab, offset);
@@ -71,17 +71,17 @@ function testElementType(taConstr, f, oobValue, offset) {
assertEquals(10, f(0), name);
assertEquals(0, f(1), name);
// out of bounds
- assertEquals(oobValue, f(-1), name);
- assertEquals(oobValue, f(ta.length), name);
+ assertThrows(function() { f(-1); });
+ assertThrows(function() { f(ta.length); });
}
function testElement(m, offset) {
- testElementType(Int8Array, m.loadi8, 0, offset);
- testElementType(Int16Array, m.loadi16, 0, offset);
- testElementType(Int32Array, m.loadi32, 0, offset);
- testElementType(Uint8Array, m.loadu8, 0, offset);
- testElementType(Uint16Array, m.loadu16, 0, offset);
- testElementType(Uint32Array, m.loadu32, 0, offset);
+ testElementType(Int8Array, m.loadi8, offset);
+ testElementType(Int16Array, m.loadi16, offset);
+ testElementType(Int32Array, m.loadi32, offset);
+ testElementType(Uint8Array, m.loadu8, offset);
+ testElementType(Uint16Array, m.loadu16, offset);
+ testElementType(Uint32Array, m.loadu32, offset);
}
var offset = 0;
« no previous file with comments | « test/mjsunit/asm/atomics-exchange.js ('k') | test/mjsunit/asm/atomics-or.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698