コード例 #1
0
ファイル: exchange1_cti.cs プロジェクト: CheneyWu/coreclr
    private static int deny = 0;                    // threads denied entry to the mutex

    public static int Main(string[] args)
    {
        InterlockedExchange1 exchange1 = new InterlockedExchange1();
        TestLibrary.TestFramework.BeginTestCase("Testing System.Threading.Interlocked.Exchange(System.Double@,System.Double)...");

        if (exchange1.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
コード例 #2
0
    private static int deny = 0;                    // threads denied entry to the mutex

    public static int Main(string[] args)
    {
        InterlockedExchange1 exchange1 = new InterlockedExchange1();

        TestLibrary.TestFramework.BeginTestCase("Testing System.Threading.Interlocked.Exchange(System.Double@,System.Double)...");

        if (exchange1.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return(100);
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return(0);
        }
    }
コード例 #3
0
    public static int Main()
    {
        InterlockedExchange1 test = new InterlockedExchange1();

        TestLibrary.TestFramework.BeginTestCase("InterlockedExchange1");

        if (test.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return(100);
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return(0);
        }
    }