Skip to content

Commit

Permalink
Test case for bug#433908.
Browse files Browse the repository at this point in the history
svn path=/trunk/mono/; revision=115350
  • Loading branch information
illupus committed Oct 9, 2008
1 parent 205b920 commit 27c7555
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions mono/tests/Makefile.am
Expand Up @@ -252,6 +252,7 @@ BASE_TEST_CS_SRC= \
test-type-ctor.cs \ test-type-ctor.cs \
soft-float-tests.cs \ soft-float-tests.cs \
thread-exit.cs \ thread-exit.cs \
finalize-parent.cs \
assemblyresolve_event2.2.cs \ assemblyresolve_event2.2.cs \
interlocked-2.2.cs \ interlocked-2.2.cs \
pinvoke-2.2.cs \ pinvoke-2.2.cs \
Expand Down
24 changes: 24 additions & 0 deletions mono/tests/finalize-parent.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.