Author: martin
Date: 2008-02-06 03:40:05 -0500 (Wed, 06 Feb 2008)
New Revision: 95000

Modified:
   branches/martin/debugger-terrania/debugger/test/src/TestAnonymous.cs
   branches/martin/debugger-terrania/debugger/test/testsuite/TestAnonymous.cs
Log:


Modified: branches/martin/debugger-terrania/debugger/test/src/TestAnonymous.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/src/TestAnonymous.cs        
2008-02-06 07:58:36 UTC (rev 94999)
+++ branches/martin/debugger-terrania/debugger/test/src/TestAnonymous.cs        
2008-02-06 08:40:05 UTC (rev 95000)
@@ -6,6 +6,7 @@
        public static void Main ()
        {
                Test1.X.Run ();                                         // @MDB 
LINE: main
+               Test2.X.Run ();
        }
 }
 
@@ -37,3 +38,31 @@
                }
        }
 }
+
+namespace Test2
+{
+       delegate void Foo ();
+
+       public class X
+       {
+               public void Hello<U> (U u)
+               { }                                                     // @MDB 
BREAKPOINT: test2 hello
+
+               public void Test<T> (T t)
+               {
+                       T u = t;
+                       Hello (u);                                      // @MDB 
BREAKPOINT: test2
+                       Foo foo = delegate {
+                               Hello (u);                              // @MDB 
LINE: test2 foo
+                       };
+                       foo ();                                         // @MDB 
BREAKPOINT: test2 after foo
+                       Hello (u);
+               }
+
+               public static void Run ()
+               {
+                       X x = new X ();
+                       x.Test (3);
+               }
+       }
+}

Modified: 
branches/martin/debugger-terrania/debugger/test/testsuite/TestAnonymous.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/testsuite/TestAnonymous.cs  
2008-02-06 07:58:36 UTC (rev 94999)
+++ branches/martin/debugger-terrania/debugger/test/testsuite/TestAnonymous.cs  
2008-02-06 08:40:05 UTC (rev 95000)
@@ -28,6 +28,10 @@
                        AssertStopped (thread, "RunTests.Main()", GetLine 
("main"));
                        AssertExecute ("continue");
 
+                       //
+                       // Test1
+                       //
+
                        AssertHitBreakpoint (thread, "test1", 
"Test1.X.Test1(R,int)");
 
                        AssertPrint (thread, "a", "(int) 2");
@@ -40,7 +44,7 @@
 
                        AssertExecute ("step");
                        // FIXME: Print a better method name
-                       AssertStopped (thread, 
"Test1.X/<>c__CompilerGenerated2`1<R>.<Test1>c__3()",
+                       AssertStopped (thread, 
"Test1.X/<>c__CompilerGenerated3`1<R>.<Test1>c__4()",
                                       GetLine ("test1 foo"));
 
                        AssertPrint (thread, "a", "(int) 2");
@@ -66,6 +70,39 @@
                        AssertTargetOutput ("500");
                        AssertTargetOutput ("-1");
                        AssertTargetOutput ("500");
+
+                       //
+                       // Test2
+                       //
+
+                       AssertHitBreakpoint (thread, "test2", 
"Test2.X.Test(T)");
+                       AssertPrint (thread, "t", "(int) 3");
+                       AssertPrint (thread, "u", "(int) 3");
+                       AssertType (thread, "t", "int");
+                       AssertType (thread, "u", "int");
+
+                       AssertExecute ("continue");
+                       AssertHitBreakpoint (thread, "test2 hello", 
"Test2.X.Hello(U)");
+
+                       AssertExecute ("continue");
+                       AssertHitBreakpoint (thread, "test2 after foo", 
"Test2.X.Test(T)");
+
+                       AssertExecute ("step");
+                       AssertStopped (thread,
+                                      
"Test2.X/<>c__CompilerGenerated1`1<T>.<Test>c__5()",
+                                      GetLine ("test2 foo"));
+
+                       AssertPrint (thread, "u", "(int) 3");
+                       AssertType (thread, "u", "int");
+
+                       AssertExecute ("continue");
+                       AssertHitBreakpoint (thread, "test2 hello", 
"Test2.X.Hello(U)");
+
+                       AssertExecute ("continue");
+                       AssertHitBreakpoint (thread, "test2 hello", 
"Test2.X.Hello(U)");
+
+                       AssertExecute ("continue");
+
                        AssertTargetExited (thread.Process);
                }
        }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to