2004-04-21 Marek Safar <marek.safar@seznam.cz>
authorMarek Safar <marek.safar@gmail.com>
Wed, 21 Apr 2004 10:48:34 +0000 (10:48 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 21 Apr 2004 10:48:34 +0000 (10:48 -0000)
* test-238.cs,
test-239.cs,
test-239.cs: Tests for ObsoleteAttribute

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

mcs/tests/ChangeLog
mcs/tests/Makefile
mcs/tests/README.tests
mcs/tests/test-238.cs [new file with mode: 0644]
mcs/tests/test-239.cs [new file with mode: 0644]
mcs/tests/test-240.cs [new file with mode: 0644]

index 172df1b1bc340f8cfc17c6a7729544f3220bc9c7..7bb791dd1b4fdd342db9d993759493d607d108f7 100755 (executable)
@@ -1,3 +1,9 @@
+2004-04-21  Marek Safar <marek.safar@seznam.cz>
+
+       * test-238.cs,
+       test-239.cs,
+       test-239.cs: Tests for ObsoleteAttribute
+
 2004-04-21  Raja R Harinath  <rharinath@novell.com>
 
        * Makefile (test-compiler-jit-real): Create log files for failed
index 1e198dca544cc892465c85b29619e5b4ee132112..fcde140a7120f0951e1740aaf321f1140a6e4686 100644 (file)
@@ -39,7 +39,7 @@ TEST_SOURCES = \
        test-201 test-202 test-203 test-204 test-205 test-206 test-207 test-208 test-209 test-210 \
        test-211 test-212 test-213 test-214 test-215 test-216 test-217 test-218 test-219 test-220 \
        test-221 test-222 test-223 test-224 test-225 test-226 test-227          test-229 test-230 \
-       test-231 test-232 test-233 test-234 test-235 test-236 test-237                            \
+       test-231 test-232 test-233 test-234 test-235 test-236 test-237 test-238 test-239          \
        cls-test-0 cls-test-1 cls-test-2 cls-test-3 cls-test-5 cls-test-6 cls-test-7 cls-test-10  \
        cls-test-11 cls-test-14 cls-test-15 cls-test-16
 
index 2cb8941a54bfbe94a76731202a9649d3f710f111..4a22673a32a3c23a85e82256e559b482f2f5ed45 100644 (file)
@@ -48,7 +48,7 @@ Test cases listed by Category:
 
 * Attributes
 
-  test-157.cs test-158.cs test-177.cs test-230.cs
+  test-157.cs test-158.cs test-177.cs test-230.cs test-238.cs test-239.cs test-240.cs
 
 * Arrays and array creation
 
diff --git a/mcs/tests/test-238.cs b/mcs/tests/test-238.cs
new file mode 100644 (file)
index 0000000..ba745a1
--- /dev/null
@@ -0,0 +1,17 @@
+using System;
+using System.Diagnostics;
+
+class TestClass {
+        [Conditional ("UNDEFINED CONDITION")]
+        static void ConditionalMethod ()
+        {
+            Environment.Exit (1);
+        }
+    
+        static int Main()
+        {
+            ConditionalMethod ();
+            Console.WriteLine ("Succeeded");
+            return 0;
+        }
+}
diff --git a/mcs/tests/test-239.cs b/mcs/tests/test-239.cs
new file mode 100644 (file)
index 0000000..f6a7487
--- /dev/null
@@ -0,0 +1,31 @@
+using System;
+using System.Diagnostics;
+
+
+class BaseClass
+{
+        [Conditional ("AAXXAA")]
+        public virtual void ConditionalMethod ()
+        {
+            Environment.Exit (1);
+        }
+}
+
+class TestClass: BaseClass
+{
+        public override void ConditionalMethod ()
+        {
+            base.ConditionalMethod ();
+        }
+}
+
+class MainClass
+{
+        static int Main()
+        {
+            TestClass ts = new TestClass ();
+            ts.ConditionalMethod ();
+            Console.WriteLine ("Succeeded");
+            return 0;
+        }
+}
diff --git a/mcs/tests/test-240.cs b/mcs/tests/test-240.cs
new file mode 100644 (file)
index 0000000..7ee99c5
--- /dev/null
@@ -0,0 +1,20 @@
+#define C2
+
+using System;
+using System.Diagnostics;
+
+class TestClass {
+    
+        [Conditional("C1"), Conditional("C2")]    
+        public static void ConditionalMethod()
+        {
+            Console.WriteLine ("Succeeded");
+            Environment.Exit (0);
+        }
+    
+        static int Main()
+        {
+            ConditionalMethod ();
+            return 1;
+        }
+}