Permalink
Browse files

Test case for bug#433908.

svn path=/trunk/mono/; revision=115350
  • Loading branch information...
1 parent 205b920 commit 27c75551acc59bf81c6928577dbd86e3809e28de @illupus illupus committed Oct 9, 2008
Showing with 25 additions and 0 deletions.
  1. +1 −0 mono/tests/Makefile.am
  2. +24 −0 mono/tests/finalize-parent.cs
View
@@ -252,6 +252,7 @@ BASE_TEST_CS_SRC= \
test-type-ctor.cs \
soft-float-tests.cs \
thread-exit.cs \
+ finalize-parent.cs \
assemblyresolve_event2.2.cs \
interlocked-2.2.cs \
pinvoke-2.2.cs \
@@ -0,0 +1,24 @@
+using System;
+
+class P {
+
+ static public int count = 0;
+ ~P () {
+ count++;
+ }
+}
+
+class T : P {
+
+ static int Main () {
+ for (int i = 0; i < 100; ++i) {
+ T t = new T ();
+ }
+ GC.Collect ();
+ GC.WaitForPendingFinalizers ();
+ Console.WriteLine (P.count);
+ if (P.count > 0)
+ return 0;
+ return 1;
+ }
+}

0 comments on commit 27c7555

Please sign in to comment.