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

Unified Diff: test/mjsunit/asm/atomics-store.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-or.js ('k') | test/mjsunit/asm/atomics-sub.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/asm/atomics-store.js
diff --git a/test/mjsunit/asm/atomics-store.js b/test/mjsunit/asm/atomics-store.js
index dab83af8a6488186cc61e63384561f11040b37ac..8b9e4c637f0c66845193e490adcbf3d1eccd935a 100644
--- a/test/mjsunit/asm/atomics-store.js
+++ b/test/mjsunit/asm/atomics-store.js
@@ -68,7 +68,7 @@ function clearArray() {
}
}
-function testElementType(taConstr, f, oobValue, offset) {
+function testElementType(taConstr, f, offset) {
clearArray();
var ta = new taConstr(sab, offset);
@@ -76,17 +76,17 @@ function testElementType(taConstr, f, oobValue, offset) {
assertEquals(10, f(0, 10), name);
assertEquals(10, ta[0]);
// out of bounds
- assertEquals(oobValue, f(-1, 0), name);
- assertEquals(oobValue, f(ta.length, 0), name);
+ assertThrows(function() { f(-1, 0); });
+ assertThrows(function() { f(ta.length, 0); });
}
function testElement(m, offset) {
- testElementType(Int8Array, m.storei8, 0, offset);
- testElementType(Int16Array, m.storei16, 0, offset);
- testElementType(Int32Array, m.storei32, 0, offset);
- testElementType(Uint8Array, m.storeu8, 0, offset);
- testElementType(Uint16Array, m.storeu16, 0, offset);
- testElementType(Uint32Array, m.storeu32, 0, offset);
+ testElementType(Int8Array, m.storei8, offset);
+ testElementType(Int16Array, m.storei16, offset);
+ testElementType(Int32Array, m.storei32, offset);
+ testElementType(Uint8Array, m.storeu8, offset);
+ testElementType(Uint16Array, m.storeu16, offset);
+ testElementType(Uint32Array, m.storeu32, offset);
}
var offset = 0;
« no previous file with comments | « test/mjsunit/asm/atomics-or.js ('k') | test/mjsunit/asm/atomics-sub.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698