Ejemplo n.º 1
0
        private static int Main()
        {
            Test app = new Test();
            app._op1 = 0x000000007fffffff;
            app._op2 = 0x000000007fffffff;
            if (!app.check(0x3fffffff00000001, false))
                goto fail;
            app._op1 = 0x0000000100000000;
            app._op2 = 0x000000007fffffff;
            if (!app.check(0x7fffffff00000000, false))
                goto fail;
            app._op1 = 0x0000000100000000;
            app._op2 = 0x0000000100000000;
            if (!app.check(0x0000000000000000, true))
                goto fail;
            app._op1 = 0x3fffffffffffffff;
            app._op2 = 0x0000000000000002;
            if (!app.check(0x7ffffffffffffffe, false))
                goto fail;
            app._op1 = unchecked((long)0xffffffffffffffff);
            app._op2 = unchecked((long)0xfffffffffffffffe);
            if (!app.check(2, false))
                goto fail;
            app._op1 = 0x0000000000100000;
            app._op2 = 0x0000001000000000;
            if (!app.check(0x0100000000000000, false))
                goto fail;
            app._op1 = unchecked((long)0xffffffffffffffff);
            app._op2 = unchecked((long)0x8000000000000001);
            if (!app.check(0x7fffffffffffffff, false))
                goto fail;
            app._op1 = unchecked((long)0xfffffffffffffffe);
            app._op2 = unchecked((long)0x8000000000000001);
            if (!app.check(0, true))
                goto fail;
            app._op1 = 2;
            app._op2 = unchecked((long)0x8000000000000001);
            if (!app.check(0, true))
                goto fail;

            Console.WriteLine("Test passed");
            return 100;
        fail:
            Console.WriteLine("Test failed");
            return 1;
        }
Ejemplo n.º 2
0
        private static int Main()
        {
            Test app = new Test();
            app._op1 = 0x00000000ffffffff;
            app._op2 = 0x00000000ffffffff;
            if (!app.check(0xfffffffe00000001, false))
                goto fail;
            app._op1 = 0x0000000100000000;
            app._op2 = 0x00000000ffffffff;
            if (!app.check(0xffffffff00000000, false))
                goto fail;
            app._op1 = 0x0000000100000000;
            app._op2 = 0x0000000100000000;
            if (!app.check(0x0000000000000000, false))
                goto fail;
            app._op1 = 0x7fffffffffffffff;
            app._op2 = 0x0000000000000002;
            if (!app.check(0xfffffffffffffffe, false))
                goto fail;
            app._op1 = 0x8000000000000000;
            app._op2 = 0x0000000000000002;
            if (!app.check(0x0000000000000000, false))
                goto fail;
            app._op1 = 0x0000000000100000;
            app._op2 = 0x0000001000000000;
            if (!app.check(0x0100000000000000, false))
                goto fail;

            Console.WriteLine("Test passed");
            return 100;
        fail:
            Console.WriteLine("Test failed");
            return 1;
        }
Ejemplo n.º 3
0
        private static int Main()
        {
            Test app = new Test();

            app._op1 = 0x00000000ffffffff;
            app._op2 = 0x00000000ffffffff;
            if (!app.check(0xfffffffe00000001, false))
            {
                goto fail;
            }
            app._op1 = 0x0000000100000000;
            app._op2 = 0x00000000ffffffff;
            if (!app.check(0xffffffff00000000, false))
            {
                goto fail;
            }
            app._op1 = 0x0000000100000000;
            app._op2 = 0x0000000100000000;
            if (!app.check(0x0000000000000000, true))
            {
                goto fail;
            }
            app._op1 = 0x7fffffffffffffff;
            app._op2 = 0x0000000000000002;
            if (!app.check(0xfffffffffffffffe, false))
            {
                goto fail;
            }
            app._op1 = 0x8000000000000000;
            app._op2 = 0x0000000000000002;
            if (!app.check(0x0000000000000000, true))
            {
                goto fail;
            }
            app._op1 = 0x0000000000100000;
            app._op2 = 0x0000001000000000;
            if (!app.check(0x0100000000000000, false))
            {
                goto fail;
            }

            Console.WriteLine("Test passed");
            return(100);

fail:
            Console.WriteLine("Test failed");
            return(1);
        }
Ejemplo n.º 4
0
        private static int Main()
        {
            Test app = new Test();

            app._op1 = 0x000000007fffffff;
            app._op2 = 0x000000007fffffff;
            if (!app.check(0x3fffffff00000001, false))
            {
                goto fail;
            }
            app._op1 = 0x0000000100000000;
            app._op2 = 0x000000007fffffff;
            if (!app.check(0x7fffffff00000000, false))
            {
                goto fail;
            }
            app._op1 = 0x0000000100000000;
            app._op2 = 0x0000000100000000;
            if (!app.check(0x0000000000000000, false))
            {
                goto fail;
            }
            app._op1 = 0x3fffffffffffffff;
            app._op2 = 0x0000000000000002;
            if (!app.check(0x7ffffffffffffffe, false))
            {
                goto fail;
            }
            app._op1 = unchecked ((long)0xffffffffffffffff);
            app._op2 = unchecked ((long)0xfffffffffffffffe);
            if (!app.check(2, false))
            {
                goto fail;
            }
            app._op1 = 0x0000000000100000;
            app._op2 = 0x0000001000000000;
            if (!app.check(0x0100000000000000, false))
            {
                goto fail;
            }
            app._op1 = unchecked ((long)0xffffffffffffffff);
            app._op2 = unchecked ((long)0x8000000000000001);
            if (!app.check(0x7fffffffffffffff, false))
            {
                goto fail;
            }
            app._op1 = unchecked ((long)0xfffffffffffffffe);
            app._op2 = unchecked ((long)0x8000000000000001);
            if (!app.check(unchecked ((long)0xfffffffffffffffe), false))
            {
                goto fail;
            }
            app._op1 = 2;
            app._op2 = unchecked ((long)0x8000000000000001);
            if (!app.check(2, false))
            {
                goto fail;
            }

            Console.WriteLine("Test passed");
            return(100);

fail:
            Console.WriteLine("Test failed");
            return(1);
        }