|
From: Christopher W. <caw...@us...> - 2005-12-03 03:52:12
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14160/src/org/rubypeople/rdt/debug/core/tests Modified Files: FTC_DebuggerCommunicationTest.java Log Message: fix tests to match expected behavior now (don't suspend at exceptions by default). Add test to explicitly state this assumption. Index: FTC_DebuggerCommunicationTest.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_DebuggerCommunicationTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FTC_DebuggerCommunicationTest.java 16 Oct 2005 23:52:49 -0000 1.1 --- FTC_DebuggerCommunicationTest.java 3 Dec 2005 03:52:02 -0000 1.2 *************** *** 315,318 **** --- 315,319 ---- // will suspend createSocket(new String[] { "puts 'a'", "raise 'message \\dir\\file: <xml/>\n<8>'", "puts 'c'" }); + sendRuby("catch StandardError"); sendRuby("cont"); System.out.println("Waiting for exception"); *************** *** 324,328 **** assertEquals("message \\dir\\file: <xml/> <8>", ((ExceptionSuspensionPoint) hit).getExceptionMessage()); assertEquals("RuntimeError", ((ExceptionSuspensionPoint) hit).getExceptionType()); ! sendRuby("cont"); } --- 325,330 ---- assertEquals("message \\dir\\file: <xml/> <8>", ((ExceptionSuspensionPoint) hit).getExceptionMessage()); assertEquals("RuntimeError", ((ExceptionSuspensionPoint) hit).getExceptionType()); ! sendRuby("catch off"); ! sendRuby("cont"); } *************** *** 336,339 **** --- 338,349 ---- } + public void testExceptionsIgnoredByDefault() throws Exception { + createSocket(new String[] { "puts 'a'", "raise 'dont stop'" }); + sendRuby("cont"); + System.out.println("Waiting for the program to finish without suspending at the raise command"); + SuspensionPoint hit = getSuspensionReader().readSuspension(); + assertNull(hit); + } + public void testExceptionHierarchy() throws Exception { createSocket(new String[] { "class MyError < StandardError", "end", "begin", "raise StandardError.new", "rescue", "end", "raise MyError.new"}); |