Improve test
authorMiguel de Icaza <miguel@gnome.org>
Wed, 8 Jan 2003 21:40:55 +0000 (21:40 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Wed, 8 Jan 2003 21:40:55 +0000 (21:40 -0000)
svn path=/trunk/mcs/; revision=10290

mcs/tests/unsafe-1.cs

index b49bc0fe2779fbcb91b15265e7025fd3d00abca1..2a35ac8ec4e1f194873987b494fca063b075bfa1 100755 (executable)
@@ -141,6 +141,19 @@ unsafe class X {
 
                return 0;
        }
+
+       static int TestMultiple ()
+       {
+               char [] array = new char [10];
+               int count = 0;
+               
+               fixed (char *pa = array, pb = array){
+                       count++;
+               }
+               if (count != 1)
+                       return 300;
+               return 0;
+       }
        
        static int Main ()
        {
@@ -157,6 +170,10 @@ unsafe class X {
 
                if ((v = TestPtrArithmetic ()) != 0)
                        return v;
+
+               if ((v = TestMultiple ()) != 0)
+                       return v;
+               
                Console.WriteLine ("Ok");
                return 0;
        }