Author: zoltan
Date: 2005-03-31 08:47:38 -0500 (Thu, 31 Mar 2005)
New Revision: 42425

Added:
   trunk/mono/mono/tests/stack-overflow.cs
Modified:
   trunk/mono/mono/tests/ChangeLog
Log:
2005-03-31  Zoltan Varga  <[EMAIL PROTECTED]>

        * stack-overflow.cs: New tests, not yet enabled.


Modified: trunk/mono/mono/tests/ChangeLog
===================================================================
--- trunk/mono/mono/tests/ChangeLog     2005-03-31 13:46:51 UTC (rev 42424)
+++ trunk/mono/mono/tests/ChangeLog     2005-03-31 13:47:38 UTC (rev 42425)
@@ -1,3 +1,7 @@
+2005-03-31  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * stack-overflow.cs: New tests, not yet enabled.
+
 2005-03-10  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * dataslot.cs: Add tests for #65414.

Added: trunk/mono/mono/tests/stack-overflow.cs
===================================================================
--- trunk/mono/mono/tests/stack-overflow.cs     2005-03-31 13:46:51 UTC (rev 
42424)
+++ trunk/mono/mono/tests/stack-overflow.cs     2005-03-31 13:47:38 UTC (rev 
42425)
@@ -0,0 +1,41 @@
+using System;
+
+public class Tests {
+
+       struct A1 {
+               long a1, a2, a3, a4;
+       }
+
+       struct A2 {
+               A1 a1, a2, a3, a4;
+       }
+
+       struct A3 {
+               A2 a1, a2, a3, a4;
+       }
+
+       struct A4 {
+               A3 a1, a2, a3, a4;
+       }
+
+       struct A5 {
+               A4 a1, a2, a3, a4;
+       }
+
+       public static int foo () {
+               A5 a5;
+
+               return foo () + 1;
+       }
+
+       public static int Main () {
+               try {
+                       foo ();
+               }
+               catch (StackOverflowException) {
+                       Console.WriteLine ("Stack overflow caught.");
+                       return 0;
+               }
+               return 1;
+       }
+}

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

Reply via email to