C# gc tests failure fix

Sometimes the GC just won't run the finalizers, so we output a warning
instead of throwing an error, so now the test-suite will pass but with a
warning if the number of objects is not as expected.

li_std_auto_ptr was failing during Appveyor testing

An equivalent change was put into the corresponding Java runtime tests a
while back.
This commit is contained in:
William S Fulton 2015-07-03 07:40:08 +01:00
commit c767b33c3f
2 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,7 @@ public class runme
}
int actualCount = Klass.getTotal_count();
if (actualCount != expectedCount)
throw new ApplicationException("Expected count: " + expectedCount + " Actual count: " + actualCount);
Console.Error.WriteLine("Expected count: " + expectedCount + " Actual count: " + actualCount); // Finalizers are not guaranteed to be run and sometimes they just don't
}
int wrapper_count = li_boost_shared_ptr.shared_ptr_wrapper_count();