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

Unified Diff: test/mjsunit/stack-traces.js

Issue 2209663003: Fix several stack-traces tests using assertUnreachable() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/stack-traces.js
diff --git a/test/mjsunit/stack-traces.js b/test/mjsunit/stack-traces.js
index b0d93dbdfeebcc1b0628468079078d3fab97ec6e..8603d7cf2890546dfd6aa439990b0d944e6890c1 100644
--- a/test/mjsunit/stack-traces.js
+++ b/test/mjsunit/stack-traces.js
@@ -252,11 +252,14 @@ function testTraceNativeConversion(nativeFunc) {
function testOmittedBuiltin(throwing, omitted) {
+ var reached = false;
try {
throwing();
- assertUnreachable(omitted);
+ reached = true;
} catch (e) {
assertTrue(e.stack.indexOf(omitted) < 0, omitted);
+ } finally {
+ assertFalse(reached);
}
}
@@ -305,19 +308,18 @@ testOmittedBuiltin(function(){ [thrower, 2].sort(function (a,b) {
// Omitted because ADD from runtime.js is non-native builtin.
testOmittedBuiltin(function(){ thrower + 2; }, "ADD");
+var reached = false;
var error = new Error();
-error.toString = function() { assertUnreachable(); };
+error.toString = function() { reached = true; };
error.stack;
+assertFalse(reached);
+reached = false;
error = new Error();
-error.name = { toString: function() { assertUnreachable(); }};
jgruber 2016/08/03 16:20:27 This test was completely removed since the spec ac
-error.message = { toString: function() { assertUnreachable(); }};
-error.stack;
-
-error = new Error();
-Array.prototype.push = function(x) { assertUnreachable(); };
-Array.prototype.join = function(x) { assertUnreachable(); };
+Array.prototype.push = function(x) { reached = true; };
+Array.prototype.join = function(x) { reached = true; };
error.stack;
+assertFalse(reached);
var fired = false;
error = new Error({ toString: function() { fired = true; } });
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698