Author: martin
Date: 2008-02-15 07:12:53 -0500 (Fri, 15 Feb 2008)
New Revision: 95742

Added:
   branches/martin/debugger-terrania/debugger/test/H.cs
   branches/martin/debugger-terrania/debugger/test/I.cs
   branches/martin/debugger-terrania/debugger/test/J.cs
   branches/martin/debugger-terrania/debugger/test/K.cs
   branches/martin/debugger-terrania/debugger/test/L.cs
   branches/martin/debugger-terrania/debugger/test/N.cs
   branches/martin/debugger-terrania/debugger/test/O.cs
   branches/martin/debugger-terrania/debugger/test/P.cs
   branches/martin/debugger-terrania/debugger/test/Q.cs
   branches/martin/debugger-terrania/debugger/test/R.cs
   branches/martin/debugger-terrania/debugger/test/S.cs
Log:


Added: branches/martin/debugger-terrania/debugger/test/H.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/H.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/H.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,34 @@
+using System;
+
+delegate void S ();
+
+public class Foo<T>
+{
+       public readonly T Data;
+
+       public Foo (T t)
+       {
+               this.Data = t;
+       }
+
+       public void Test ()
+       {
+               T t = Data;
+               Console.WriteLine (t);
+
+               S b = delegate {
+                       Console.WriteLine (t);
+               };
+
+               b ();
+       }
+}
+
+class X
+{
+       static void Main ()
+       {
+               Foo<int> foo = new Foo<int> (3);
+               foo.Test ();
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/I.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/I.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/I.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+
+public delegate void Hello ();
+
+struct Foo
+{
+       public int ID;
+
+       public Foo (int id)
+       {
+               this.ID = id;
+       }
+
+       public IEnumerable<Foo> Test (Foo foo)
+       {
+               yield return this;
+               yield return foo;
+       }
+
+       public void Hello (int value)
+       {
+               if (ID != value)
+                       throw new InvalidOperationException ();
+       }
+
+       public override string ToString ()
+       {
+               return String.Format ("Foo ({0})", ID);
+       }
+}
+
+class X
+{
+       static void Main ()
+       {
+               Foo foo = new Foo (3);
+               IEnumerable<Foo> enumerable = foo.Test (foo);
+               foreach (Foo bar in enumerable)
+                       Console.WriteLine (bar);
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/J.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/J.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/J.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,21 @@
+using System;
+
+delegate void S ();
+
+class X
+{
+       static int Main ()
+       {
+               int a = 1;
+
+               S b = delegate {
+                       a = 2;
+               };
+
+               Console.WriteLine (a);
+
+               b ();
+
+               return 0;
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/K.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/K.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/K.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+
+delegate int Foo ();
+
+class X
+{
+       static void Main ()
+       {
+               Test ("Hello World", 8);
+       }
+
+       public static void Test<R> (R r, int a)
+       {
+               for (int b = a; b > 0; b--) {
+                       R s = r;
+                       Foo foo = delegate {
+                               Console.WriteLine (b);
+                               Console.WriteLine (s);
+                               Console.WriteLine (a);
+                               Console.WriteLine (r);
+                               return 3;
+                       };
+                       a -= foo ();
+               }
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/L.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/L.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/L.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+delegate int Foo ();
+
+class X
+{
+       static void Main ()
+       {
+               Test (8);
+       }
+
+       public static void Test (int a)
+       {
+               for (int b = a; b > 0; b--) {
+                       int s = a;
+                       Foo foo = delegate {
+                               Console.WriteLine (a);
+                               Console.WriteLine (b);
+                               Console.WriteLine (s);
+                               return 3;
+                       };
+                       a -= foo ();
+               }
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/N.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/N.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/N.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,17 @@
+using System;
+
+class X
+{
+       static void Main ()
+       {
+               {
+                       int a = 8;
+                       Console.WriteLine (a);
+               }
+
+               {
+                       long a = 9;
+                       Console.WriteLine (a);
+               }
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/O.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/O.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/O.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,32 @@
+using System;
+
+public delegate void Foo<V> (V v);
+
+public delegate void Bar<W> (W w);
+
+
+class Test<T>
+{
+       public static void Hello<S> (T t, S s)
+       {
+               Foo<long> foo = delegate (long r) {
+                       Console.WriteLine (r);
+                       Bar<T> bar = delegate (T x) {
+                               Console.WriteLine (r);
+                               Console.WriteLine (t);
+                               Console.WriteLine (s);
+                               Console.WriteLine (x);
+                       };
+                       bar (t);
+               };
+               foo (5);
+       }
+}
+
+class X
+{
+       static void Main ()
+       {
+               Test<string>.Hello ("World", 3.1415F);
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/P.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/P.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/P.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,22 @@
+using System;
+
+public delegate void Foo (long a);
+
+class Test
+{
+       public static void Hello (int t)
+       {
+               Foo foo = delegate (long r) {
+                       Console.WriteLine (r);
+               };
+               foo (5);
+       }
+}
+
+class X
+{
+       static void Main ()
+       {
+               Test.Hello (9);
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/Q.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/Q.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/Q.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,43 @@
+using System;
+
+public delegate void Foo (long a);
+
+class Test
+{
+       public static void Hello ()
+       {
+               Console.WriteLine ("Hello");
+
+               {
+                       int a = 5;
+                       
+                       Foo foo = delegate (long r) {
+                               Console.WriteLine (r + a);
+                       };
+
+                       foo (9);
+               }
+
+               Console.WriteLine ("World");
+
+               {
+                       int a = 8;
+                       
+                       Foo foo = delegate (long r) {
+                               Console.WriteLine (r + a);
+                       };
+
+                       foo (11);
+               }
+
+               Console.WriteLine ("Galaxy");
+       }
+}
+
+class X
+{
+       static void Main ()
+       {
+               Test.Hello ();
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/R.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/R.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/R.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,30 @@
+using System;
+using System.Collections;
+
+class X
+{
+       static IEnumerator GetRange ()
+       {
+               yield return 1;
+               yield return 2;
+
+               {
+                       int a = 3;
+                       yield return a;
+               }
+
+               yield return 4;
+               yield return 5;
+       }
+
+       static void Main ()
+       {
+               int total = 0;
+               
+               IEnumerator e = GetRange ();
+               while (e.MoveNext ())
+                       total += (int) e.Current;
+
+               Console.WriteLine (total);
+       }
+}

Added: branches/martin/debugger-terrania/debugger/test/S.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/S.cs        2008-02-15 
12:02:01 UTC (rev 95741)
+++ branches/martin/debugger-terrania/debugger/test/S.cs        2008-02-15 
12:12:53 UTC (rev 95742)
@@ -0,0 +1,27 @@
+using System;
+
+class X
+{
+       static int total;
+
+       static bool Test ()
+       {
+               return total < 100;
+       }
+
+       static object Total {
+               get {
+                       return total;
+               }
+       }
+
+       static void Main ()
+       {
+               total = 5;
+
+               while (true)
+                       total += (int) Total;
+
+               Console.WriteLine (total);
+       }
+}

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

Reply via email to