public static bool testMethod() { DestructorsTestClass3 mc = new DestructorsTestClass3(); mc = null; Microsoft.SPOT.Debug.GC(true); int sleepTime = 5000; int slept = 0; while (intI != 2 && slept < sleepTime) { System.Threading.Thread.Sleep(10); slept += 10; } Log.Comment("Thread has slept for"); Log.Comment(slept.ToString()); if (intI == 2) { return(true); } else { return(false); } }
public MFTestResults Destructors3_Test() { //Ported from Destructors3.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 (DestructorsTestClass3.testMethod()) { return(MFTestResults.Pass); } return(MFTestResults.Fail); }
public static bool testMethod() { DestructorsTestClass3 mc = new DestructorsTestClass3(); mc = null; Microsoft.SPOT.Debug.GC(true); int sleepTime = 5000; int slept = 0; while (intI != 2 && slept < sleepTime) { System.Threading.Thread.Sleep(10); slept += 10; } Log.Comment("Thread has slept for"); Log.Comment(slept.ToString()); if (intI == 2) { return true; } else { return false; } }