Reviewers: Michael Starzinger,

Message:
PTAL.

Description:
Modify two regression tests to actually fail when failing.


BUG=
TEST=regress-1639, regress-1639-2


Please review this at http://codereview.chromium.org/10315009/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M test/mjsunit/regress/regress-1639-2.js
  M test/mjsunit/regress/regress-1639.js


Index: test/mjsunit/regress/regress-1639-2.js
diff --git a/test/mjsunit/regress/regress-1639-2.js b/test/mjsunit/regress/regress-1639-2.js index c439dd8fffb4f270fcb81e6d89eda77bff4d9a56..01f0dc20485e270facd284e1dcafa5aaf3d2deb2 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);
Index: test/mjsunit/regress/regress-1639.js
diff --git a/test/mjsunit/regress/regress-1639.js b/test/mjsunit/regress/regress-1639.js index ed68c97df858b4ded6c0a07b448cb0536f5f30a4..15a2bd20c8bf5fe8f79d73d854499a5b3dcc5bb7 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,4 @@ function c() {
 // Set a break point and call to invoke the debug event listener.
 Debug.setBreakPoint(b, 0, 0);
 a(b);
-// BREAK 3
+assertFalse(exception); // BREAK 3


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to