Bugzilla – Attachment 317224 Details for
Bug 537414
mcs prefers corlib types to assembly types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
test case from (uncommitted) moonlight unit tests
m78eaafb8.txt (text/plain), 1.50 KB, created by
Sebastien Pouliot
on 2009-09-08 14:39:43 UTC
(
hide
)
Description:
test case from (uncommitted) moonlight unit tests
Filename:
MIME Type:
Creator:
Sebastien Pouliot
Created:
2009-09-08 14:39:43 UTC
Size:
1.50 KB
patch
obsolete
>Index: security/MiscTest.cs >=================================================================== >--- security/MiscTest.cs (revision 141518) >+++ security/MiscTest.cs (working copy) >@@ -27,11 +27,23 @@ > // > > using System; >+using System.Security; >+using System.Runtime.CompilerServices; > using System.Windows; > > using Mono.Moonlight.UnitTesting; > using Microsoft.VisualStudio.TestTools.UnitTesting; > >+// this icall exists on both mono and sl >+// note: CSC prefer this type when compiling this assembly, while SMCS prefers the original type from mscorlib.dll >+namespace System.Runtime.CompilerServices { >+ public class RuntimeHelpers { >+ >+ [MethodImpl (MethodImplOptions.InternalCall)] >+ public static extern object GetObjectValue (object obj); >+ } >+} >+ > namespace MoonTest.Security { > > [TestClass] >@@ -66,6 +78,24 @@ > AppDomainManager [,] adm = new AppDomainManager [0, 0]; > Assert.IsNotNull (adm, "AppDomainManager[,]"); > } >+ >+ [TestMethod] >+ [ExpectedException (typeof (SecurityException))] >+ [MoonlightBug ("smcs compiles this as using mscorlib, while csc compile this using the newly defined type")] >+ public void RedefineNonCriticalInternalCall () >+ { >+ RuntimeHelpers.GetObjectValue (null); >+ } >+ >+ [MethodImpl (MethodImplOptions.InternalCall)] >+ static extern void NonExistingInternalCall (); >+ >+ [TestMethod] >+ [ExpectedException (typeof (SecurityException))] >+ public void DefineNonExistingInternalCall () >+ { >+ NonExistingInternalCall (); >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 537414
: 317224