Index: test/mjsunit/harmony/futex.js |
diff --git a/test/mjsunit/harmony/futex.js b/test/mjsunit/harmony/futex.js |
index 3a73e0a9b82a5c10cdb7a278b5bc81b948c98980..626cff5fdba7554250fb0e67b7bff010369a41de 100644 |
--- a/test/mjsunit/harmony/futex.js |
+++ b/test/mjsunit/harmony/futex.js |
@@ -51,24 +51,36 @@ |
// Valid indexes are 0-3. |
[-1, 4, 100].forEach(function(invalidIndex) { |
- assertEquals(undefined, Atomics.futexWait(i32a, invalidIndex, 0)); |
- assertEquals(undefined, Atomics.futexWake(i32a, invalidIndex, 0)); |
+ assertThrows(function() { |
+ Atomics.futexWait(i32a, invalidIndex, 0); |
+ }, RangeError); |
+ assertThrows(function() { |
+ Atomics.futexWake(i32a, invalidIndex, 0); |
+ }, RangeError); |
var validIndex = 0; |
- assertEquals(undefined, Atomics.futexWakeOrRequeue(i32a, invalidIndex, 0, 0, |
- validIndex)); |
- assertEquals(undefined, Atomics.futexWakeOrRequeue(i32a, validIndex, 0, 0, |
- invalidIndex)); |
+ assertThrows(function() { |
+ Atomics.futexWakeOrRequeue(i32a, invalidIndex, 0, 0, validIndex); |
+ }, RangeError); |
+ assertThrows(function() { |
+ Atomics.futexWakeOrRequeue(i32a, validIndex, 0, 0, invalidIndex); |
+ }, RangeError); |
}); |
i32a = new Int32Array(sab, 8); |
[-1, 2, 100].forEach(function(invalidIndex) { |
- assertEquals(undefined, Atomics.futexWait(i32a, invalidIndex, 0)); |
- assertEquals(undefined, Atomics.futexWake(i32a, invalidIndex, 0)); |
+ assertThrows(function() { |
+ Atomics.futexWait(i32a, invalidIndex, 0); |
+ }, RangeError); |
+ assertThrows(function() { |
+ Atomics.futexWake(i32a, invalidIndex, 0); |
+ }, RangeError); |
var validIndex = 0; |
- assertEquals(undefined, Atomics.futexWakeOrRequeue(i32a, invalidIndex, 0, 0, |
- validIndex)); |
- assertEquals(undefined, Atomics.futexWakeOrRequeue(i32a, validIndex, 0, 0, |
- invalidIndex)); |
+ assertThrows(function() { |
+ Atomics.futexWakeOrRequeue(i32a, invalidIndex, 0, 0, validIndex); |
+ }, RangeError); |
+ assertThrows(function() { |
+ Atomics.futexWakeOrRequeue(i32a, validIndex, 0, 0, invalidIndex); |
+ }, RangeError); |
}); |
})(); |