From: yangguo@chromium.org Date: Thu, 3 May 2012 11:52:56 +0000 (+0000) Subject: Modify two regression tests to actually fail when failing. X-Git-Tag: upstream/4.7.83~16760 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b42ab19d2e511493601e6e6a2d4d237ed4171a48;p=platform%2Fupstream%2Fv8.git Modify two regression tests to actually fail when failing. BUG= TEST=regress-1639, regress-1639-2 Review URL: https://chromiumcodereview.appspot.com/10315009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/test/mjsunit/regress/regress-1639-2.js b/test/mjsunit/regress/regress-1639-2.js index c439dd8..01f0dc2 100644 --- a/test/mjsunit/regress/regress-1639-2.js +++ b/test/mjsunit/regress/regress-1639-2.js @@ -1,4 +1,4 @@ -// Copyright 2011 the V8 project authors. All rights reserved. +// Copyright 2012 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -28,6 +28,7 @@ // Flags: --expose-debug-as debug // Get the Debug object exposed from the debug context global object. Debug = debug.Debug +var exception = false; function sendCommand(state, cmd) { // Get the debug command processor in paused state. @@ -79,6 +80,7 @@ function listener(event, exec_state, event_data, data) { } } catch (e) { print(e); + exception = true; } } @@ -91,3 +93,4 @@ function a() { // Set a break point and call to invoke the debug event listener. Debug.setBreakPoint(a, 0, 0); a(); +assertFalse(exception); diff --git a/test/mjsunit/regress/regress-1639.js b/test/mjsunit/regress/regress-1639.js index ed68c97..47cdbc4 100644 --- a/test/mjsunit/regress/regress-1639.js +++ b/test/mjsunit/regress/regress-1639.js @@ -1,4 +1,4 @@ -// Copyright 2011 the V8 project authors. All rights reserved. +// Copyright 2012 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -29,6 +29,7 @@ // Get the Debug object exposed from the debug context global object. Debug = debug.Debug var breaks = 0; +var exception = false; function sendCommand(state, cmd) { // Get the debug command processor in paused state. @@ -47,15 +48,18 @@ function listener(event, exec_state, event_data, data) { "should not break on unexpected lines") assertEquals('BREAK ' + breaks, line.substr(-7)); breaks++; - sendCommand(exec_state, { - seq: 0, - type: "request", - command: "continue", - arguments: { stepaction: "next" } - }); + if (breaks < 4) { + sendCommand(exec_state, { + seq: 0, + type: "request", + command: "continue", + arguments: { stepaction: "next" } + }); + } } } catch (e) { print(e); + exception = true; } } @@ -82,4 +86,6 @@ function c() { // Set a break point and call to invoke the debug event listener. Debug.setBreakPoint(b, 0, 0); a(b); -// BREAK 3 +a(); // BREAK 3 + +assertFalse(exception);