コード例 #1
0
    public static int Main()
    {
        Console.WriteLine("    WaitSubsystemTests.DoubleSetOnEventWithTimedOutWaiterShouldNotStayInWaitersList");
        WaitSubsystemTests.DoubleSetOnEventWithTimedOutWaiterShouldNotStayInWaitersList();

        Console.WriteLine("    WaitSubsystemTests.ManualResetEventTest");
        WaitSubsystemTests.ManualResetEventTest();

        Console.WriteLine("    WaitSubsystemTests.AutoResetEventTest");
        WaitSubsystemTests.AutoResetEventTest();

        Console.WriteLine("    WaitSubsystemTests.SemaphoreTest");
        WaitSubsystemTests.SemaphoreTest();

        Console.WriteLine("    WaitSubsystemTests.MutexTest");
        WaitSubsystemTests.MutexTest();

        Console.WriteLine("    WaitSubsystemTests.WaitDurationTest");
        WaitSubsystemTests.WaitDurationTest();

        // This test takes a long time to run in release and especially in debug builds. Enable for manual testing.
        //Console.WriteLine("    WaitSubsystemTests.MutexMaximumReacquireCountTest");
        //WaitSubsystemTests.MutexMaximumReacquireCountTest();

        return(Pass);
    }
コード例 #2
0
ファイル: Threading.cs プロジェクト: mskvortsov/corert
    public static int Main()
    {
        Console.WriteLine("    WaitSubsystemTests.DoubleSetOnEventWithTimedOutWaiterShouldNotStayInWaitersList");
        WaitSubsystemTests.DoubleSetOnEventWithTimedOutWaiterShouldNotStayInWaitersList();

        Console.WriteLine("    WaitSubsystemTests.ManualResetEventTest");
        WaitSubsystemTests.ManualResetEventTest();

        Console.WriteLine("    WaitSubsystemTests.AutoResetEventTest");
        WaitSubsystemTests.AutoResetEventTest();

        Console.WriteLine("    WaitSubsystemTests.SemaphoreTest");
        WaitSubsystemTests.SemaphoreTest();

        Console.WriteLine("    WaitSubsystemTests.MutexTest");
        WaitSubsystemTests.MutexTest();

        Console.WriteLine("    WaitSubsystemTests.WaitDurationTest");
        WaitSubsystemTests.WaitDurationTest();

        // This test takes a long time to run in release and especially in debug builds. Enable for manual testing.
        //Console.WriteLine("    WaitSubsystemTests.MutexMaximumReacquireCountTest");
        //WaitSubsystemTests.MutexMaximumReacquireCountTest();

        Console.WriteLine("    WaitThreadTests.SignalingRegisteredHandleCallsCalback");
        WaitThreadTests.SignalingRegisteredHandleCallsCalback();

        Console.WriteLine("    WaitThreadTests.TimingOutRegisteredHandleCallsCallback");
        WaitThreadTests.TimingOutRegisteredHandleCallsCallback();

        Console.WriteLine("    WaitThreadTests.UnregisteringBeforeSignalingDoesNotCallCallback");
        WaitThreadTests.UnregisteringBeforeSignalingDoesNotCallCallback();

        Console.WriteLine("    WaitThreadTests.RepeatingWaitFiresUntilUnregistered");
        WaitThreadTests.RepeatingWaitFiresUntilUnregistered();

        Console.WriteLine("    WaitThreadTests.UnregisterEventSignaledWhenUnregistered");
        WaitThreadTests.UnregisterEventSignaledWhenUnregistered();

        Console.WriteLine("    WaitThreadTests.CanRegisterMoreThan64Waits");
        WaitThreadTests.CanRegisterMoreThan64Waits();

        Console.WriteLine("    WaitThreadTests.StateIsPasssedThroughToCallback");
        WaitThreadTests.StateIsPasssedThroughToCallback();


        // This test takes a long time to run. Enable for manual testing.
        // Console.WriteLine("    WaitThreadTests.WaitWithLongerTimeoutThanWaitThreadCanStillTimeout");
        // WaitThreadTests.WaitWithLongerTimeoutThanWaitThreadCanStillTimeout();

        Console.WriteLine("    WaitThreadTests.UnregisterCallbackIsNotCalledAfterCallbackFinishesIfAnotherCallbackOnSameWaitRunning");
        WaitThreadTests.UnregisterCallbackIsNotCalledAfterCallbackFinishesIfAnotherCallbackOnSameWaitRunning();

        Console.WriteLine("    WaitThreadTests.CallingUnregisterOnAutomaticallyUnregisteredHandleReturnsTrue");
        WaitThreadTests.CallingUnregisterOnAutomaticallyUnregisteredHandleReturnsTrue();

        Console.WriteLine("    WaitThreadTests.EventSetAfterUnregisterNotObservedOnWaitThread");
        WaitThreadTests.EventSetAfterUnregisterNotObservedOnWaitThread();

        Console.WriteLine("    WaitThreadTests.BlockingUnregister");
        WaitThreadTests.BlockingUnregister();

        Console.WriteLine("    WaitThreadTests.CanDisposeEventAfterUnblockingUnregister");
        WaitThreadTests.CanDisposeEventAfterUnblockingUnregister();

        Console.WriteLine("    WaitThreadTests.UnregisterEventSignaledWhenUnregisteredEvenIfAutoUnregistered");
        WaitThreadTests.UnregisterEventSignaledWhenUnregisteredEvenIfAutoUnregistered();


        Console.WriteLine("    WaitThreadTests.BlockingUnregisterBlocksEvenIfCallbackExecuting");
        WaitThreadTests.BlockingUnregisterBlocksEvenIfCallbackExecuting();

        return(Pass);
    }