+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.
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
-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;
}
}