Beispiel #1
0
        static void Main()
        {
            // for constructors, type parameter needs to be explicitly specified
            var instanceWithInt = new GenericClass<int>(7);
            instanceWithInt.SomeMethod();

            var instanceWithString = new GenericClass<string>("doișpe");
            instanceWithString.SomeMethod();

            // Factory method uses generic type inference:
            // no need to specify type parameters
            var instanceWithFloat = GenericClass.Create(1.23);
            instanceWithFloat.SomeMethod();

            // call MoreGenericMethod with various other types
            instanceWithInt.MoreGenericMethod(333, 1);
            instanceWithInt.MoreGenericMethod(333, "hopa");
            instanceWithInt.MoreGenericMethod(333, 0.001);

            // non-generic classes can have generic methods
            var nonGenericInstance = new NonGenericClass();
            nonGenericInstance.GenericMethod(3);
            nonGenericInstance.GenericMethod(Math.PI);
            nonGenericInstance.GenericMethod("π");

            ConstraintExamples.InterfaceConstraint(new MemoryStream());
        }
 public void setup()
 {
     item = new object();
     dependency = MockRepository.GenerateStub<InterfaceWithAMethodThatHasANameThatShouldNotBeRecognizedAsAnEvent>();
     system_under_test = new GenericClass(dependency);
     system_under_test.do_something(item);
 }
 public when_stubbing_a_call_to_a_method_that_matches_the_naming_prefix_for_an_event_but_is_not_an_event()
 {
     item = new object();
     dependency = MockRepository.GenerateStub<InterfaceWithAMethodThatHasANameThatShouldNotBeRecognizedAsAnEvent>();
     system_under_test = new GenericClass(dependency);
     system_under_test.do_something(item);
 }
Beispiel #4
0
 public virtual IReflectClass CreateClass(string name, IReflectClass superClass, int
     fieldCount)
 {
     var nativeClass = _delegate.ForName(name);
     var clazz = new GenericClass(_reflector, nativeClass, name, (GenericClass
         ) superClass);
     clazz.SetDeclaredFieldCount(fieldCount);
     return clazz;
 }
Beispiel #5
0
        public void TestGenericClass()
        {
            var test = new GenericClass();
            var prioritySet = false;

            // GetDefault
            Assert.AreEqual(default(int), test.GetDefault<int>());
            Assert.AreEqual(default(string), test.GetDefault<string>());
            Assert.AreEqual(default(Guid), test.GetDefault<Guid>());

            // Equals
            Assert.IsTrue(test.Equals(123, 123));
            Assert.IsFalse(test.Equals("Some", null));

            // GetVersion
            Assert.AreEqual("DoSomething wasn't called yet", test.GetVersion());

            // DoSomething
            test.DoSomething(123, 'x', "y");
            Assert.AreEqual("DoSomething: A = 123, B = x, C = y", test.GetVersion());

            // Compute
            var dt = test.Compute<Guid, DateTime>(Guid.Empty, 123, "123");
            Assert.AreEqual(default(DateTime), dt);

            // CreateGuid
            var guid = test.CreateGuid(dt, 12345);
            Assert.AreEqual("00003039-0001-0001-0000-000000000000", guid.ToString());

            // LastDate
            Assert.AreEqual(dt, test.LastDate);
            test.LastDate = dt = DateTime.Now;
            Assert.AreEqual(dt, test.LastDate);

            // Name
            Assert.AreEqual("GenericClass, priority = 123", test.Name);

            // add OnPrioritySet
            EventHandler<EventArgs> handler = (s, a) => prioritySet = true;
            test.OnPrioritySet += handler;
            Assert.IsFalse(prioritySet);

            // Priority
            test.Priority = 321;
            Assert.IsTrue(prioritySet);
            Assert.AreEqual("GenericClass, priority = 321", test.Name);

            // remove OnPrioritySet
            prioritySet = false;
            test.OnPrioritySet -= handler;
            test.Priority = 111;
            Assert.IsFalse(prioritySet);
        }
Beispiel #6
0
 private bool Producer(Nulunk nulunk, string name)
 {
     var r = new Random();
     for (var x = 0; x < 1000; x++)
     {
         var uPerson = new GenericClass() { Name = name, Random = r.Next() };
         if (x % 2 == 0)
             nulunk.Store(uPerson);
         else
         {
             nulunk.Store(JsonConvert.SerializeObject(uPerson));
         }
     }
     return true;
 }
        private static void Main()
        {
            GenericClass<int> genericClass = new GenericClass<int>(4);

            Console.WriteLine("Current list elements: {0}",genericClass);

            for (int i = 0; i < 4; i++)
            {
                genericClass.Add(i);
            }

            Console.WriteLine("List: {0}", genericClass);

            var findNumber = 3;
            var index = genericClass.FindFirstOrDefault(findNumber);
            Console.WriteLine("{0} is at {1} index", findNumber, index);

            var removeElement = 2;
            genericClass.RemoveElementByIndex(removeElement);
            Console.WriteLine("Remove element {0}", removeElement);
            Console.WriteLine("{0} -> withoud {1}",genericClass, removeElement);
            Console.WriteLine("Current size: {0}", genericClass.Size());

            var element = 9;
            var position = 3;
            genericClass.InsertElementAtIndex(position, element);
            Console.WriteLine("Insert {0} at position {1}", element, position);
            Console.WriteLine("Current size: {0}", genericClass.Size());
            Console.WriteLine("List: {0}", genericClass);

            Console.WriteLine("Max {0}", genericClass.Max());
            Console.WriteLine("Mix {0}", genericClass.Min());

            genericClass.Clear();
            Console.WriteLine("List cleared: {0}", genericClass);
        }
    public static void Main()
    {
        GenericClass<int> arrayElements = new GenericClass<int>(9);
        arrayElements.AddElement(5);
        arrayElements.AddElement(6);
        arrayElements.AddElement(7);
        arrayElements.AddElement(8);
        arrayElements.AddElement(9);
        arrayElements.AddElement(10);

        arrayElements.RemoveElementAtPosition(2);

        arrayElements.AddElementAtPosition(100, 2);
        arrayElements.AddElementAtPosition(101, 2);
        arrayElements.AddElementAtPosition(102, 2);
        arrayElements.AddElementAtPosition(103, 2);

        
        arrayElements.AddElementAtPosition(-104, 2);
        Console.WriteLine(arrayElements);

        Console.WriteLine(arrayElements.Min());
        Console.WriteLine(arrayElements.Max());
    }
        public void Given_MaxIntegerNumber_1st_Position_ShouldReturnSame()
        {
            int max = GenericClass <int> .maximum(8, 5, 6);

            Assert.AreEqual(8, max);
        }
        public void Given_MaxFloatNumber_3rd_Position_ShouldReturnSame()
        {
            float max = GenericClass <float> .maximum(5.5f, 6.5f, 8.5f);

            Assert.AreEqual(8.5f, max);
        }
Beispiel #11
0
    public static int test_0_constrained_vtype()
    {
        GenericClass <int> t = new GenericClass <int> ();

        return(t.toString(1234) == "1234" ? 0 : 1);
    }
Beispiel #12
0
        public static IEnumerable <object[]> GetNativeVariantForObject_RoundtrippingPrimitives_TestData()
        {
            yield return(new object[] { null, VarEnum.VT_EMPTY, IntPtr.Zero });

            yield return(new object[] { (sbyte)10, VarEnum.VT_I1, (IntPtr)10 });

            yield return(new object[] { (short)10, VarEnum.VT_I2, (IntPtr)10 });

            yield return(new object[] { 10, VarEnum.VT_I4, (IntPtr)10 });

            yield return(new object[] { (long)10, VarEnum.VT_I8, (IntPtr)10 });

            yield return(new object[] { (byte)10, VarEnum.VT_UI1, (IntPtr)10 });

            yield return(new object[] { (ushort)10, VarEnum.VT_UI2, (IntPtr)10 });

            yield return(new object[] { (uint)10, VarEnum.VT_UI4, (IntPtr)10 });

            yield return(new object[] { (ulong)10, VarEnum.VT_UI8, (IntPtr)10 });

            yield return(new object[] { true, VarEnum.VT_BOOL, (IntPtr)ushort.MaxValue });

            yield return(new object[] { false, VarEnum.VT_BOOL, IntPtr.Zero });

            yield return(new object[] { 10m, VarEnum.VT_DECIMAL, (IntPtr)10 });

            // Well known types.
            DateTime dateTime = new DateTime(1899, 12, 30).AddDays(20);

            yield return(new object[] { dateTime, VarEnum.VT_DATE, (IntPtr)(-1) });

            yield return(new object[] { DBNull.Value, VarEnum.VT_NULL, IntPtr.Zero });

            yield return(new object[] { DBNull.Value, VarEnum.VT_NULL, IntPtr.Zero });

            // Arrays.
            yield return(new object[] { new sbyte[] { 10, 11, 12 }, (VarEnum)8208, (IntPtr)(-1) });

            yield return(new object[] { new short[] { 10, 11, 12 }, (VarEnum)8194, (IntPtr)(-1) });

            yield return(new object[] { new int[] { 10, 11, 12 }, (VarEnum)8195, (IntPtr)(-1) });

            yield return(new object[] { new long[] { 10, 11, 12 }, (VarEnum)8212, (IntPtr)(-1) });

            yield return(new object[] { new byte[] { 10, 11, 12 }, (VarEnum)8209, (IntPtr)(-1) });

            yield return(new object[] { new ushort[] { 10, 11, 12 }, (VarEnum)8210, (IntPtr)(-1) });

            yield return(new object[] { new uint[] { 10, 11, 12 }, (VarEnum)8211, (IntPtr)(-1) });

            yield return(new object[] { new ulong[] { 10, 11, 12 }, (VarEnum)8213, (IntPtr)(-1) });

            yield return(new object[] { new bool[] { true, false }, (VarEnum)8203, (IntPtr)(-1) });

            yield return(new object[] { new float[] { 10, 11, 12 }, (VarEnum)8196, (IntPtr)(-1) });

            yield return(new object[] { new double[] { 10, 11, 12 }, (VarEnum)8197, (IntPtr)(-1) });

            yield return(new object[] { new decimal[] { 10m, 11m, 12m }, (VarEnum)8206, (IntPtr)(-1) });

            yield return(new object[] { new object[] { 10, 11, 12 }, (VarEnum)8204, (IntPtr)(-1) });

            yield return(new object[] { new string[] { "a", "b", "c" }, (VarEnum)8200, (IntPtr)(-1) });

            yield return(new object[] { new TimeSpan[] { new TimeSpan(10) }, (VarEnum)8228, (IntPtr)(-1) });

            yield return(new object[] { new int[, ] {
                                            { 10 }, { 11 }, { 12 }
                                        }, (VarEnum)8195, (IntPtr)(-1) });

            // Objects.
            var nonGenericClass = new NonGenericClass();

            yield return(new object[] { nonGenericClass, VarEnum.VT_DISPATCH, (IntPtr)(-1) });

            var valueType = new StructWithValue {
                Value = 10
            };

            yield return(new object[] { valueType, VarEnum.VT_RECORD, (IntPtr)(-1) });

            var genericClass = new GenericClass <string>();

            yield return(new object[] { new object[] { nonGenericClass, genericClass, null }, (VarEnum)8204, (IntPtr)(-1) });

            yield return(new object[] { new object[] { valueType, null }, (VarEnum)8204, (IntPtr)(-1) });

            // Delegate.
            MethodInfo method = typeof(GetNativeVariantForObjectTests).GetMethod(nameof(NonGenericMethod));
            Delegate   d      = method.CreateDelegate(typeof(NonGenericDelegate));

            yield return(new object[] { d, VarEnum.VT_DISPATCH, (IntPtr)(-1) });
        }
