Exemplo n.º 1
0
 static int Main()
 {
     return(100 +
            (Test1.Run() == 0 ? 0 : 1) +
            (Test2.Run() == 1 ? 0 : 2) +
            (Test3.Run() == 0 ? 0 : 4) +
            (Test4.Run() == 0 ? 0 : 8));
 }
Exemplo n.º 2
0
    static int Main()
    {
        bool passed = true;

        ulong result1         = Test1.Run();
        ulong expectedResult1 = 64537;

        if (result1 != expectedResult1)
        {
            passed = false;
            Console.WriteLine(String.Format("Failed Test1: expected = {0}, actual = {1}", expectedResult1, result1));
        }

        S0  vr45            = new S0(0, 0, 0);
        int result2         = Test2.Run(vr45);
        int expectedResult2 = 65487;

        if (result2 != expectedResult2)
        {
            passed = false;
            Console.WriteLine(String.Format("Failed Test2: expected = {0}, actual = {1}", expectedResult2, result2));
        }

        int result3         = Test3.Run();
        int expectedResult3 = 65535;

        if (result3 != expectedResult3)
        {
            passed = false;
            Console.WriteLine(String.Format("Failed Test3: expected = {0}, actual = {1}", expectedResult3, result3));
        }

        uint result4         = Test4.Run();
        uint expectedResult4 = 32779;

        if (result4 != expectedResult4)
        {
            passed = false;
            Console.WriteLine(String.Format("Failed Test4: expected = {0}, actual = {1}", expectedResult4, result4));
        }

        if (passed)
        {
            Console.WriteLine("PASSED");
            return(100);
        }
        else
        {
            Console.WriteLine("FAILED");
            return(-1);
        }
    }