@@ -44,9 +44,7 @@ public void RelativeSearchPath_Is_Null()
4444 }
4545
4646 [ Fact ]
47- [ SkipOnPlatform ( TestPlatforms . Browser , "throws pNSE" ) ]
48- [ ActiveIssue ( "https://github.com/dotnet/runtime/issues/49868" , TestPlatforms . Android ) ]
49- [ ActiveIssue ( "https://github.com/dotnet/runtime/issues/36896" , TestPlatforms . iOS | TestPlatforms . tvOS | TestPlatforms . MacCatalyst ) ]
47+ [ SkipOnPlatform ( TestPlatforms . Browser | TestPlatforms . Android | TestPlatforms . iOS | TestPlatforms . tvOS | TestPlatforms . MacCatalyst , "The dotnet sdk will not be available on these platforms" ) ]
5048 public void TargetFrameworkTest ( )
5149 {
5250 const int ExpectedExitCode = 0 ;
@@ -800,9 +798,9 @@ public static void GetPermissionSet()
800798 }
801799
802800 [ Theory ]
803- [ ActiveIssue ( "https://github.com/dotnet/runtime/issues/34030" , TestPlatforms . Linux | TestPlatforms . Browser | TestPlatforms . Android , TargetFrameworkMonikers . Netcoreapp , TestRuntimes . Mono ) ]
804- [ MemberData ( nameof ( TestingCreateInstanceFromObjectHandleData ) ) ]
801+ [ ActiveIssue ( "https://github.com/dotnet/runtime/issues/34030" , TestPlatforms . Linux | TestPlatforms . Browser , TargetFrameworkMonikers . Netcoreapp , TestRuntimes . Mono ) ]
805802 [ ActiveIssue ( "https://github.com/dotnet/runtime/issues/36896" , TestPlatforms . iOS | TestPlatforms . tvOS | TestPlatforms . MacCatalyst ) ]
803+ [ MemberData ( nameof ( TestingCreateInstanceFromObjectHandleData ) ) ]
806804 public static void TestingCreateInstanceFromObjectHandle ( string physicalFileName , string assemblyFile , string type , string returnedFullNameType , Type exceptionType )
807805 {
808806 ObjectHandle oh = null ;
@@ -838,18 +836,29 @@ public static void TestingCreateInstanceFromObjectHandle(string physicalFileName
838836 Assert . True ( File . Exists ( physicalFileName ) ) ;
839837 }
840838
841- public static TheoryData < string , string , string , string , Type > TestingCreateInstanceFromObjectHandleData => new TheoryData < string , string , string , string , Type >
839+ public static IEnumerable < object [ ] > TestingCreateInstanceFromObjectHandleData ( )
842840 {
841+ Type exceptionType ;
842+
843+ if ( PlatformDetection . IsCaseSensitiveOS && PlatformDetection . IsMonoRuntime )
844+ {
845+ exceptionType = typeof ( FileNotFoundException ) ;
846+ }
847+ else
848+ {
849+ exceptionType = typeof ( TypeLoadException ) ;
850+ }
851+
843852 // string physicalFileName, string assemblyFile, string typeName, returnedFullNameType, expectedException
844- { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PublicClassSample" , "AssemblyResolveTestApp.PublicClassSample" , null } ,
845- { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.publicclasssample" , "AssemblyResolveTestApp.PublicClassSample" , typeof ( TypeLoadException ) } ,
853+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PublicClassSample" , "AssemblyResolveTestApp.PublicClassSample" , null } ;
854+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.publicclasssample" , "AssemblyResolveTestApp.PublicClassSample" , exceptionType } ;
846855
847- { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PrivateClassSample" , "AssemblyResolveTestApp.PrivateClassSample" , null } ,
848- { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.privateclasssample" , "AssemblyResolveTestApp.PrivateClassSample" , typeof ( TypeLoadException ) } ,
856+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PrivateClassSample" , "AssemblyResolveTestApp.PrivateClassSample" , null } ;
857+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.privateclasssample" , "AssemblyResolveTestApp.PrivateClassSample" , exceptionType } ;
849858
850- { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PublicClassNoDefaultConstructorSample" , "AssemblyResolveTestApp.PublicClassNoDefaultConstructorSample" , typeof ( MissingMethodException ) } ,
851- { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.publicclassnodefaultconstructorsample" , "AssemblyResolveTestApp.PublicClassNoDefaultConstructorSample" , typeof ( TypeLoadException ) }
852- } ;
859+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PublicClassNoDefaultConstructorSample" , "AssemblyResolveTestApp.PublicClassNoDefaultConstructorSample" , typeof ( MissingMethodException ) } ;
860+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.publicclassnodefaultconstructorsample" , "AssemblyResolveTestApp.PublicClassNoDefaultConstructorSample" , exceptionType } ;
861+ }
853862
854863 [ Theory ]
855864 [ MemberData ( nameof ( TestingCreateInstanceObjectHandleData ) ) ]
@@ -901,7 +910,7 @@ public static void TestingCreateInstanceObjectHandle(string assemblyName, string
901910 } ;
902911
903912 [ Theory ]
904- [ ActiveIssue ( "https://github.com/dotnet/runtime/issues/34030" , TestPlatforms . Linux | TestPlatforms . Browser | TestPlatforms . Android , TargetFrameworkMonikers . Netcoreapp , TestRuntimes . Mono ) ]
913+ [ ActiveIssue ( "https://github.com/dotnet/runtime/issues/34030" , TestPlatforms . Linux | TestPlatforms . Browser , TargetFrameworkMonikers . Netcoreapp , TestRuntimes . Mono ) ]
905914 [ MemberData ( nameof ( TestingCreateInstanceFromObjectHandleFullSignatureData ) ) ]
906915 [ ActiveIssue ( "https://github.com/dotnet/runtime/issues/36896" , TestPlatforms . iOS | TestPlatforms . tvOS | TestPlatforms . MacCatalyst ) ]
907916 public static void TestingCreateInstanceFromObjectHandleFullSignature ( string physicalFileName , string assemblyFile , string type , bool ignoreCase , BindingFlags bindingAttr , Binder binder , object [ ] args , CultureInfo culture , object [ ] activationAttributes , string returnedFullNameType )
@@ -919,14 +928,17 @@ public static IEnumerable<object[]> TestingCreateInstanceFromObjectHandleFullSig
919928 {
920929 // string physicalFileName, string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, returnedFullNameType
921930 yield return new object [ ] { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PublicClassSample" , false , BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 0 ] , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PublicClassSample" } ;
922- yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.publicclasssample" , true , BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 0 ] , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PublicClassSample" } ;
923931 yield return new object [ ] { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PublicClassSample" , false , BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 1 ] { 1 } , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PublicClassSample" } ;
924- yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.publicclasssample" , true , BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 1 ] { 1 } , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PublicClassSample" } ;
925-
926932 yield return new object [ ] { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PrivateClassSample" , false , BindingFlags . NonPublic | BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 0 ] , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PrivateClassSample" } ;
927- yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.privateclasssample" , true , BindingFlags . NonPublic | BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 0 ] , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PrivateClassSample" } ;
928933 yield return new object [ ] { "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.dll" , "AssemblyResolveTestApp.PrivateClassSample" , false , BindingFlags . NonPublic | BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 1 ] { 1 } , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PrivateClassSample" } ;
929- yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.privateclasssample" , true , BindingFlags . NonPublic | BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 1 ] { 1 } , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PrivateClassSample" } ;
934+
935+ if ( PlatformDetection . IsCaseInsensitiveOS )
936+ {
937+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.publicclasssample" , true , BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 0 ] , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PublicClassSample" } ;
938+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.publicclasssample" , true , BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 1 ] { 1 } , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PublicClassSample" } ;
939+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.privateclasssample" , true , BindingFlags . NonPublic | BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 0 ] , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PrivateClassSample" } ;
940+ yield return new object [ ] { "AssemblyResolveTestApp.dll" , "assemblyresolvetestapp.dll" , "assemblyresolvetestapp.privateclasssample" , true , BindingFlags . NonPublic | BindingFlags . Public | BindingFlags . Instance , Type . DefaultBinder , new object [ 1 ] { 1 } , CultureInfo . InvariantCulture , null , "AssemblyResolveTestApp.PrivateClassSample" } ;
941+ }
930942 }
931943
932944 [ Theory ]
0 commit comments