Author: martin
Date: 2007-03-06 11:43:53 -0500 (Tue, 06 Mar 2007)
New Revision: 73822
Modified:
trunk/debugger/ChangeLog
trunk/debugger/test/src/TestSession.cs
trunk/debugger/test/testsuite/TestSession.cs
Log:
2007-03-06 Martin Baulig <[EMAIL PROTECTED]>
* test/testsuite/TestSession.cs: Add a new testcase.
Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog 2007-03-06 16:41:20 UTC (rev 73821)
+++ trunk/debugger/ChangeLog 2007-03-06 16:43:53 UTC (rev 73822)
@@ -1,5 +1,9 @@
2007-03-06 Martin Baulig <[EMAIL PROTECTED]>
+ * test/testsuite/TestSession.cs: Add a new testcase.
+
+2007-03-06 Martin Baulig <[EMAIL PROTECTED]>
+
* classes/Debugger.cs
(Debugger.MainProcessCreatedEvent): New public event.
Modified: trunk/debugger/test/src/TestSession.cs
===================================================================
--- trunk/debugger/test/src/TestSession.cs 2007-03-06 16:41:20 UTC (rev
73821)
+++ trunk/debugger/test/src/TestSession.cs 2007-03-06 16:43:53 UTC (rev
73822)
@@ -21,7 +21,7 @@
public static void Bar ()
{
Hello hello = new Hello ();
- Console.WriteLine ("Irish Pub");
+ hello.IrishPub ();
hello.World ();
}
}
@@ -32,4 +32,9 @@
{
Console.WriteLine ("WORLD!");
}
+
+ public void IrishPub ()
+ {
+ Console.WriteLine ("Irish Pub");
+ }
}
Modified: trunk/debugger/test/testsuite/TestSession.cs
===================================================================
--- trunk/debugger/test/testsuite/TestSession.cs 2007-03-06 16:41:20 UTC
(rev 73821)
+++ trunk/debugger/test/testsuite/TestSession.cs 2007-03-06 16:43:53 UTC
(rev 73822)
@@ -19,10 +19,12 @@
const int line_test = 15;
const int line_bar = 23;
const int line_world = 33;
+ const int line_pub = 38;
int bpt_test;
int bpt_bar;
int bpt_world;
+ int bpt_pub;
byte[] session;
@@ -110,9 +112,8 @@
{
Compile (FileName);
- Process process;
- using (MemoryStream ms = new MemoryStream (session))
- process = LoadSession (ms);
+ AssertExecute ("run");
+ Process process = AssertMainProcessCreated ();
Assert.IsTrue (process.IsManaged);
Assert.IsTrue (process.MainThread.IsStopped);
Thread thread = process.MainThread;
@@ -159,5 +160,33 @@
AssertTargetOutput ("WORLD!");
AssertTargetExited (thread.Process);
}
+
+ [Test]
+ [Category("Session")]
+ public void TestBreakpoint2 ()
+ {
+ bpt_pub = AssertBreakpoint ("Hello.IrishPub");
+ AssertExecute ("disable " + bpt_test);
+ AssertExecute ("disable " + bpt_bar);
+
+ AssertExecute ("run");
+ Process process = AssertMainProcessCreated ();
+ Assert.IsTrue (process.IsManaged);
+ Assert.IsTrue (process.MainThread.IsStopped);
+ Thread thread = process.MainThread;
+
+ AssertStopped (thread, "X.Main()", line_main);
+
+ AssertExecute ("continue");
+ AssertTargetOutput ("Hello World");
+ AssertHitBreakpoint (thread, bpt_pub,
"Hello.IrishPub()", line_pub);
+ AssertExecute ("continue");
+ AssertTargetOutput ("Irish Pub");
+ AssertHitBreakpoint (thread, bpt_world,
"Hello.World()", line_world);
+ AssertExecute ("continue");
+
+ AssertTargetOutput ("WORLD!");
+ AssertTargetExited (thread.Process);
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches