2003-07-13 Ravi Pratap M <ravi@ximian.com>
authorRavi Pratap M <ravi@mono-cvs.ximian.com>
Mon, 14 Jul 2003 02:55:30 +0000 (02:55 -0000)
committerRavi Pratap M <ravi@mono-cvs.ximian.com>
Mon, 14 Jul 2003 02:55:30 +0000 (02:55 -0000)
* test-178.cs: Use this as it is a free slot. Test
for bug #45876.

* makefile: Update.

* README.tests: Update

svn path=/trunk/mcs/; revision=16183

mcs/tests/ChangeLog
mcs/tests/makefile
mcs/tests/test-178.cs

index 1b44a795cb56622043996fafd1919537409ad5de..9e6c6043c8743f1323ed3cbd1c6b153433d3b0ce 100755 (executable)
@@ -1,3 +1,12 @@
+2003-07-13  Ravi Pratap M  <ravi@ximian.com>
+
+       * test-178.cs: Use this as it is a free slot. Test 
+       for bug #45876.
+
+       * makefile: Update.
+
+       * README.tests: Update
+
 2003-07-13  Martin Baulig  <martin@ximian.com>
 
        * test-202.cs: Added test for bug #41975.
index 4ca16eeb9f6fe431dab7361801479914933d2d3d..4e83312ab289bb53632b17a75ca5414e9d3ad583 100755 (executable)
@@ -30,7 +30,7 @@ TEST_SOURCES = \
        test-141 test-142 test-143 test-144 test-145 test-146 test-147 test-148 test-149 test-150 \
                          test-153 test-154 test-155 test-156 test-157 test-158 test-159 test-160 \
        test-161 test-162 test-163 test-164 test-165 test-166 test-167 test-168 test-169 test-170 \
-                test-172 test-173 test-174 test-175 test-176 test-177          test-179 test-180 \
+                test-172 test-173 test-174 test-175 test-176 test-177 test-178 test-179 test-180 \
        test-181 test-182 test-183 test-184 test-185 test-186 test-187 test-188          test-190 \
        test-191 test-192 test-193 test-194 test-195          test-197 test-198 test-199 test-200 \
        test-201 test-202
index a8fd25ee94697c13452da8dbc44738db3c841699..482429a4646f1338a241a777a57f98a23bee5359 100644 (file)
@@ -1,26 +1,31 @@
-using System;
+//
+// This test ensures that we emit attributes for operators
+// only once.
+//
 
-namespace testapp{
-        public unsafe class LibTestAPI{
+using System.ComponentModel;
+using System.Reflection;
 
-                struct LibTestStruct{
-                        void* pData;
-                        void* pTest1;
-                }
+public class BrowsableClass
+{
+        [EditorBrowsable(EditorBrowsableState.Always)]
+        public static BrowsableClass operator ++(BrowsableClass a) 
+        { 
+                return null; 
+        }
 
-                LibTestStruct* the_struct;
+        public static int Main ()
+        {
+                BrowsableClass c = new BrowsableClass ();
+                MethodInfo mi = c.GetType().GetMethod ("op_Increment");
+                
+                object[] attributes = mi.GetCustomAttributes
+                        (typeof(EditorBrowsableAttribute), false);
 
-                public void Create(){
-                        IntPtr MyPtr = new IntPtr(0); // Usually created elsewhere
-                        the_struct = (LibTestStruct *) 0;  // error CS1002
-                }
-        }
+                if (attributes.Length != 1)
+                        return 1;
 
-        class TestApp{
-                static void Main(string[] args){
-                        LibTestAPI myapi = new LibTestAPI();
-                        myapi.Create();
-                }
+                return 0;
         }
 }