A test for bug #409045
svn path=/trunk/mcs/; revision=108393
--- /dev/null
+#define DEBUG
+
+using System;
+
+namespace TestDebug
+{
+ class C
+ {
+ public static void Method ()
+ {
+#if !DEBUG
+ throw new ApplicationException ("3");
+#endif
+ }
+ }
+}
--- /dev/null
+// Compiler options: test-657-p2.cs -out:test-657.exe
+
+using System;
+using System.Diagnostics;
+
+namespace TestDebug
+{
+ class Program
+ {
+ [Conditional ("DEBUG")]
+ public static void Excluded ()
+ {
+ throw new ApplicationException ("1");
+ }
+
+ static int Main ()
+ {
+ C.Method (); // Only checks that DEBUG is defined in second file
+
+ Excluded ();
+#if DEBUG
+ throw new ApplicationException ("1");
+#endif
+ return 0;
+ }
+ }
+}