Author: zoltan
Date: 2007-09-07 12:04:02 -0400 (Fri, 07 Sep 2007)
New Revision: 85484
Added:
trunk/mono/mono/tests/async-exceptions.cs
Modified:
trunk/mono/mono/tests/ChangeLog
trunk/mono/mono/tests/Makefile.am
Log:
2007-09-07 Zoltan Varga <[EMAIL PROTECTED]>
* async-exceptions.cs Makefile.am: New test case, not working yet.
Modified: trunk/mono/mono/tests/ChangeLog
===================================================================
--- trunk/mono/mono/tests/ChangeLog 2007-09-07 15:56:20 UTC (rev 85483)
+++ trunk/mono/mono/tests/ChangeLog 2007-09-07 16:04:02 UTC (rev 85484)
@@ -1,5 +1,7 @@
2007-09-07 Zoltan Varga <[EMAIL PROTECTED]>
+ * async-exceptions.cs Makefile.am: New test case, not working yet.
+
* Makefile.am: Allways distribute coreclr-security.cs.
2007-09-03 Zoltan Varga <[EMAIL PROTECTED]>
Modified: trunk/mono/mono/tests/Makefile.am
===================================================================
--- trunk/mono/mono/tests/Makefile.am 2007-09-07 15:56:20 UTC (rev 85483)
+++ trunk/mono/mono/tests/Makefile.am 2007-09-07 16:04:02 UTC (rev 85484)
@@ -563,6 +563,12 @@
$(RUNTIME21) --security=core-clr-test coreclr-security.exe
endif
+EXTRA_DIST += async-exceptions.cs
+async-exceptions.exe : async-exceptions.cs
+ $(MCS) -out:async-exceptions.exe $(srcdir)/async-exceptions.cs
+test-async-exceptions : async-exceptions.exe
+ for i in `echo 0 1 2 3 4 5 6 7 8 9 10`; do $(RUNTIME)
--inject-async-exc Tests:foo $$i async-exceptions.exe || exit 1; done
+
# Useful if mono is compiled with --enable-shared=no
patch-libtool:
cp "../../libtool" .
Added: trunk/mono/mono/tests/async-exceptions.cs
===================================================================
--- trunk/mono/mono/tests/async-exceptions.cs 2007-09-07 15:56:20 UTC (rev
85483)
+++ trunk/mono/mono/tests/async-exceptions.cs 2007-09-07 16:04:02 UTC (rev
85484)
@@ -0,0 +1,24 @@
+//
+// Test whenever the runtime unwinder can deal with exceptions raised in the
method
+// prolog or epilog
+//
+using System;
+
+public class Tests {
+
+ // Async exceptions will be raised while executing this method
+ static void foo () {
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+
+ public static int Main (String[] args) {
+ try {
+ foo ();
+ } catch (NullReferenceException ex) {
+ return 0;
+ }
+
+ return 0;
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches