Author: spouliot
Date: 2005-03-14 15:47:43 -0500 (Mon, 14 Mar 2005)
New Revision: 41803

Modified:
   trunk/mcs/class/corlib/Test/System.Diagnostics/ChangeLog
   trunk/mcs/class/corlib/Test/System.Diagnostics/StackFrameCas.cs
   trunk/mcs/class/corlib/Test/System.Diagnostics/StackTraceCas.cs
Log:
2005-03-14  Sebastien Pouliot  <[EMAIL PROTECTED]> 

        * StackFrameCas.cs: Fixed failures under MS for NET_1_1.
        * StackTraceCas.cs: Fixed failures under MS for NET_1_1.



Modified: trunk/mcs/class/corlib/Test/System.Diagnostics/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Diagnostics/ChangeLog    2005-03-14 
20:46:04 UTC (rev 41802)
+++ trunk/mcs/class/corlib/Test/System.Diagnostics/ChangeLog    2005-03-14 
20:47:43 UTC (rev 41803)
@@ -1,3 +1,8 @@
+2005-03-14  Sebastien Pouliot  <[EMAIL PROTECTED]> 
+
+       * StackFrameCas.cs: Fixed failures under MS for NET_1_1.
+       * StackTraceCas.cs: Fixed failures under MS for NET_1_1.
+
 2005-01-28  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * StackFrameCas.cs: New. Permission tests for StackFrame.

Modified: trunk/mcs/class/corlib/Test/System.Diagnostics/StackFrameCas.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Diagnostics/StackFrameCas.cs     
2005-03-14 20:46:04 UTC (rev 41802)
+++ trunk/mcs/class/corlib/Test/System.Diagnostics/StackFrameCas.cs     
2005-03-14 20:47:43 UTC (rev 41803)
@@ -58,7 +58,10 @@
                        int ln = sf.GetFileLineNumber ();
                        int il = sf.GetILOffset ();
                        int no = sf.GetNativeOffset ();
+#if NET_2_0
+                       // this throws in 1.x
                        Assert.IsNotNull (sf.GetMethod (), "GetMethod");
+#endif
                        if (checkFile) {
                                string fn = sf.GetFileName ();
                        }
@@ -78,7 +81,9 @@
 #else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
 #endif
+#if NET_2_0
                [ExpectedException (typeof (SecurityException))]
+#endif
                public void StackFrame_TrueConstructor_Fail ()
                {
                        StackFrame sf = null;
@@ -91,6 +96,7 @@
                                Assert.Fail ("Didn't ask for file information");
                        }
                        // now look at the file informations...
+                       // note: only fails under 2.0
                        Check (sf, true);
                }
 
@@ -130,7 +136,9 @@
 #else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
 #endif
+#if NET_2_0
                [ExpectedException (typeof (SecurityException))]
+#endif
                public void StackFrame_IntTrueConstructor_Fail ()
                {
                        StackFrame sf = null;
@@ -143,6 +151,7 @@
                                Assert.Fail ("Didn't ask for file information");
                        }
                        // now look at the file informations...
+                       // note: only fails under 2.0
                        Check (sf, true);
                }
 
@@ -174,7 +183,9 @@
 #else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
 #endif
+#if NET_2_0
                [ExpectedException (typeof (SecurityException))]
+#endif
                public void StackFrame_StringIntConstructor_Fail ()
                {
                        StackFrame sf = null;
@@ -187,6 +198,7 @@
                                Assert.Fail ("Didn't ask for file information");
                        }
                        // now look at the file informations...
+                       // note: only fails under 2.0
                        Check (sf, true);
                }
 
@@ -209,7 +221,9 @@
 #else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
 #endif
+#if NET_2_0
                [ExpectedException (typeof (SecurityException))]
+#endif
                public void StackFrame_StringIntIntConstructor_Fail ()
                {
                        StackFrame sf = null;
@@ -222,6 +236,7 @@
                                Assert.Fail ("Didn't ask for file information");
                        }
                        // now look at the file informations...
+                       // note: only fails under 2.0
                        Check (sf, true);
                }
 

Modified: trunk/mcs/class/corlib/Test/System.Diagnostics/StackTraceCas.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Diagnostics/StackTraceCas.cs     
2005-03-14 20:46:04 UTC (rev 41802)
+++ trunk/mcs/class/corlib/Test/System.Diagnostics/StackTraceCas.cs     
2005-03-14 20:47:43 UTC (rev 41803)
@@ -69,6 +69,9 @@
 
                [Test]
                [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+#if !NET_2_0
+               [ExpectedException (typeof (SecurityException))]
+#endif
                public void StackTrace_DefaultConstructor ()
                {
                        StackTrace st = new StackTrace ();
@@ -77,6 +80,9 @@
 
                [Test]
                [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+#if !NET_2_0
+               [ExpectedException (typeof (SecurityException))]
+#endif
                public void StackTrace_BoolConstructor ()
                {
                        StackTrace st = new StackTrace (true);
@@ -85,6 +91,9 @@
 
                [Test]
                [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+#if !NET_2_0
+               [ExpectedException (typeof (SecurityException))]
+#endif
                public void StackTrace_IntConstructor ()
                {
                        StackTrace st = new StackTrace (1);
@@ -93,6 +102,9 @@
 
                [Test]
                [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+#if !NET_2_0
+               [ExpectedException (typeof (SecurityException))]
+#endif
                public void StackTrace_IntBoolConstructor ()
                {
                        StackTrace st = new StackTrace (1, true);
@@ -133,6 +145,9 @@
 
                [Test]
                [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+#if !NET_2_0
+               [ExpectedException (typeof (SecurityException))]
+#endif
                public void StackTrace_StackFrameConstructor ()
                {
                        StackTrace st = new StackTrace (new StackFrame ());
@@ -141,6 +156,9 @@
 
                [Test]
                [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+#if !NET_2_0
+               [ExpectedException (typeof (SecurityException))]
+#endif
                [Category ("NotWorking")]
                public void StackTrace_ThreadBoolConstructor ()
                {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to