示例#1
0
    public static int Run()
    {
        if (TestInterfaceCache() == Fail)
        {
            return(Fail);
        }

        if (TestAVInInterfaceCache() == Fail)
        {
            return(Fail);
        }

        if (TestMultipleInterfaces() == Fail)
        {
            return(Fail);
        }

        if (TestArrayInterfaces() == Fail)
        {
            return(Fail);
        }

        if (TestVariantInterfaces() == Fail)
        {
            return(Fail);
        }

        if (TestSpecialArrayInterfaces() == Fail)
        {
            return(Fail);
        }

        if (TestIterfaceCallOptimization() == Fail)
        {
            return(Fail);
        }

        TestDefaultInterfaceMethods.Run();
        TestDefaultInterfaceVariance.Run();
        TestVariantInterfaceOptimizations.Run();
        TestSharedIntefaceMethods.Run();
        TestCovariantReturns.Run();
        TestDynamicInterfaceCastable.Run();
        TestStaticInterfaceMethodsAnalysis.Run();
        TestStaticInterfaceMethods.Run();

        return(Pass);
    }
示例#2
0
    public static int Main()
    {
        int result = Pass;

        if (!TestValueTypeDelegates())
        {
            Console.WriteLine("Failed");
            result = Fail;
        }

        if (!TestVirtualDelegates())
        {
            Console.WriteLine("Failed");
            result = Fail;
        }

        if (!TestInterfaceDelegates())
        {
            Console.WriteLine("Failed");
            result = Fail;
        }

        if (!TestStaticOpenClosedDelegates())
        {
            Console.WriteLine("Failed");
            result = Fail;
        }

        if (!TestMulticastDelegates())
        {
            Console.WriteLine("Failed");
            result = Fail;
        }

        if (!TestDynamicInvoke())
        {
            Console.WriteLine("Failed");
            result = Fail;
        }

#if !CODEGEN_CPP
        TestLinqExpressions.Run();
#endif

        TestDefaultInterfaceMethods.Run();

        return(result);
    }