Author: spouliot
Date: 2005-04-27 10:54:11 -0400 (Wed, 27 Apr 2005)
New Revision: 43660

Modified:
   trunk/mcs/class/corlib/Test/System.Security.Permissions/ChangeLog
   
trunk/mcs/class/corlib/Test/System.Security.Permissions/IBuiltInPermissionTest.cs
   
trunk/mcs/class/corlib/Test/System.Security.Permissions/IsolatedStorageFilePermissionTest.cs
   
trunk/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionTest.cs
   
trunk/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs
Log:
2005-04-27  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * IBuiltInPermissionTest.cs: Fixed token index numbers wrt beta2.
        * IsolatedStorageFilePermissionTest.cs: Change containment to match 
        beta2.
        * UrlIdentityPermissionTest.cs: Fixed test case for 2.0.
        * ZoneIdentityPermissionAttributeTest.cs: Tag unrestricted test as
        NotWorking.



Modified: trunk/mcs/class/corlib/Test/System.Security.Permissions/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Security.Permissions/ChangeLog   
2005-04-27 14:50:10 UTC (rev 43659)
+++ trunk/mcs/class/corlib/Test/System.Security.Permissions/ChangeLog   
2005-04-27 14:54:11 UTC (rev 43660)
@@ -1,3 +1,12 @@
+2005-04-27  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * IBuiltInPermissionTest.cs: Fixed token index numbers wrt beta2.
+       * IsolatedStorageFilePermissionTest.cs: Change containment to match 
+       beta2.
+       * UrlIdentityPermissionTest.cs: Fixed test case for 2.0.
+       * ZoneIdentityPermissionAttributeTest.cs: Tag unrestricted test as
+       NotWorking.
+
 2005-03-31  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * FileIOPermissionTest.cs: Added a test case for a filename starting

Modified: 
trunk/mcs/class/corlib/Test/System.Security.Permissions/IBuiltInPermissionTest.cs
===================================================================
--- 
trunk/mcs/class/corlib/Test/System.Security.Permissions/IBuiltInPermissionTest.cs
   2005-04-27 14:50:10 UTC (rev 43659)
+++ 
trunk/mcs/class/corlib/Test/System.Security.Permissions/IBuiltInPermissionTest.cs
   2005-04-27 14:54:11 UTC (rev 43660)
@@ -4,7 +4,7 @@
 // Author:
 //     Sebastien Pouliot  <[EMAIL PROTECTED]>
 //
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -176,20 +176,18 @@
                }
 
 #if NET_2_0
-               // FIXME: where's #15 ???
-
                [Test]
                public void GacIdentity ()
                {
                        IPermission p = (IPermission) new GacIdentityPermission 
(PermissionState.None);
-                       Assert.AreEqual (16, GetTokenIndex (p));
+                       Assert.AreEqual (15, GetTokenIndex (p));
                }
 
                [Test]
                public void KeyContainer ()
                {
                        IPermission p = (IPermission)new KeyContainerPermission 
(PermissionState.None);
-                       Assert.AreEqual (17, GetTokenIndex (p));
+                       Assert.AreEqual (16, GetTokenIndex (p));
                }
 #endif
        }

Modified: 
trunk/mcs/class/corlib/Test/System.Security.Permissions/IsolatedStorageFilePermissionTest.cs
===================================================================
--- 
trunk/mcs/class/corlib/Test/System.Security.Permissions/IsolatedStorageFilePermissionTest.cs
        2005-04-27 14:50:10 UTC (rev 43659)
+++ 
trunk/mcs/class/corlib/Test/System.Security.Permissions/IsolatedStorageFilePermissionTest.cs
        2005-04-27 14:54:11 UTC (rev 43660)
@@ -204,12 +204,12 @@
                        small.UsageAllowed = 
IsolatedStorageContainment.ApplicationIsolationByUser;
                        small.UserQuota = 3;
                        union = (IsolatedStorageFilePermission)union.Union 
(small);
-                       Assert.AreEqual 
(IsolatedStorageContainment.ApplicationIsolationByUser, union.UsageAllowed, 
"ApplicationIsolationByUser");
+                       Assert.AreEqual 
(IsolatedStorageContainment.AssemblyIsolationByUser, union.UsageAllowed, 
"ApplicationIsolationByUser");
                        Assert.AreEqual (3, union.UserQuota, "3");
                        Assert.IsFalse (union.IsUnrestricted (), 
"IsUnrestricted-3");
                        Assert.IsTrue (small.IsSubsetOf (union), "IsSubset-3a");
                        Assert.IsTrue (empty.IsSubsetOf (union), "IsSubset-3b");
-                       Assert.IsTrue (union.IsSubsetOf (small), "IsSubset-3c");
+                       Assert.IsFalse (union.IsSubsetOf (small), 
"IsSubset-3c");
                        intersect = 
(IsolatedStorageFilePermission)union.Intersect (small);
                        Assert.AreEqual (small.UsageAllowed, 
intersect.UsageAllowed, "Intersect-UsageAllowed-3");
                        Assert.AreEqual (small.UserQuota, intersect.UserQuota, 
"Intersect-UserQuota-3");

Modified: 
trunk/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionTest.cs
===================================================================
--- 
trunk/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionTest.cs
        2005-04-27 14:50:10 UTC (rev 43659)
+++ 
trunk/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionTest.cs
        2005-04-27 14:54:11 UTC (rev 43660)
@@ -4,7 +4,7 @@
 // Author:
 //     Sebastien Pouliot  <[EMAIL PROTECTED]>
 //
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -137,19 +137,23 @@
                        }
                }
 
+#if NET_2_0
                [Test]
-#if NET_2_0
-               // this was working in beta1 but is broken in Nov CTP
-               [ExpectedException (typeof (NullReferenceException))]
-               [Category ("NotWorking")]
+               public void Url_Null ()
+               {
+                       UrlIdentityPermission uip = new UrlIdentityPermission 
(PermissionState.None);
+                       uip.Url = null;
+                       Assert.AreEqual (String.Empty, uip.Url, "Url");
+               }
 #else
+               [Test]
                [ExpectedException (typeof (ArgumentNullException))]
-#endif
                public void Url_Null ()
                {
                        UrlIdentityPermission uip = new UrlIdentityPermission 
(PermissionState.None);
                        uip.Url = null;
                }
+#endif
 
                [Test]
                public void Copy ()

Modified: 
trunk/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs
===================================================================
--- 
trunk/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs
      2005-04-27 14:50:10 UTC (rev 43659)
+++ 
trunk/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs
      2005-04-27 14:54:11 UTC (rev 43660)
@@ -122,8 +122,12 @@
                        Assert.AreEqual (a.ToString (), a.TypeId.ToString (), 
"TypeId");
                }
 
-               [Test]
-               [ExpectedException (typeof (ArgumentException))]
+               [Test]
+#if NET_2_0
+               [Category ("NotWorking")]
+#else
+               [ExpectedException (typeof (ArgumentException))]
+#endif
                public void Unrestricted () 
                {
                        ZoneIdentityPermissionAttribute a = new 
ZoneIdentityPermissionAttribute (SecurityAction.Assert);

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

Reply via email to