public static bool testMethod() { DestructorsTestClass4 mc = new DestructorsTestClass4(); mc = null; Microsoft.SPOT.Debug.GC(true); int sleepTime = 5000; int slept = 0; while (intI != 8 && slept < sleepTime) { System.Threading.Thread.Sleep(10); slept += 10; } Log.Comment("Thread has slept for"); Log.Comment(slept.ToString()); if (intI == 8) { return(true); } else { return(false); } }
public static bool testMethod() { DestructorsTestClass4 mc = new DestructorsTestClass4(); mc = null; // nanoFramework.Runtime.Native.GC.Run(true); int sleepTime = 5000; int slept = 0; while (intI != 8 && slept < sleepTime) { System.Threading.Thread.Sleep(10); slept += 10; } OutputHelper.WriteLine("Thread has slept for"); OutputHelper.WriteLine(slept.ToString()); if (intI == 8) { return(true); } else { return(false); } }
public MFTestResults Destructors4_Test() { //Ported from Destructors4.cs Log.Comment(" Section 10.11"); Log.Comment(" Destructors implement the actions required to "); Log.Comment(" destruct the instances of a class."); Log.Comment(""); Log.Comment("Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs"); if (DestructorsTestClass4.testMethod()) { return(MFTestResults.Pass); } return(MFTestResults.Fail); }
public static bool testMethod() { DestructorsTestClass4 mc = new DestructorsTestClass4(); mc = null; Microsoft.SPOT.Debug.GC(true); int sleepTime = 5000; int slept = 0; while (intI != 8 && slept < sleepTime) { System.Threading.Thread.Sleep(10); slept += 10; } Log.Comment("Thread has slept for"); Log.Comment(slept.ToString()); if (intI == 8) { return true; } else { return false; } }