2007-11-12 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Mon, 12 Nov 2007 22:09:41 +0000 (22:09 -0000)
committerZoltan Varga <vargaz@gmail.com>
Mon, 12 Nov 2007 22:09:41 +0000 (22:09 -0000)
* invoke.cs: Add tests for invoking the Array Get/Set methods.

svn path=/trunk/mono/; revision=89497

mono/tests/ChangeLog
mono/tests/invoke.cs

index 1dc4467d5621b0e87565c5f6863ea07b61b4de22..655b528afc20e1fc2496380634a906002311b433 100644 (file)
@@ -1,3 +1,7 @@
+2007-11-12  Zoltan Varga  <vargaz@gmail.com>
+
+       * invoke.cs: Add tests for invoking the Array Get/Set methods.
+
 2007-11-12 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * bug-322722_patch_bx.2.cs : Added test for bug #322722.
index 387f0ecb95ec18b4f9de2261dd6b8de7570ba5f3..54bdfdd4e9c2ef84dbaa642b6d3d6ed43ecaa6b3 100644 (file)
@@ -70,6 +70,14 @@ class Test {
                // valuetype is used.
                ConstructorInfo ci = typeof (SimpleStruct).GetConstructor (new Type [] { typeof (bool) });
                SimpleStruct res2 = (SimpleStruct)ci.Invoke (ss, new object [] { false });
+
+               // Test invoking of the array Get/Set methods
+               string[,] arr = new string [10, 10];
+
+               arr.GetType ().GetMethod ("Set").Invoke (arr, new object [] { 1, 1, "FOO" });
+               string s = (string)arr.GetType ().GetMethod ("Get").Invoke (arr, new object [] { 1, 1 });
+               if (s != "FOO")
+                       return 3;
        
                return 0;
        }