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

Unified Diff: test/mjsunit/harmony/proxies-with.js

Issue 1544793002: [tests] Fix bogus uses of assertThrows. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 11 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/harmony/proxies-for.js ('k') | test/mjsunit/harmony/reflect.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies-with.js
diff --git a/test/mjsunit/harmony/proxies-with.js b/test/mjsunit/harmony/proxies-with.js
index bd051ac25f3225ad3dd0bedaa7bb3785c7288f5f..1aa13adea6cb8d354c7a0b8863d7e99db22e473c 100644
--- a/test/mjsunit/harmony/proxies-with.js
+++ b/test/mjsunit/harmony/proxies-with.js
@@ -168,14 +168,14 @@ function TestWithGetCallThrow2(create, handler) {
var p = create(handler)
with (p) {
- assertThrows(function(){ a() }, "myexn")
+ assertThrowsEquals(function(){ a() }, "myexn")
assertEquals("local", b())
assertEquals("global", c())
}
var o = Object.create(p, {d: {value: function() { return "own" }}})
with (o) {
- assertThrows(function(){ a() }, "myexn")
+ assertThrowsEquals(function(){ a() }, "myexn")
assertEquals("local", b())
assertEquals("global", c())
assertEquals("own", d())
@@ -185,10 +185,12 @@ function TestWithGetCallThrow2(create, handler) {
function onproxythrow() { throw "myexn" }
TestWithGetCallThrow({
+ has: function(r, k) { return k === "a"; },
get: function(r, k) { key = k; return k === "a" ? onproxythrow : undefined },
})
TestWithGetCallThrow({
+ has: function(r, k) { return k === "a"; },
get: function(r, k) { return this.get2(r, k) },
get2: function(r, k) { key = k; return k === "a" ? onproxythrow : undefined },
})
@@ -305,7 +307,7 @@ function TestWithSetThrow(handler, hasSetter) {
function TestWithSetThrow2(create, handler, hasSetter) {
var p = create(handler)
- assertThrows(function(){
+ assertThrowsEquals(function(){
with (p) {
a = 1
}
@@ -314,7 +316,7 @@ function TestWithSetThrow2(create, handler, hasSetter) {
if (!hasSetter) return
var o = Object.create(p, {})
- assertThrows(function(){
+ assertThrowsEquals(function(){
with (o) {
a = 1
}
« no previous file with comments | « test/mjsunit/harmony/proxies-for.js ('k') | test/mjsunit/harmony/reflect.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698