Beispiel #13
0
 public void GTest(GenericClass <float> arg)
 {
 }
Beispiel #14
0
 public GenericClass(GenericClass <T> g = null, A a = null)
 {
 }
 public ClassDependingOnGenericClass(GenericClass<string> genericClass)
 {
     this.genericClass = genericClass;
 }
Beispiel #16
0
    // Use this for initialization
    void Start()
    {
        LuaEnv       luaenv       = new LuaEnv();
        HotfixCalc   calc         = new HotfixCalc();
        NoHotfixCalc ordinaryCalc = new NoHotfixCalc();

        int CALL_TIME = 100 * 1000 * 1000;
        var start     = System.DateTime.Now;

        for (int i = 0; i < CALL_TIME; i++)
        {
            calc.Add(2, 1);
        }
        var d1 = (System.DateTime.Now - start).TotalMilliseconds;

        Debug.Log("Hotfix using:" + d1);

        start = System.DateTime.Now;
        for (int i = 0; i < CALL_TIME; i++)
        {
            ordinaryCalc.Add(2, 1);
        }
        var d2 = (System.DateTime.Now - start).TotalMilliseconds;

        Debug.Log("No Hotfix using:" + d2);

        Debug.Log("drop:" + ((d1 - d2) / d1));

        Debug.Log("Before Fix: 2 + 1 = " + calc.Add(2, 1));
        Debug.Log("Before Fix: Vector3(2, 3, 4) + Vector3(1, 2, 3) = " + calc.Add(new Vector3(2, 3, 4), new Vector3(1, 2, 3)));
        luaenv.DoString(@"
            xlua.hotfix(CS.HotfixCalc, 'Add', function(self, a, b)
                return a + b
            end)
        ");
        Debug.Log("After Fix: 2 + 1 = " + calc.Add(2, 1));
        Debug.Log("After Fix: Vector3(2, 3, 4) + Vector3(1, 2, 3) = " + calc.Add(new Vector3(2, 3, 4), new Vector3(1, 2, 3)));

        double num;
        string str = "hehe";
        int    ret = calc.TestOut(100, out num, ref str);

        Debug.Log("ret = " + ret + ", num = " + num + ", str = " + str);

        luaenv.DoString(@"
            xlua.hotfix(CS.HotfixCalc, 'TestOut', function(self, a, c, go)
                    print('TestOut', self, a, c, go)
                    if go then error('test error') end
                    return a + 10, a + 20, 'right version'
                end)
        ");
        str = "hehe";
        ret = calc.TestOut(100, out num, ref str);
        Debug.Log("ret = " + ret + ", num = " + num + ", str = " + str);

        luaenv.DoString(@"
            xlua.hotfix(CS.HotfixCalc, {
                 Test1 = function(self)
                    print('Test1', self)
                    return 1
                 end;
                 Test2 = function(self, a, b)
                     print('Test1', self, a, b)
                     return a + 10, 1024, b
                 end;
                 Test3 = function(a)
                    print(a)
                    return 10
                 end;
                 Test4 = function(a)
                    print(a)
                 end;
                 Test5 = function(self, a, ...)
                    print('Test4', self, a, ...)
                 end
            })
        ");

        int    r1 = calc.Test1 <int>();
        double r2 = calc.Test1 <double>();

        Debug.Log("r1:" + r1 + ",r2:" + r2);

        string ss = "heihei";
        int    r3 = calc.Test2(r1, out r2, ref ss);

        Debug.Log("r1:" + r1 + ",r2:" + r2 + ",r3:" + r3 + ",ss:" + ss);

        r3 = HotfixCalc.Test3("test3");
        r3 = HotfixCalc.Test3(2);
        r3 = HotfixCalc.Test3(this);
        Debug.Log("r3:" + r3);
        HotfixCalc.Test4(this);
        HotfixCalc.Test4(2);
        calc.Test5(10, "a", "b", "c");
        calc.Test5(10, 1, 3, 5);

        Debug.Log("----------------------before------------------------");
        TestStateful();
        System.GC.Collect();
        System.GC.WaitForPendingFinalizers();
        luaenv.DoString(@"
            local util = require 'xlua.util'
            xlua.hotfix(CS.StatefullTest, {
                ['.ctor'] = function(csobj)
                    util.state(csobj, {evt = {}, start = 0, prop = 0})
                end;
                set_AProp = function(self, v)
                    print('set_AProp', v)
                    self.prop = v
                end;
                get_AProp = function(self)
                    return self.prop
                end;
                get_Item = function(self, k)
                    print('get_Item', k)
                    return 1024
                end;
                set_Item = function(self, k, v)
                    print('set_Item', k, v)
                end;
                add_AEvent = function(self, cb)
                    print('add_AEvent', cb)
                    table.insert(self.evt, cb)
                end;
                remove_AEvent = function(self, cb)
                   print('remove_AEvent', cb)
                   for i, v in ipairs(self.evt) do
                       if v == cb then
                           table.remove(self.evt, i)
                           break
                       end
                   end
                end;
                Start = function(self)
                    print('Start')
                    for _, cb in ipairs(self.evt) do
                        cb(self.start, 2)
                    end
                    self.start = self.start + 1
                end;
                StaticFunc = function(a, b, c)
                   print(a, b, c)
                end;
                GenericTest = function(self, a)
                   print(self, a)
                end;
                Finalize = function(self)
                   print('Finalize', self)
                end
           })
        ");
        Debug.Log("----------------------after------------------------");
        TestStateful();
        luaenv.FullGc();
        System.GC.Collect();
        System.GC.WaitForPendingFinalizers();

        var genericObj = new GenericClass <double>(1.1);

        genericObj.Func1();
        Debug.Log(genericObj.Func2());
        luaenv.DoString(@"
            xlua.hotfix(CS.GenericClass(CS.System.Double), {
                ['.ctor'] = function(obj, a)
                    print('GenericClass<double>', obj, a)
                end;
                Func1 = function(obj)
                    print('GenericClass<double>.Func1', obj)
                end;
                Func2 = function(obj)
                    print('GenericClass<double>.Func2', obj)
                    return 1314
                end
            })
        ");
        genericObj = new GenericClass <double>(1.1);
        genericObj.Func1();
        Debug.Log(genericObj.Func2());

        InnerTypeTest itt = new InnerTypeTest();

        itt.Foo();
        luaenv.DoString(@"
            xlua.hotfix(CS.InnerTypeTest, 'Bar', function(obj)
                    print('lua Bar', obj)
                    return {x = 10, y = 20}
                end)
        ");
        itt.Foo();

        StructTest st = new StructTest(gameObject);

        Debug.Log("go=" + st.GetGo(123, "john"));
        luaenv.DoString(@"
            xlua.hotfix(CS.StructTest, 'GetGo', function(self, a, b)
                    print('GetGo', self, a, b)
                    return nil
                end)
        ");
        Debug.Log("go=" + st.GetGo(123, "john"));

        GenericStruct <int> gs = new GenericStruct <int>(1);

        Debug.Log("gs.GetA()=" + gs.GetA(123));
        luaenv.DoString(@"
            xlua.hotfix(CS.GenericStruct(CS.System.Int32), 'GetA', function(self, a)
                    print('GetA',self, a)
                    return 789
                end)
        ");
        Debug.Log("gs.GetA()=" + gs.GetA(123));

        try
        {
            calc.TestOut(100, out num, ref str, gameObject);
        }
        catch (LuaException e)
        {
            Debug.Log("throw in lua an catch in c# ok, e.Message:" + e.Message);
        }


        BaseTestBase <InnerTypeTest> bt = new BaseTest();

        bt.Foo(1);
        Debug.Log(bt);

        luaenv.DoString(@"
            xlua.hotfix(CS.BaseTest, 'Foo', function(self, p)
                    print('BaseTest', p)
                end)
            xlua.hotfix(CS.BaseTest, 'ToString', function(self)
                    return '>>>' .. base(self):ToString()
                end)
        ");
        bt.Foo(2);
        Debug.Log(bt);
    }
Beispiel #17
0
 protected MyClassBase()
 {
     MyGenericObject = new GenericClass <T>((T)this);
 }
Beispiel #18
0
 public void InvokeGenericMethod()
 {
     ExpressionTrees.ToCode(ExpressionTrees.X(), () => GenericClass <int> .GenericMethod <double>());
 }
Beispiel #19
0
        /// <summary>
        /// 泛型方法:为了一个方法满足不同的类型需求
        /// 例如:一个方法完成多个实体的查询
        ///     一个方法完成不同的类型的数据展示
        ///     任意一个实体,转换成 Json 字符串
        ///
        /// 多类型参数 不能是关键字 不要与类名称重复
        /// </summary>
        /// <param name="tParameter"></param>
        /// <typeparam name="T"></typeparam>
        public T Show <T, S, Model>(S sParameter)
        {
            GenericClass <int> genericClass = new GenericClass <int>();

            throw new System.Exception();
        }
Beispiel #20
0
 public void M(out GenericClass <T> self)
 {
     self = this;
 }
Beispiel #21
0
        public static void NullCull_AbstractType_Initialized()
        {
            var gt = new GenericClass <AbstractType>();

            Assert.Throws <NotSupportedException>(() => gt.NullCull());
        }
Beispiel #22
0
        public void Given_MaxIntegerVariableumber_3rd_Position_ShouldReturnSame()
        {
            int max = GenericClass <int> .maximum(12, 35, 45, 13, 38);

            Assert.AreEqual(45, max);
        }
Beispiel #23
0
    public static int test_0_constrained_vtype_box()
    {
        GenericClass <TestStruct> t = new GenericClass <TestStruct> ();

        return(t.toString(new TestStruct()) == "Tests+TestStruct" ? 0 : 1);
    }
Beispiel #24
0
 public void testMethodGenerics()
 {
     var doc = new GenericClass<Document>();
     var docList = doc.Data;
 }
Beispiel #25
0
 // Use this for initialization
 void Start()
 {
     _hitSparks     = new GenericClass <HitSparks>(ObjectFactory.PrefabType.HitSparks, 10);
     _mmTrackers    = new GenericClass <MMTracker>(ObjectFactory.PrefabType.MM_Tracker, 10);
     _explosionObjs = new GenericClass <ExplosionObject>(ObjectFactory.PrefabType.Explosion, 10);
 }
Beispiel #26
0
    public static void GenericClassVirtualMethod()
    {
        GenericClass<int>.classParameterType = typeof(int);
        GenericClass<string>.classParameterType = typeof(string);
        GenericClass<int[]>.classParameterType = typeof(int[]);
        GenericClass<string[]>.classParameterType = typeof(string[]);

        GenericClass<int> GenericClassInt = new GenericClass<int>();
        GenericClass<string> GenericClassString = new GenericClass<string>();
        GenericClass<int[]> GenericClassIntArray = new GenericClass<int[]>();
        GenericClass<string[]> GenericClassStringArray = new GenericClass<string[]>();

        GenericClassInheritsFromGenericClass<int> GenericClassInheritsFromGenericClassInt = new GenericClassInheritsFromGenericClass<int>();
        GenericClassInheritsFromGenericClass<string> GenericClassInheritsFromGenericClassString = new GenericClassInheritsFromGenericClass<string>();
        GenericClassInheritsFromGenericClass<int[]> GenericClassInheritsFromGenericClassIntArray = new GenericClassInheritsFromGenericClass<int[]>();
        GenericClassInheritsFromGenericClass<string[]> GenericClassInheritsFromGenericClassStringArray = new GenericClassInheritsFromGenericClass<string[]>();

        GenericClass<int> GenericClassInheritsFromGenericClassCastAsGenericClassInt = new GenericClassInheritsFromGenericClass<int>();
        GenericClass<string> GenericClassInheritsFromGenericClassCastAsGenericClassString = new GenericClassInheritsFromGenericClass<string>();
        GenericClass<int[]> GenericClassInheritsFromGenericClassCastAsGenericClassIntArray = new GenericClassInheritsFromGenericClass<int[]>();
        GenericClass<string[]> GenericClassInheritsFromGenericClassCastAsGenericClassStringArray = new GenericClassInheritsFromGenericClass<string[]>();

        if (GenericClassInt.VirtualGenericMethod<int>(1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualGenericMethod<int>(1, typeof(int, true)) to be 1, but found '" + GenericClassInt.VirtualGenericMethod<int>(1, typeof(int), true) + "'");
        }

        if (GenericClassInt.VirtualGenericMethod<string>("aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualGenericMethod<string>(\"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassInt.VirtualGenericMethod<string>("aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInt.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInt.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInt.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInt.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassString.VirtualGenericMethod<int>(1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualGenericMethod<int>(1, typeof(int, true)) to be 1, but found '" + GenericClassString.VirtualGenericMethod<int>(1, typeof(int), true) + "'");
        }

        if (GenericClassString.VirtualGenericMethod<string>("aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualGenericMethod<string>(\"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassString.VirtualGenericMethod<string>("aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassString.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassString.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassString.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassString.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassIntArray.VirtualGenericMethod<int>(1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualGenericMethod<int>(1, typeof(int, true)) to be 1, but found '" + GenericClassIntArray.VirtualGenericMethod<int>(1, typeof(int), true) + "'");
        }

        if (GenericClassIntArray.VirtualGenericMethod<string>("aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualGenericMethod<string>(\"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassIntArray.VirtualGenericMethod<string>("aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassIntArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassIntArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassIntArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassIntArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassStringArray.VirtualGenericMethod<int>(1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualGenericMethod<int>(1, typeof(int, true)) to be 1, but found '" + GenericClassStringArray.VirtualGenericMethod<int>(1, typeof(int), true) + "'");
        }

        if (GenericClassStringArray.VirtualGenericMethod<string>("aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualGenericMethod<string>(\"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassStringArray.VirtualGenericMethod<string>("aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassStringArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassStringArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassStringArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassStringArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassInt.VirtualNonGenericMethodInt(1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualNonGenericMethodInt(1, typeof(int, true)) to be 1, but found '" + GenericClassInt.VirtualNonGenericMethodInt(1, typeof(int), true) + "'");
        }

        if (GenericClassInt.VirtualNonGenericMethodString("aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualNonGenericMethodString(\"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassInt.VirtualNonGenericMethodString("aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInt.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInt.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInt.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInt.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassString.VirtualNonGenericMethodInt(1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualNonGenericMethodInt(1, typeof(int, true)) to be 1, but found '" + GenericClassString.VirtualNonGenericMethodInt(1, typeof(int), true) + "'");
        }

        if (GenericClassString.VirtualNonGenericMethodString("aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualNonGenericMethodString(\"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassString.VirtualNonGenericMethodString("aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassString.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassString.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassString.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassString.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassIntArray.VirtualNonGenericMethodInt(1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualNonGenericMethodInt(1, typeof(int, true)) to be 1, but found '" + GenericClassIntArray.VirtualNonGenericMethodInt(1, typeof(int), true) + "'");
        }

        if (GenericClassIntArray.VirtualNonGenericMethodString("aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualNonGenericMethodString(\"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassIntArray.VirtualNonGenericMethodString("aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassIntArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassIntArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassIntArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassIntArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassStringArray.VirtualNonGenericMethodInt(1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualNonGenericMethodInt(1, typeof(int, true)) to be 1, but found '" + GenericClassStringArray.VirtualNonGenericMethodInt(1, typeof(int), true) + "'");
        }

        if (GenericClassStringArray.VirtualNonGenericMethodString("aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualNonGenericMethodString(\"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassStringArray.VirtualNonGenericMethodString("aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassStringArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassStringArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassStringArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassStringArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassInt.VirtualGenericMethodUsesClassTypeParam<int>(27, 1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualGenericMethodUsesClassTypeParam<int>(27, 1, typeof(int, true)) to be 1, but found '" + GenericClassInt.VirtualGenericMethodUsesClassTypeParam<int>(27, 1, typeof(int), true) + "'");
        }

        if (GenericClassInt.VirtualGenericMethodUsesClassTypeParam<string>(27, "aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualGenericMethodUsesClassTypeParam<string>(27, \"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassInt.VirtualGenericMethodUsesClassTypeParam<string>(27, "aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInt.VirtualGenericMethodUsesClassTypeParam<int[]>(27, new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualGenericMethodUsesClassTypeParam<int[]>(27, new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInt.VirtualGenericMethodUsesClassTypeParam<int[]>(27, new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInt.VirtualGenericMethodUsesClassTypeParam<string[]>(27, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualGenericMethodUsesClassTypeParam<string[]>(27, new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInt.VirtualGenericMethodUsesClassTypeParam<string[]>(27, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassString.VirtualGenericMethodUsesClassTypeParam<int>("", 1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualGenericMethodUsesClassTypeParam<int>(\"\", 1, typeof(int, true)) to be 1, but found '" + GenericClassString.VirtualGenericMethodUsesClassTypeParam<int>("", 1, typeof(int), true) + "'");
        }

        if (GenericClassString.VirtualGenericMethodUsesClassTypeParam<string>("", "aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualGenericMethodUsesClassTypeParam<string>(\"\", \"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassString.VirtualGenericMethodUsesClassTypeParam<string>("", "aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassString.VirtualGenericMethodUsesClassTypeParam<int[]>("", new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualGenericMethodUsesClassTypeParam<int[]>(\"\", new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassString.VirtualGenericMethodUsesClassTypeParam<int[]>("", new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassString.VirtualGenericMethodUsesClassTypeParam<string[]>("", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualGenericMethodUsesClassTypeParam<string[]>(\"\", new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassString.VirtualGenericMethodUsesClassTypeParam<string[]>("", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int>(new int[0], 1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int>(new int[0], 1, typeof(int, true)) to be 1, but found '" + GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int>(new int[0], 1, typeof(int), true) + "'");
        }

        if (GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string>(new int[0], "aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string>(new int[0], \"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string>(new int[0], "aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new int[0], new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new int[0], new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new int[0], new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new int[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new int[0], new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new int[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int>(new string[0], 1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int>(new string[0], 1, typeof(int, true)) to be 1, but found '" + GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int>(new string[0], 1, typeof(int), true) + "'");
        }

        if (GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string>(new string[0], "aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string>(new string[0], \"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string>(new string[0], "aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new string[0], new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new string[0], new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new string[0], new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new string[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new string[0], new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new string[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassInt.VirtualNonGenericMethodIntUsesClassTypeParam(Int32.MaxValue, 1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualNonGenericMethodIntUsesClassTypeParam(Int32.MaxValue, 1, typeof(int, true)) to be 1, but found '" + GenericClassInt.VirtualNonGenericMethodIntUsesClassTypeParam(Int32.MaxValue, 1, typeof(int), true) + "'");
        }

        if (GenericClassInt.VirtualNonGenericMethodStringUsesClassTypeParam(Int32.MaxValue, "aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualNonGenericMethodString(Int32.MaxValue, \"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassInt.VirtualNonGenericMethodStringUsesClassTypeParam(Int32.MaxValue, "aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInt.VirtualNonGenericMethodIntArrayUsesClassTypeParam(Int32.MaxValue, new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualNonGenericMethodIntArrayUsesClassTypeParam(Int32.MaxValue, new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInt.VirtualNonGenericMethodIntArrayUsesClassTypeParam(Int32.MaxValue, new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInt.VirtualNonGenericMethodStringArrayUsesClassTypeParam(Int32.MaxValue, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.VirtualNonGenericMethodStringArrayUsesClassTypeParam(Int32.MaxValue, new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInt.VirtualNonGenericMethodStringArrayUsesClassTypeParam(Int32.MaxValue, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassString.VirtualNonGenericMethodIntUsesClassTypeParam("wxyzabcdefgh", 1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualNonGenericMethodIntUsesClassTypeParam(\"wxyzabcdefgh\", 1, typeof(int, true)) to be 1, but found '" + GenericClassString.VirtualNonGenericMethodIntUsesClassTypeParam("wxyzabcdefgh", 1, typeof(int), true) + "'");
        }

        if (GenericClassString.VirtualNonGenericMethodStringUsesClassTypeParam("wxyzabcdefgh", "aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualNonGenericMethodString(\"wxyzabcdefgh\", \"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassString.VirtualNonGenericMethodStringUsesClassTypeParam("wxyzabcdefgh", "aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassString.VirtualNonGenericMethodIntArrayUsesClassTypeParam("wxyzabcdefgh", new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualNonGenericMethodIntArrayUsesClassTypeParam(\"wxyzabcdefgh\", new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassString.VirtualNonGenericMethodIntArrayUsesClassTypeParam("wxyzabcdefgh", new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassString.VirtualNonGenericMethodStringArrayUsesClassTypeParam("wxyzabcdefgh", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassString.VirtualNonGenericMethodStringArrayUsesClassTypeParam(\"wxyzabcdefgh\", new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassString.VirtualNonGenericMethodStringArrayUsesClassTypeParam("wxyzabcdefgh", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassIntArray.VirtualNonGenericMethodIntUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, 1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualNonGenericMethodIntUsesClassTypeParam(new int[] {Int32.MaxValue, Int32.MinValue}, 1, typeof(int, true)) to be 1, but found '" + GenericClassIntArray.VirtualNonGenericMethodIntUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, 1, typeof(int), true) + "'");
        }

        if (GenericClassIntArray.VirtualNonGenericMethodStringUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, "aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualNonGenericMethodString(new int[] {Int32.MaxValue, Int32.MinValue}, \"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassIntArray.VirtualNonGenericMethodStringUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, "aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassIntArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new int[] {Int32.MaxValue, Int32.MinValue}, new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassIntArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassIntArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new int[] {Int32.MaxValue, Int32.MinValue}, new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassIntArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassStringArray.VirtualNonGenericMethodIntUsesClassTypeParam(new string[1000], 1, typeof(int), true) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualNonGenericMethodIntUsesClassTypeParam(new string[1000], 1, typeof(int, true)) to be 1, but found '" + GenericClassStringArray.VirtualNonGenericMethodIntUsesClassTypeParam(new string[1000], 1, typeof(int), true) + "'");
        }

        if (GenericClassStringArray.VirtualNonGenericMethodStringUsesClassTypeParam(new string[1000], "aaaa", typeof(string), true) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualNonGenericMethodString(new string[1000], \"aaaa\", typeof(string, true)) to be \"aaaa\", but found '" + GenericClassStringArray.VirtualNonGenericMethodStringUsesClassTypeParam(new string[1000], "aaaa", typeof(string), true) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassStringArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new string[1000], new int[] { 1, 2, 3 }, typeof(int[]), true), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new string[1000], new int[] {1,2,3} typeof(int[]), true) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassStringArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new string[1000], new int[] { 1, 2, 3 }, typeof(int[]), true)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassStringArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new string[1000], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new string[1000], new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), true) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassStringArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new string[1000], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), true)) + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<int>(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<int>(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<int>(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<string>("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<string>(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<string>("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassInt.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassString.VirtualGenericMethod<int>(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualGenericMethod<int>(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassString.VirtualGenericMethod<int>(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassString.VirtualGenericMethod<string>("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualGenericMethod<string>(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassString.VirtualGenericMethod<string>("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassString.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassString.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassString.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassString.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<int>(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<int>(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<int>(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<string>("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<string>(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<string>("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<int>(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<int>(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<int>(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<string>("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<string>(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<string>("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodInt(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodInt(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodInt(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodString("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodString(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodString("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodInt(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodInt(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodInt(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodString("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodString(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodString("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodInt(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodInt(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodInt(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodString("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodString(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodString("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodInt(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodInt(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodInt(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodString("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodString(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodString("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int>(27, 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int>(27, 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int>(27, 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string>(27, "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string>(27, \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string>(27, "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int[]>(27, new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int[]>(27, new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int[]>(27, new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string[]>(27, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string[]>(27, new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string[]>(27, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<int>("", 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<int>(\"\", 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<int>("", 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<string>("", "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<string>(\"\", \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<string>("", "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<int[]>("", new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<int[]>(\"\", new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<int[]>("", new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<string[]>("", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<string[]>(\"\", new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassString.VirtualGenericMethodUsesClassTypeParam<string[]>("", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int>(new int[0], 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int>(new int[0], 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int>(new int[0], 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string>(new int[0], "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string>(new int[0], \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string>(new int[0], "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new int[0], new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new int[0], new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new int[0], new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new int[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new int[0], new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new int[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int>(new string[0], 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int>(new string[0], 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int>(new string[0], 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string>(new string[0], "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string>(new string[0], \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string>(new string[0], "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new string[0], new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new string[0], new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new string[0], new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new string[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new string[0], new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new string[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodIntUsesClassTypeParam(Int32.MaxValue, 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodIntUsesClassTypeParam(Int32.MaxValue, 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodIntUsesClassTypeParam(Int32.MaxValue, 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodStringUsesClassTypeParam(Int32.MaxValue, "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodString(Int32.MaxValue, \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodStringUsesClassTypeParam(Int32.MaxValue, "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodIntArrayUsesClassTypeParam(Int32.MaxValue, new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodIntArrayUsesClassTypeParam(Int32.MaxValue, new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodIntArrayUsesClassTypeParam(Int32.MaxValue, new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodStringArrayUsesClassTypeParam(Int32.MaxValue, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodStringArrayUsesClassTypeParam(Int32.MaxValue, new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassInt.VirtualNonGenericMethodStringArrayUsesClassTypeParam(Int32.MaxValue, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodIntUsesClassTypeParam("wxyzabcdefgh", 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodIntUsesClassTypeParam(\"wxyzabcdefgh\", 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodIntUsesClassTypeParam("wxyzabcdefgh", 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodStringUsesClassTypeParam("wxyzabcdefgh", "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodString(\"wxyzabcdefgh\", \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodStringUsesClassTypeParam("wxyzabcdefgh", "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodIntArrayUsesClassTypeParam("wxyzabcdefgh", new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodIntArrayUsesClassTypeParam(\"wxyzabcdefgh\", new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodIntArrayUsesClassTypeParam("wxyzabcdefgh", new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodStringArrayUsesClassTypeParam("wxyzabcdefgh", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodStringArrayUsesClassTypeParam(\"wxyzabcdefgh\", new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassString.VirtualNonGenericMethodStringArrayUsesClassTypeParam("wxyzabcdefgh", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodIntUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodIntUsesClassTypeParam(new int[] {Int32.MaxValue, Int32.MinValue}, 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodIntUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodStringUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodString(new int[] {Int32.MaxValue, Int32.MinValue}, \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodStringUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new int[] {Int32.MaxValue, Int32.MinValue}, new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new int[] {Int32.MaxValue, Int32.MinValue}, new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassIntArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodIntUsesClassTypeParam(new string[1000], 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodIntUsesClassTypeParam(new string[1000], 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodIntUsesClassTypeParam(new string[1000], 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodStringUsesClassTypeParam(new string[1000], "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodString(new string[1000], \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodStringUsesClassTypeParam(new string[1000], "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new string[1000], new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new string[1000], new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new string[1000], new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new string[1000], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new string[1000], new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassStringArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new string[1000], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<int>(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<int>(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<int>(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<string>("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<string>(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<string>("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<int>(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<int>(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<int>(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<string>("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<string>(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<string>("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<int>(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<int>(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<int>(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<string>("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<string>(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<string>("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<int>(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<int>(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<int>(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<string>("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<string>(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<string>("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<int[]>(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<int[]>(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<string[]>(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethod<string[]>(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodInt(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodInt(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodInt(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodString("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodString(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodString("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodInt(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodInt(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodInt(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodString("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodString(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodString("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodInt(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodInt(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodInt(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodString("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodString(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodString("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodInt(1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodInt(1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodInt(1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodString("aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodString(\"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodString("aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodIntArray(new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodIntArray(new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodStringArray(new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodStringArray(new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int>(27, 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int>(27, 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int>(27, 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string>(27, "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string>(27, \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string>(27, "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int[]>(27, new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int[]>(27, new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<int[]>(27, new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string[]>(27, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string[]>(27, new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualGenericMethodUsesClassTypeParam<string[]>(27, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<int>("", 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<int>(\"\", 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<int>("", 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<string>("", "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<string>(\"\", \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<string>("", "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<int[]>("", new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<int[]>(\"\", new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<int[]>("", new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<string[]>("", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<string[]>(\"\", new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualGenericMethodUsesClassTypeParam<string[]>("", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int>(new int[0], 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int>(new int[0], 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int>(new int[0], 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string>(new int[0], "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string>(new int[0], \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string>(new int[0], "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new int[0], new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new int[0], new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new int[0], new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new int[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new int[0], new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new int[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int>(new string[0], 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int>(new string[0], 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int>(new string[0], 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string>(new string[0], "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string>(new string[0], \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string>(new string[0], "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new string[0], new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new string[0], new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<int[]>(new string[0], new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new string[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new string[0], new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualGenericMethodUsesClassTypeParam<string[]>(new string[0], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodIntUsesClassTypeParam(Int32.MaxValue, 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodIntUsesClassTypeParam(Int32.MaxValue, 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodIntUsesClassTypeParam(Int32.MaxValue, 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodStringUsesClassTypeParam(Int32.MaxValue, "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodString(Int32.MaxValue, \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodStringUsesClassTypeParam(Int32.MaxValue, "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodIntArrayUsesClassTypeParam(Int32.MaxValue, new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodIntArrayUsesClassTypeParam(Int32.MaxValue, new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodIntArrayUsesClassTypeParam(Int32.MaxValue, new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodStringArrayUsesClassTypeParam(Int32.MaxValue, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodStringArrayUsesClassTypeParam(Int32.MaxValue, new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.VirtualNonGenericMethodStringArrayUsesClassTypeParam(Int32.MaxValue, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodIntUsesClassTypeParam("wxyzabcdefgh", 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodIntUsesClassTypeParam(\"wxyzabcdefgh\", 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodIntUsesClassTypeParam("wxyzabcdefgh", 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodStringUsesClassTypeParam("wxyzabcdefgh", "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodString(\"wxyzabcdefgh\", \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodStringUsesClassTypeParam("wxyzabcdefgh", "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodIntArrayUsesClassTypeParam("wxyzabcdefgh", new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodIntArrayUsesClassTypeParam(\"wxyzabcdefgh\", new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodIntArrayUsesClassTypeParam("wxyzabcdefgh", new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodStringArrayUsesClassTypeParam("wxyzabcdefgh", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodStringArrayUsesClassTypeParam(\"wxyzabcdefgh\", new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.VirtualNonGenericMethodStringArrayUsesClassTypeParam("wxyzabcdefgh", new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodIntUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodIntUsesClassTypeParam(new int[] {Int32.MaxValue, Int32.MinValue}, 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodIntUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodStringUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodString(new int[] {Int32.MaxValue, Int32.MinValue}, \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodStringUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new int[] {Int32.MaxValue, Int32.MinValue}, new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new int[] {Int32.MaxValue, Int32.MinValue}, new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new int[] { Int32.MaxValue, Int32.MinValue }, new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodIntUsesClassTypeParam(new string[1000], 1, typeof(int), false) != 1)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodIntUsesClassTypeParam(new string[1000], 1, typeof(int, false)) to be 1, but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodIntUsesClassTypeParam(new string[1000], 1, typeof(int), false) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodStringUsesClassTypeParam(new string[1000], "aaaa", typeof(string), false) != "aaaa")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodString(new string[1000], \"aaaa\", typeof(string, false)) to be \"aaaa\", but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodStringUsesClassTypeParam(new string[1000], "aaaa", typeof(string), false) + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new string[1000], new int[] { 1, 2, 3 }, typeof(int[]), false), new int[] { 1, 2, 3 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new string[1000], new int[] {1,2,3} typeof(int[]), false) to be int[] {1,2,3}, but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodIntArrayUsesClassTypeParam(new string[1000], new int[] { 1, 2, 3 }, typeof(int[]), false)) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new string[1000], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false), new string[] { "abc", "def", "ghi", "jkl" }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new string[1000], new string[] {\"abc\",\"def\",\"ghi\",\"jkl\"} typeof(string[]), false) to be string[] {\"abc\",\"def\",\"ghi\",\"jkl\"}, but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.VirtualNonGenericMethodStringArrayUsesClassTypeParam(new string[1000], new string[] { "abc", "def", "ghi", "jkl" }, typeof(string[]), false)) + "'");
        }
    }
Beispiel #27
0
 public GenericArrayClass(GenericReflector reflector, IReflectClass delegateClass,
     string name, GenericClass superclass) : base(reflector, delegateClass, name, superclass
         )
 {
 }
Beispiel #28
0
 public void GTest(GenericClass <int> arg)
 {
 }
Beispiel #29
0
 public T5 GenericBar <T1, T2, T3, T4, T5>(GenericClass <T1, T2, T3, T4, T5> a)
 {
     return(a.Invoke(default(T1), default(T2), default(T3), default(T4)));
 }
Beispiel #30
0
        public static IEnumerable <object[]> GetNativeVariantForObject_NonRoundtrippingPrimitives_TestData()
        {
            // GetNativeVariantForObject supports char, but internally recognizes it the same as ushort
            // because the native variant type uses mscorlib type VarEnum to store what type it contains.
            // To get back the original char, use GetObjectForNativeVariant<ushort> and cast to char.
            yield return(new object[] { 'a', VarEnum.VT_UI2, (IntPtr)'a', (ushort)97 });

            yield return(new object[] { new char[] { 'a', 'b', 'c' }, (VarEnum)8210, (IntPtr)(-1), new ushort[] { 'a', 'b', 'c' } });

            // IntPtr/UIntPtr objects are converted to int/uint respectively.
            yield return(new object[] { (IntPtr)10, VarEnum.VT_INT, (IntPtr)10, 10 });

            yield return(new object[] { (UIntPtr)10, VarEnum.VT_UINT, (IntPtr)10, (uint)10 });

            yield return(new object[] { new IntPtr[] { (IntPtr)10, (IntPtr)11, (IntPtr)12 }, (VarEnum)8212, (IntPtr)(-1), new long[] { 10, 11, 12 } });

            yield return(new object[] { new UIntPtr[] { (UIntPtr)10, (UIntPtr)11, (UIntPtr)12 }, (VarEnum)8213, (IntPtr)(-1), new ulong[] { 10, 11, 12 } });

            // DateTime is converted to VT_DATE which is offset from December 30, 1899.
            DateTime earlyDateTime = new DateTime(1899, 12, 30);

            yield return(new object[] { earlyDateTime, VarEnum.VT_DATE, IntPtr.Zero, new DateTime(1899, 12, 30) });

            // Wrappers.
            yield return(new object[] { new UnknownWrapper(10), VarEnum.VT_UNKNOWN, IntPtr.Zero, null });

            if (!PlatformDetection.IsNetCore)
            {
                yield return(new object[] { new DispatchWrapper(10), VarEnum.VT_DISPATCH, IntPtr.Zero, null });
            }
            else
            {
                Assert.Throws <PlatformNotSupportedException>(() => new DispatchWrapper(10));
            }
            yield return(new object[] { new ErrorWrapper(10), VarEnum.VT_ERROR, (IntPtr)10, 10 });

            yield return(new object[] { new CurrencyWrapper(10), VarEnum.VT_CY, (IntPtr)100000, 10m });

            yield return(new object[] { new BStrWrapper("a"), VarEnum.VT_BSTR, (IntPtr)(-1), "a" });

            yield return(new object[] { new BStrWrapper(null), VarEnum.VT_BSTR, IntPtr.Zero, null });

            yield return(new object[] { new UnknownWrapper[] { new UnknownWrapper(null), new UnknownWrapper(10) }, (VarEnum)8205, (IntPtr)(-1), new object[] { null, 10 } });

            if (!PlatformDetection.IsNetCore)
            {
                yield return(new object[] { new DispatchWrapper[] { new DispatchWrapper(null), new DispatchWrapper(10) }, (VarEnum)8201, (IntPtr)(-1), new object[] { null, 10 } });
            }
            else
            {
                Assert.Throws <PlatformNotSupportedException>(() => new DispatchWrapper(10));
            }
            yield return(new object[] { new ErrorWrapper[] { new ErrorWrapper(10) }, (VarEnum)8202, (IntPtr)(-1), new uint[] { 10 } });

            yield return(new object[] { new CurrencyWrapper[] { new CurrencyWrapper(10) }, (VarEnum)8198, (IntPtr)(-1), new decimal[] { 10 } });

            yield return(new object[] { new BStrWrapper[] { new BStrWrapper("a"), new BStrWrapper(null), new BStrWrapper("c") }, (VarEnum)8200, (IntPtr)(-1), new string[] { "a", null, "c" } });

            // Objects.
            var nonGenericClass = new NonGenericClass();

            yield return(new object[] { new NonGenericClass[] { nonGenericClass, null }, (VarEnum)8201, (IntPtr)(-1), new object[] { nonGenericClass, null } });

            var genericClass = new GenericClass <string>();

            yield return(new object[] { new GenericClass <string>[] { genericClass, null }, (VarEnum)8205, (IntPtr)(-1), new object[] { genericClass, null } });

            var nonGenericStruct = new NonGenericStruct();

            yield return(new object[] { new NonGenericStruct[] { nonGenericStruct }, (VarEnum)8228, (IntPtr)(-1), new NonGenericStruct[] { nonGenericStruct } });

            var classWithInterface  = new ClassWithInterface();
            var structWithInterface = new StructWithInterface();

            yield return(new object[] { new ClassWithInterface[] { classWithInterface, null }, (VarEnum)8201, (IntPtr)(-1), new object[] { classWithInterface, null } });

            yield return(new object[] { new StructWithInterface[] { structWithInterface }, (VarEnum)8228, (IntPtr)(-1), new StructWithInterface[] { structWithInterface } });

            yield return(new object[] { new NonGenericInterface[] { classWithInterface, structWithInterface, null }, (VarEnum)8201, (IntPtr)(-1), new object[] { classWithInterface, structWithInterface, null } });

            // Enums.
            yield return(new object[] { SByteEnum.Value2, VarEnum.VT_I1, (IntPtr)1, (sbyte)1 });

            yield return(new object[] { Int16Enum.Value2, VarEnum.VT_I2, (IntPtr)1, (short)1 });

            yield return(new object[] { Int32Enum.Value2, VarEnum.VT_I4, (IntPtr)1, 1 });

            yield return(new object[] { Int64Enum.Value2, VarEnum.VT_I8, (IntPtr)1, (long)1 });

            yield return(new object[] { ByteEnum.Value2, VarEnum.VT_UI1, (IntPtr)1, (byte)1 });

            yield return(new object[] { UInt16Enum.Value2, VarEnum.VT_UI2, (IntPtr)1, (ushort)1 });

            yield return(new object[] { UInt32Enum.Value2, VarEnum.VT_UI4, (IntPtr)1, (uint)1 });

            yield return(new object[] { UInt64Enum.Value2, VarEnum.VT_UI8, (IntPtr)1, (ulong)1 });

            yield return(new object[] { new SByteEnum[] { SByteEnum.Value2 }, (VarEnum)8208, (IntPtr)(-1), new sbyte[] { 1 } });

            yield return(new object[] { new Int16Enum[] { Int16Enum.Value2 }, (VarEnum)8194, (IntPtr)(-1), new short[] { 1 } });

            yield return(new object[] { new Int32Enum[] { Int32Enum.Value2 }, (VarEnum)8195, (IntPtr)(-1), new int[] { 1 } });

            yield return(new object[] { new Int64Enum[] { Int64Enum.Value2 }, (VarEnum)8212, (IntPtr)(-1), new long[] { 1 } });

            yield return(new object[] { new ByteEnum[] { ByteEnum.Value2 }, (VarEnum)8209, (IntPtr)(-1), new byte[] { 1 } });

            yield return(new object[] { new UInt16Enum[] { UInt16Enum.Value2 }, (VarEnum)8210, (IntPtr)(-1), new ushort[] { 1 } });

            yield return(new object[] { new UInt32Enum[] { UInt32Enum.Value2 }, (VarEnum)8211, (IntPtr)(-1), new uint[] { 1 } });

            yield return(new object[] { new UInt64Enum[] { UInt64Enum.Value2 }, (VarEnum)8213, (IntPtr)(-1), new ulong[] { 1 } });

            // Color is converted to uint.
            yield return(new object[] { Color.FromArgb(10), VarEnum.VT_UI4, (IntPtr)655360, (uint)655360 });
        }
 static void Main(string[] args)
 {
     var gc = new GenericClass<string>();
     var strLength = gc.Value.Length;
 }
Beispiel #32
0
 public TransientClass(GenericClass <int> test)
 {
 }
Beispiel #33
0
 public void HalfOpen(GenericClass <T, int> foo)
 {
 }
Beispiel #34
0
    public static int test_0_constrained_reftype()
    {
        GenericClass <String> t = new GenericClass <String> ();

        return(t.toString("1234") == "1234" ? 0 : 1);
    }
 public void InvokeGenericMethod()
 {
     ToCode(X(), () => GenericClass <int> .GenericMethod <double>());
 }
        public void Given_MaxStringNumber_3rd_Position_ShouldReturnSame()
        {
            string max = GenericClass <string> .maximum("Apple", "Banana", "Peach");

            Assert.AreEqual("Peach", max);
        }
Beispiel #37
0
    public static void GenericClassVirtualProperty()
    {
        GenericClass<int>.classParameterType = typeof(int);
        GenericClass<string>.classParameterType = typeof(string);
        GenericClass<int[]>.classParameterType = typeof(int[]);
        GenericClass<string[]>.classParameterType = typeof(string[]);

        GenericClass<int> GenericClassInt = new GenericClass<int>();
        GenericClass<string> GenericClassString = new GenericClass<string>();
        GenericClass<int[]> GenericClassIntArray = new GenericClass<int[]>();
        GenericClass<string[]> GenericClassStringArray = new GenericClass<string[]>();
        GenericClassInt.usingBaseVirtualProperty = true;
        GenericClassString.usingBaseVirtualProperty = true;
        GenericClassIntArray.usingBaseVirtualProperty = true;
        GenericClassStringArray.usingBaseVirtualProperty = true;

        GenericClassInheritsFromGenericClass<int> GenericClassInheritsFromGenericClassInt = new GenericClassInheritsFromGenericClass<int>();
        GenericClassInheritsFromGenericClass<string> GenericClassInheritsFromGenericClassString = new GenericClassInheritsFromGenericClass<string>();
        GenericClassInheritsFromGenericClass<int[]> GenericClassInheritsFromGenericClassIntArray = new GenericClassInheritsFromGenericClass<int[]>();
        GenericClassInheritsFromGenericClass<string[]> GenericClassInheritsFromGenericClassStringArray = new GenericClassInheritsFromGenericClass<string[]>();
        GenericClassInheritsFromGenericClassInt.usingBaseVirtualProperty = false;
        GenericClassInheritsFromGenericClassString.usingBaseVirtualProperty = false;
        GenericClassInheritsFromGenericClassIntArray.usingBaseVirtualProperty = false;
        GenericClassInheritsFromGenericClassStringArray.usingBaseVirtualProperty = false;

        GenericClass<int> GenericClassInheritsFromGenericClassCastAsGenericClassInt = GenericClassInheritsFromGenericClassInt;
        GenericClass<string> GenericClassInheritsFromGenericClassCastAsGenericClassString = GenericClassInheritsFromGenericClassString;
        GenericClass<int[]> GenericClassInheritsFromGenericClassCastAsGenericClassIntArray = GenericClassInheritsFromGenericClassIntArray;
        GenericClass<string[]> GenericClassInheritsFromGenericClassCastAsGenericClassStringArray = GenericClassInheritsFromGenericClassStringArray;

        GenericClassInt.genericVirtualProperty = Int32.MaxValue;
        GenericClassInt.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassInt.nongenericStringVirtualProperty = "";
        GenericClassInt.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInt.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (GenericClassInt.genericVirtualProperty != Int32.MaxValue)
        {
            Utils.Fail("Expected returned value of GenericClassInt.genericVirtualProperty to be '" + Int32.MaxValue + "', but found '" + GenericClassInt.genericVirtualProperty + "'");
        }

        if (GenericClassInt.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInt.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassInt.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassInt.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassInt.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassInt.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInt.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInt.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInt.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInt.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassString.genericVirtualProperty = string.Empty;
        GenericClassString.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassString.nongenericStringVirtualProperty = "";
        GenericClassString.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassString.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (GenericClassString.genericVirtualProperty != string.Empty)
        {
            Utils.Fail("Expected returned value of GenericClassString.genericVirtualProperty to be '" + string.Empty + "', but found '" + GenericClassString.genericVirtualProperty + "'");
        }

        if (GenericClassString.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassString.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassString.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassString.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassString.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassString.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassString.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassString.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassString.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassString.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassString.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassString.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassIntArray.genericVirtualProperty = new int[] { 6, 4, 2, 1, 0 };
        GenericClassIntArray.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassIntArray.nongenericStringVirtualProperty = "";
        GenericClassIntArray.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassIntArray.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (Utils.CompareArray<int>(GenericClassIntArray.genericVirtualProperty, new int[] { 6, 4, 2, 1, 0 }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.genericVirtualProperty to be 'new int[]{6,4,2,1,0}', but found '" + Utils.BuildArrayString<int>(GenericClassIntArray.genericVirtualProperty) + "'");
        }

        if (GenericClassIntArray.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassIntArray.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassIntArray.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassIntArray.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassIntArray.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassIntArray.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassIntArray.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassIntArray.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassStringArray.genericVirtualProperty = new string[] { " ", "", "", " " };
        GenericClassStringArray.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassStringArray.nongenericStringVirtualProperty = "";
        GenericClassStringArray.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassStringArray.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (Utils.CompareArray<string>(GenericClassStringArray.genericVirtualProperty, new string[] { " ", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.genericVirtualProperty to be 'new string[]{\" \",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassStringArray.genericVirtualProperty) + "'");
        }

        if (GenericClassStringArray.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassStringArray.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassStringArray.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassStringArray.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassStringArray.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassStringArray.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassStringArray.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassStringArray.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassInheritsFromGenericClassInt.genericVirtualProperty = Int32.MaxValue;
        GenericClassInheritsFromGenericClassInt.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassInheritsFromGenericClassInt.nongenericStringVirtualProperty = "";
        GenericClassInheritsFromGenericClassInt.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInheritsFromGenericClassInt.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (GenericClassInheritsFromGenericClassInt.genericVirtualProperty != Int32.MaxValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.genericVirtualProperty to be '" + Int32.MaxValue + "', but found '" + GenericClassInheritsFromGenericClassInt.genericVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassInheritsFromGenericClassInt.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassInt.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassInheritsFromGenericClassInt.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassInt.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassInt.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassInt.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassInt.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassInt.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassInheritsFromGenericClassString.genericVirtualProperty = string.Empty;
        GenericClassInheritsFromGenericClassString.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassInheritsFromGenericClassString.nongenericStringVirtualProperty = "";
        GenericClassInheritsFromGenericClassString.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInheritsFromGenericClassString.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (GenericClassInheritsFromGenericClassString.genericVirtualProperty != string.Empty)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.genericVirtualProperty to be '" + string.Empty + "', but found '" + GenericClassInheritsFromGenericClassString.genericVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassString.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassInheritsFromGenericClassString.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassString.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassInheritsFromGenericClassString.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassString.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassString.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassString.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassString.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassString.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassInheritsFromGenericClassIntArray.genericVirtualProperty = new int[] { 6, 4, 2, 1, 0 };
        GenericClassInheritsFromGenericClassIntArray.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassInheritsFromGenericClassIntArray.nongenericStringVirtualProperty = "";
        GenericClassInheritsFromGenericClassIntArray.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInheritsFromGenericClassIntArray.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassIntArray.genericVirtualProperty, new int[] { 6, 4, 2, 1, 0 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.genericVirtualProperty to be 'new int[]{6,4,2,1,0}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassIntArray.genericVirtualProperty) + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassInheritsFromGenericClassIntArray.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassIntArray.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassInheritsFromGenericClassIntArray.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassIntArray.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassIntArray.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassIntArray.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassIntArray.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassIntArray.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassInheritsFromGenericClassStringArray.genericVirtualProperty = new string[] { " ", "", "", " " };
        GenericClassInheritsFromGenericClassStringArray.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassInheritsFromGenericClassStringArray.nongenericStringVirtualProperty = "";
        GenericClassInheritsFromGenericClassStringArray.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInheritsFromGenericClassStringArray.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassStringArray.genericVirtualProperty, new string[] { " ", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.genericVirtualProperty to be 'new string[]{\" \",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassStringArray.genericVirtualProperty) + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassInheritsFromGenericClassStringArray.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassStringArray.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassInheritsFromGenericClassStringArray.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassStringArray.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassStringArray.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassStringArray.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassStringArray.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassStringArray.nongenericStringArrayVirtualProperty) + "'");
        }


        GenericClassInheritsFromGenericClassCastAsGenericClassInt.genericVirtualProperty = Int32.MaxValue;
        GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericStringVirtualProperty = "";
        GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.genericVirtualProperty != Int32.MaxValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.genericVirtualProperty to be '" + Int32.MaxValue + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.genericVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassInt.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassInheritsFromGenericClassCastAsGenericClassString.genericVirtualProperty = string.Empty;
        GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericStringVirtualProperty = "";
        GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.genericVirtualProperty != string.Empty)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.genericVirtualProperty to be '" + string.Empty + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.genericVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassString.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.genericVirtualProperty = new int[] { 6, 4, 2, 1, 0 };
        GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericStringVirtualProperty = "";
        GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.genericVirtualProperty, new int[] { 6, 4, 2, 1, 0 }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.genericVirtualProperty to be 'new int[]{6,4,2,1,0}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.genericVirtualProperty) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassIntArray.nongenericStringArrayVirtualProperty) + "'");
        }

        GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.genericVirtualProperty = new string[] { " ", "", "", " " };
        GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericIntVirtualProperty = Int32.MinValue;
        GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericStringVirtualProperty = "";
        GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericIntArrayVirtualProperty = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericStringArrayVirtualProperty = new string[] { "", "", "", " " };

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.genericVirtualProperty, new string[] { " ", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.genericVirtualProperty to be 'new string[]{\" \",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.genericVirtualProperty) + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericIntVirtualProperty != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericIntVirtualProperty to be '" + Int32.MinValue + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericIntVirtualProperty + "'");
        }

        if (GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericStringVirtualProperty != "")
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericStringVirtualProperty to be '" + "" + "', but found '" + GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericStringVirtualProperty + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericIntArrayVirtualProperty, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericIntArrayVirtualProperty to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericIntArrayVirtualProperty) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericStringArrayVirtualProperty, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericStringArrayVirtualProperty to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInheritsFromGenericClassCastAsGenericClassStringArray.nongenericStringArrayVirtualProperty) + "'");
        }
    }
        public static void Assert_GenericClassesAreEqual(GenericClass <SimpleClass> s, GenericClass <SimpleClass> sCopy)
        {
            if (s == null && sCopy == null)
            {
                return;
            }

            // test that subclass is equal but different instance
            if (s.Item1 != null)
            {
                SimpleClassTests.Assert_AreEqualButNotSame(s.Item1, sCopy.Item1);
            }

            // readonly reference field test
            if (s.Item2 != null)
            {
                SimpleClassTests.Assert_AreEqualButNotSame(s.Item2, sCopy.Item2);
            }
        }
Beispiel #39
0
    public static void GenericClassField()
    {
        GenericClass<int>.classParameterType = typeof(int);
        GenericClass<string>.classParameterType = typeof(string);
        GenericClass<int[]>.classParameterType = typeof(int[]);
        GenericClass<string[]>.classParameterType = typeof(string[]);

        GenericClass<int> GenericClassInt = new GenericClass<int>();
        GenericClass<string> GenericClassString = new GenericClass<string>();
        GenericClass<int[]> GenericClassIntArray = new GenericClass<int[]>();
        GenericClass<string[]> GenericClassStringArray = new GenericClass<string[]>();

        GenericClassInt.genericField = Int32.MaxValue;
        GenericClassInt.nongenericIntField = Int32.MinValue;
        GenericClassInt.nongenericStringField = "";
        GenericClassInt.nongenericIntArrayField = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassInt.nongenericStringArrayField = new string[] { "", "", "", " " };

        if (GenericClassInt.genericField != Int32.MaxValue)
        {
            Utils.Fail("Expected returned value of GenericClassInt.genericField to be '" + Int32.MaxValue + "', but found '" + GenericClassInt.genericField + "'");
        }

        if (GenericClassInt.nongenericIntField != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassInt.nongenericIntField to be '" + Int32.MinValue + "', but found '" + GenericClassInt.nongenericIntField + "'");
        }

        if (GenericClassInt.nongenericStringField != "")
        {
            Utils.Fail("Expected returned value of GenericClassInt.nongenericStringField to be '" + "" + "', but found '" + GenericClassInt.nongenericStringField + "'");
        }

        if (Utils.CompareArray<int>(GenericClassInt.nongenericIntArrayField, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.nongenericIntArrayField to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassInt.nongenericIntArrayField) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassInt.nongenericStringArrayField, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassInt.nongenericStringArrayField to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassInt.nongenericStringArrayField) + "'");
        }

        GenericClassString.nongenericIntField = Int32.MinValue;
        GenericClassString.nongenericStringField = "";
        GenericClassString.nongenericIntArrayField = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassString.nongenericStringArrayField = new string[] { "", "", "", " " };

        if (GenericClassString.genericField != null)
        {
            Utils.Fail("Expected returned value of GenericClassString.genericField to be 'null', but found '" + GenericClassString.genericField + "'");
        }

        if (GenericClassString.nongenericIntField != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassString.nongenericIntField to be '" + Int32.MinValue + "', but found '" + GenericClassString.nongenericIntField + "'");
        }

        if (GenericClassString.nongenericStringField != "")
        {
            Utils.Fail("Expected returned value of GenericClassString.nongenericStringField to be '" + "" + "', but found '" + GenericClassString.nongenericStringField + "'");
        }

        if (Utils.CompareArray<int>(GenericClassString.nongenericIntArrayField, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassString.nongenericIntArrayField to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassString.nongenericIntArrayField) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassString.nongenericStringArrayField, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassString.nongenericStringArrayField to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassString.nongenericStringArrayField) + "'");
        }

        GenericClassIntArray.genericField = new int[] { 6, 4, 2, 1, 0 };
        GenericClassIntArray.nongenericIntField = Int32.MinValue;
        GenericClassIntArray.nongenericStringField = "";
        GenericClassIntArray.nongenericIntArrayField = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassIntArray.nongenericStringArrayField = new string[] { "", "", "", " " };

        if (Utils.CompareArray<int>(GenericClassIntArray.genericField, new int[] { 6, 4, 2, 1, 0 }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.genericField to be 'new int[]{6,4,2,1,0}', but found '" + Utils.BuildArrayString<int>(GenericClassIntArray.genericField) + "'");
        }

        if (GenericClassIntArray.nongenericIntField != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.nongenericIntField to be '" + Int32.MinValue + "', but found '" + GenericClassIntArray.nongenericIntField + "'");
        }

        if (GenericClassIntArray.nongenericStringField != "")
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.nongenericStringField to be '" + "" + "', but found '" + GenericClassIntArray.nongenericStringField + "'");
        }

        if (Utils.CompareArray<int>(GenericClassIntArray.nongenericIntArrayField, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.nongenericIntArrayField to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassIntArray.nongenericIntArrayField) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassIntArray.nongenericStringArrayField, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassIntArray.nongenericStringArrayField to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassIntArray.nongenericStringArrayField) + "'");
        }

        GenericClassStringArray.genericField = new string[] { " ", "", "", " " };
        GenericClassStringArray.nongenericIntField = Int32.MinValue;
        GenericClassStringArray.nongenericStringField = "";
        GenericClassStringArray.nongenericIntArrayField = new int[] { 0, Int32.MaxValue, Int32.MinValue };
        GenericClassStringArray.nongenericStringArrayField = new string[] { "", "", "", " " };

        if (Utils.CompareArray<string>(GenericClassStringArray.genericField, new string[] { " ", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.genericField to be 'new string[]{\" \",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassStringArray.genericField) + "'");
        }

        if (GenericClassStringArray.nongenericIntField != Int32.MinValue)
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.nongenericIntField to be '" + Int32.MinValue + "', but found '" + GenericClassStringArray.nongenericIntField + "'");
        }

        if (GenericClassStringArray.nongenericStringField != "")
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.nongenericStringField to be '" + "" + "', but found '" + GenericClassStringArray.nongenericStringField + "'");
        }

        if (Utils.CompareArray<int>(GenericClassStringArray.nongenericIntArrayField, new int[] { 0, Int32.MaxValue, Int32.MinValue }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.nongenericIntArrayField to be 'new int[]{0, " + Int32.MaxValue + ", " + Int32.MinValue + "}', but found '" + Utils.BuildArrayString<int>(GenericClassStringArray.nongenericIntArrayField) + "'");
        }

        if (Utils.CompareArray<string>(GenericClassStringArray.nongenericStringArrayField, new string[] { "", "", "", " " }))
        {
            Utils.Fail("Expected returned value of GenericClassStringArray.nongenericStringArrayField to be 'new string[]{\"\",\"\",\"\",\" \"}', but found '" + Utils.BuildArrayString<string>(GenericClassStringArray.nongenericStringArrayField) + "'");
        }
    }
        async Task <string> MethodAsync(int value)
        {
            await Task.Delay(0);

            return(GenericClass <byte> .GenericMethod(ref value));
        }
 public static void GenericClassMethod <T>()
 {
     return(GenericClass <T> .SharedMethod());
 }
Beispiel #42
0
	public static int Main(){
		Console.WriteLine("Test creation/invocation of non-generic closed instance or open static delegates over various generic methods");

		GenericClass<EQStruct<long>> refr = new GenericClass<EQStruct<long>>();
		GenericStruct<EQStruct<long>> val = new GenericStruct<EQStruct<long>>();
		refr.value = 50;
		val.value = 50;

		//Closed instance methods
		dc1 d1 = new dc1(refr.M1);
		d1(50);
		d1 = new dc1(val.M1);
		d1(50);

		dc4 d2 = new dc4(refr.M2);
		d2(new EQStruct<long>(50),50);
		d2 = new dc4(val.M2);
		d2(new EQStruct<long>(50),50);

		dc5 d3 = new dc5(refr.M3);
		d3(50, new EQStruct<long>(50));
		d3 = new dc5(val.M3);
		d3(50, new EQStruct<long>(50));

		dc4 d4 = new dc4(refr.M4);
		d4(new EQStruct<long>(50),50);
		d4 = new dc4(val.M4);
		d4(new EQStruct<long>(50),50);

		dc5 d5 = new dc5(refr.M5);
		d5(50, new EQStruct<long>(50));
		d5 = new dc5(val.M5);
		d5(50, new EQStruct<long>(50));

		dc6 d6 = new dc6(refr.M6);
		d6(new EQClass<long>(50),50);
		d6 = new dc6(val.M6);
		d6(new EQClass<long>(50),50);

		dc7 d7 = new dc7(refr.M7);
		d7(50,new EQClass<long>(50));
		d7 = new dc7(val.M7);
		d7(50,new EQClass<long>(50));

		dc6 d8 = new dc6(refr.M8<EQClass<long>>);
		d8(new EQClass<long>(50),50);
		d8 = new dc6(val.M8<EQClass<long>>);
		d8(new EQClass<long>(50),50);

		dc7 d9 = new dc7(refr.M9<EQClass<long>>);
		d9(50,new EQClass<long>(50));
		d9 = new dc7(val.M9<EQClass<long>>);
		d9(50,new EQClass<long>(50));

		//Open static methods
		d1 = new dc1(GenericClass<EQStruct<long>>.SM1);
		d1(50);
		d1 = new dc1(GenericStruct<EQStruct<long>>.SM1);
		d1(50);

		d2 = new dc4(GenericClass<EQStruct<long>>.SM2);
		d2(new EQStruct<long>(50),50);
		d2 = new dc4(GenericStruct<EQStruct<long>>.SM2);
		d2(new EQStruct<long>(50),50);

		d3 = new dc5(GenericClass<EQStruct<long>>.SM3);
		d3(50, new EQStruct<long>(50));
		d3 = new dc5(GenericStruct<EQStruct<long>>.SM3);
		d3(50, new EQStruct<long>(50));

		d4 = new dc4(GenericClass<EQStruct<long>>.SM4);
		d4(new EQStruct<long>(50),50);
		d4 = new dc4(GenericStruct<EQStruct<long>>.SM4);
		d4(new EQStruct<long>(50),50);

		d5 = new dc5(GenericClass<EQStruct<long>>.SM5);
		d5(50, new EQStruct<long>(50));
		d5 = new dc5(GenericStruct<EQStruct<long>>.SM5);
		d5(50, new EQStruct<long>(50));

		d6 = new dc6(GenericClass<EQStruct<long>>.SM6);
		d6(new EQClass<long>(50),50);
		d6 = new dc6(GenericStruct<EQStruct<long>>.SM6);
		d6(new EQClass<long>(50),50);

		d7 = new dc7(GenericClass<EQStruct<long>>.SM7);
		d7(50,new EQClass<long>(50));
		d7 = new dc7(GenericStruct<EQStruct<long>>.SM7);
		d7(50,new EQClass<long>(50));

		d8 = new dc6(GenericClass<EQStruct<long>>.SM8<EQClass<long>>);
		d8(new EQClass<long>(50),50);
		d8 = new dc6(GenericStruct<EQStruct<long>>.SM8<EQClass<long>>);
		d8(new EQClass<long>(50),50);

		d9 = new dc7(GenericClass<EQStruct<long>>.SM9<EQClass<long>>);
		d9(50,new EQClass<long>(50));
		d9 = new dc7(GenericStruct<EQStruct<long>>.SM9<EQClass<long>>);
		d9(50,new EQClass<long>(50));		

		Console.WriteLine("Done - Passed");
		return 100;
	}
Beispiel #43
0
 public DerivedClass(GenericClass <T> g) : base(g)
 {
 }
	public static int test_18_ldobj_stobj_generics () {
		GenericClass<int> t = new GenericClass <int> ();
		int i = 5;
		int j = 6;
		return t.ldobj_stobj (ref i, ref j) + i + j;
	}
Beispiel #45
0
 static void Main(string[] args)
 {
     GenericClass<int[], string> generic = new GenericClass<int[], string>();
 }
	public static int test_5_ldelem_stelem_generics () {
		GenericClass<TestStruct> t = new GenericClass<TestStruct> ();

		TestStruct s = new TestStruct (5, 5);
		return t.ldelem_stelem (s).i;
	}
Beispiel #47
0
 public static void Main(string[] args)
 {
     GenericClass<String> gen = new GenericClass<String>();
     gen.add ( "hello" );
 }