Author: spouliot
Date: 2005-03-24 19:35:30 -0500 (Thu, 24 Mar 2005)
New Revision: 42242

Modified:
   trunk/mono/mono/tests/cas/demand/ChangeLog
   trunk/mono/mono/tests/cas/demand/pinvoke1.cs
   trunk/mono/mono/tests/cas/demand/pinvoke2.cs
   trunk/mono/mono/tests/cas/demand/pinvoke3.cs
Log:
2005-03-24  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * pinvoke1-3.cs: Changed RunningOnMono for RunningOnWindows as it's an
        OS issue not a runtime issue being tested.



Modified: trunk/mono/mono/tests/cas/demand/ChangeLog
===================================================================
--- trunk/mono/mono/tests/cas/demand/ChangeLog  2005-03-24 22:47:50 UTC (rev 
42241)
+++ trunk/mono/mono/tests/cas/demand/ChangeLog  2005-03-25 00:35:30 UTC (rev 
42242)
@@ -1,3 +1,8 @@
+2005-03-24  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * pinvoke1-3.cs: Changed RunningOnMono for RunningOnWindows as it's an
+       OS issue not a runtime issue being tested.
+
 2005-03-10  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * pinvoke1-3.cs: New. Tests that P/Invoking unmanaged methods provoke

Modified: trunk/mono/mono/tests/cas/demand/pinvoke1.cs
===================================================================
--- trunk/mono/mono/tests/cas/demand/pinvoke1.cs        2005-03-24 22:47:50 UTC 
(rev 42241)
+++ trunk/mono/mono/tests/cas/demand/pinvoke1.cs        2005-03-25 00:35:30 UTC 
(rev 42242)
@@ -12,17 +12,17 @@
        [DllImport ("kernel32.dll", SetLastError=true)]
        public static extern uint GetTickCount ();
 
-       static bool RunningOnMono ()
+       static bool RunningOnWindows ()
        {
-               bool mono = (Type.GetType ("Mono.Math.BigInteger") != null); 
-               Console.WriteLine ("Running on {0} runtime...", mono ? "Mono" : 
"Microsoft");
-               return mono;
+               bool win = ((int) Environment.OSVersion.Platform != 128);
+               Console.WriteLine ("Running on {0}...", Environment.OSVersion);
+               return win;
        }
 
        static int Test ()
        {
                try {
-                       uint u = (RunningOnMono ()) ? getuid () : GetTickCount 
();
+                       uint u = (RunningOnWindows () ? GetTickCount () : 
getuid ());
                        Console.WriteLine ("*0* P/Invoke: {0}", u);
                        return 0;
                }

Modified: trunk/mono/mono/tests/cas/demand/pinvoke2.cs
===================================================================
--- trunk/mono/mono/tests/cas/demand/pinvoke2.cs        2005-03-24 22:47:50 UTC 
(rev 42241)
+++ trunk/mono/mono/tests/cas/demand/pinvoke2.cs        2005-03-25 00:35:30 UTC 
(rev 42242)
@@ -14,17 +14,17 @@
        [DllImport ("kernel32.dll", SetLastError=true)]
        public static extern uint GetTickCount ();
 
-       static bool RunningOnMono ()
+       static bool RunningOnWindows ()
        {
-               bool mono = (Type.GetType ("Mono.Math.BigInteger") != null); 
-               Console.WriteLine ("Running on {0} runtime...", mono ? "Mono" : 
"Microsoft");
-               return mono;
+               bool win = ((int) Environment.OSVersion.Platform != 128);
+               Console.WriteLine ("Running on {0}...", Environment.OSVersion);
+               return win;
        }
 
        static int Test ()
        {
                try {
-                       uint u = (RunningOnMono ()) ? getuid () : GetTickCount 
();
+                       uint u = (RunningOnWindows () ? GetTickCount () : 
getuid ());
                        Console.WriteLine ("*1* P/Invoke: {0}", u);
                        return 1;
                }
@@ -38,7 +38,6 @@
                }
        }
 
-       [SecurityPermission (SecurityAction.Deny, UnmanagedCode=true)]
        static int Main ()
        {
                return Test ();

Modified: trunk/mono/mono/tests/cas/demand/pinvoke3.cs
===================================================================
--- trunk/mono/mono/tests/cas/demand/pinvoke3.cs        2005-03-24 22:47:50 UTC 
(rev 42241)
+++ trunk/mono/mono/tests/cas/demand/pinvoke3.cs        2005-03-25 00:35:30 UTC 
(rev 42242)
@@ -13,17 +13,17 @@
        [DllImport ("kernel32.dll", SetLastError=true)]
        public static extern uint GetTickCount ();
 
-       static bool RunningOnMono ()
+       static bool RunningOnWindows ()
        {
-               bool mono = (Type.GetType ("Mono.Math.BigInteger") != null); 
-               Console.WriteLine ("Running on {0} runtime...", mono ? "Mono" : 
"Microsoft");
-               return mono;
+               bool win = ((int) Environment.OSVersion.Platform != 128);
+               Console.WriteLine ("Running on {0}...", Environment.OSVersion);
+               return win;
        }
 
        static int Test ()
        {
                try {
-                       uint u = (RunningOnMono ()) ? getuid () : GetTickCount 
();
+                       uint u = (RunningOnWindows () ? GetTickCount () : 
getuid ());
                        Console.WriteLine ("*1* P/Invoke: {0}", u);
                        return 1;
                }

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

Reply via email to