Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Consolidate AssemblyTests, AssemblyNameTests, MethodInfoTests fixtures within System.Reflection location #33101

Merged
merged 2 commits into from
Nov 2, 2018

Conversation

MaximLipnin
Copy link
Contributor

It's a continuation of work done in #32738

The following fixtures were merged/moved to System.Reflection location:

  • AssemblyNameTests
  • AssemblyTests (with AssemblyTests_GetType and AssemblyCustomAttributeTest)
  • AssemblyNetCoreAppTests
  • MethodInfoTests

/cc @marek-safar

Test methods mapping
System.Runtime System.Reflection
AssemblyNameTests
Verify_CultureName() Verify_CultureName()
Verify_CodeBase() Verify_CodeBase()
Verify_EscapedCodeBase() Verify_EscapedCodeBase()
Verify_HashAlgorithm() Verify_HashAlgorithm()
Verify_VersionCompatibility Verify_VersionCompatibility
Clone() Clone()
GetAssemblyName() GetAssemblyName()
GetAssemblyName_LockedFile() GetAssemblyName_LockedFile()
ReferenceMatchesDefinition(AssemblyName a1, AssemblyName a2, bool expected) ReferenceMatchesDefinition(AssemblyName a1, AssemblyName a2, bool expected)
AssemblyTests
Equality(Assembly assembly1, Assembly assembly2, bool expected) Equality(Assembly assembly1, Assembly assembly2, bool expected)
GetAssembly_Nullery() GetAssembly_Nullery()
GetAssembly(Assembly assembly1, Assembly assembly2, bool expected) GetAssembly(Assembly assembly1, Assembly assembly2, bool expected)
GetCallingAssembly(Assembly assembly1, Assembly assembly2, bool expected) GetCallingAssembly(Assembly assembly1, Assembly assembly2, bool expected)
GetExecutingAssembly() GetExecutingAssembly()
GetSatelliteAssemblyNeg() GetSatelliteAssemblyNeg()
AssemblyLoadFromString() AssemblyLoadFromString()
AssemblyLoadFromStringNeg() AssemblyLoadFromStringNeg()
AssemblyLoadFromBytes() AssemblyLoadFromBytes()
AssemblyLoadFromBytesNeg() AssemblyLoadFromBytesNeg()
ssemblyLoadFromBytesWithSymbols() ssemblyLoadFromBytesWithSymbols()
AssemblyReflectionOnlyLoadFromString() AssemblyReflectionOnlyLoadFromString()
AssemblyReflectionOnlyLoadFromBytes() AssemblyReflectionOnlyLoadFromBytes()
AssemblyReflectionOnlyLoadFromNeg() AssemblyReflectionOnlyLoadFromNeg()
etModules_GetModule(Assembly assembly) etModules_GetModule(Assembly assembly)
GetLoadedModules() GetLoadedModules()
CreateInstance(Assembly assembly, string typeName, BindingFlags bindingFlags, Type expectedType) CreateInstanceWithBindingFlags(Assembly assembly, string typeName, BindingFlags bindingFlags, Type expectedType)
CreateInstance_Invalid(string typeName, Type exceptionType) CreateInstance_Invalid(string typeName, Type exceptionType)
GetManifestResourceStream() GetManifestResourceStream(string resource, bool exists)
Test_GlobalAssemblyCache() GlobalAssemblyCache()
Test_HostContext() HostContext()
Test_IsFullyTrusted() IsFullyTrusted()
SecurityRuleSet_Netcore() Test_SecurityRuleSet_Netcore()
Test_SecurityRuleSet_Netfx() SecurityRuleSet_Netfx()
Test_LoadFile() LoadFile()
LoadFile_NullPath_Netcore_ThrowsArgumentNullException() LoadFile_NullPath_Netcore_ThrowsArgumentNullException()
LoadFile_NoSuchPath_ThrowsArgumentException() LoadFile_NoSuchPath_ThrowsArgumentException()
Test_LoadFromUsingHashValue_Netcore() LoadFromUsingHashValue_Netcore()
Test_LoadFromUsingHashValue_Netfx() LoadFromUsingHashValue_Netfx()
Test_LoadModule_Netcore() LoadModule_Netcore()
Test_LoadModule_Netfx() LoadModule_Netfx()
Test_LoadWithPartialName() LoadWithPartialName()
LoadFrom_SamePath_ReturnsEqualAssemblies() LoadFrom_SamePath_ReturnsEqualAssemblies()
LoadFrom_SameIdentityAsAssemblyWithDifferentPath_ReturnsEqualAssemblies() LoadFrom_SameIdentityAsAssemblyWithDifferentPath_ReturnsEqualAssemblies()
LoadFrom_NullAssemblyFile_ThrowsArgumentNullException() LoadFrom_NullAssemblyFile_ThrowsArgumentNullException()
LoadFrom_EmptyAssemblyFile_ThrowsArgumentException() LoadFrom_EmptyAssemblyFile_ThrowsArgumentException()
LoadFrom_NoSuchFile_ThrowsFileNotFoundException() LoadFrom_NoSuchFile_ThrowsFileNotFoundException()
UnsafeLoadFrom_SamePath_ReturnsEqualAssemblies() UnsafeLoadFrom_SamePath_ReturnsEqualAssemblies()
LoadFrom_WithHashValue_NetCoreCore_ThrowsNotSupportedException() LoadFrom_WithHashValue_NetCoreCore_ThrowsNotSupportedException()
GetFile() GetFile()
GetFiles() GetFiles()
AssemblyTests_GetType  
AssemblyGetTypeNoQualifierAllowed() GetType_NoQualifierAllowed()
AssemblyGetTypeDoesntSearchMscorlib() GetType_DoesntSearchMscorlib()
AssemblyGetTypeDefaultsToItself() GetType_DefaultsToItself()
AssemblyCustomAttributeTest  
Test_Int32AttrSimple() GetCustomAttributesData(Type attrType)
Test_Int64Attr() GetCustomAttributesData(Type attrType)
Test_StringAttr() GetCustomAttributesData(Type attrType)
Test_EnumAttr() GetCustomAttributesData(Type attrType)
Test_TypeAttr() GetCustomAttributesData(Type attrType)
Test_CompilationRelaxationsAttr() GetCustomAttributesData(Type attrType)
Test_AssemblyIdentityAttr() GetCustomAttributesData(Type attrType)
Test_AssemblyDescriptionAttribute() GetCustomAttributesData(Type attrType)
Test_AssemblyCompanyAttribute() GetCustomAttributesData(Type attrType)
Test_CLSCompliantAttribute() GetCustomAttributesData(Type attrType)
Test_DebuggableAttribute() GetCustomAttributesData(Type attrType)
Test_SimpleAttribute() GetCustomAttributesData(Type attrType)
MethodInfoTests
TestEquality1(string str1, string str2, bool expected) Equality1(string str1, string str2, bool expected)
TestEquality2(Type sample1, Type sample2, string str1, string str2, bool expected) Equality2(Type sample1, Type sample2, string str1, string str2, bool expected)
AssemblyNetCoreAppTests (moved to System.Reflection)

@MaximLipnin
Copy link
Contributor Author

@dotnet-bot test Linux x64 Release Build

@MaximLipnin
Copy link
Contributor Author

@dotnet-bot test Packaging All Configurations x64 Debug Build

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@stephentoub
Copy link
Member

cc: @steveharter

# Conflicts:
#	src/System.Runtime/tests/System.Runtime.Tests.csproj
@danmoseley
Copy link
Member

@stephentoub good to merge?

@stephentoub
Copy link
Member

good to merge?

From my perspective, yes, but I thought Steve Harter might want to review, too.

@MaximLipnin
Copy link
Contributor Author

@steveharter Could you please take a look?

@marek-safar
Copy link
Contributor

@danmosemsft can we get this merged soon?

@stephentoub stephentoub merged commit c294ec4 into dotnet:master Nov 2, 2018
@weshaggard
Copy link
Member

@MaximLipnin is there any reason you needed to duplicate the ForwardedTypesAssembly and UnloadableAssembly projects? It is causing race conditions in our build see https://github.com/dotnet/corefx/issues/33219. I'm going to remove these and just reference the ones under System.Reflection.

weshaggard added a commit to weshaggard/corefx that referenced this pull request Nov 2, 2018
As part of dotnet#33101 these
assemblies were moved under System.Reflection but weren't
deleted from System.Runtime so this work finishes up the move.
weshaggard added a commit to weshaggard/corefx that referenced this pull request Nov 2, 2018
As part of dotnet#33101 these
assemblies were moved under System.Reflection but weren't
deleted from System.Runtime so this work finishes up the move.
@MaximLipnin
Copy link
Contributor Author

Sorry for inconvenience, seems I forgot to delete those test assemblies from System.Runtime.

EgorBo pushed a commit to EgorBo/corefx that referenced this pull request Nov 4, 2018
stephentoub pushed a commit that referenced this pull request Nov 5, 2018
* Remove duplcated test assemblies from System.Runtime

As part of #33101 these
assemblies were moved under System.Reflection but weren't
deleted from System.Runtime so this work finishes up the move.

* Disable Constructor_String_LoadVersionTest test

Filed https://github.com/dotnet/corefx/issues/33249 to track it.
@MaximLipnin MaximLipnin deleted the dedup_reflection_tests branch November 11, 2018 16:15
@karelz karelz added this to the 3.0 milestone Nov 15, 2018
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…3224)

* Remove duplcated test assemblies from System.Runtime

As part of dotnet/corefx#33101 these
assemblies were moved under System.Reflection but weren't
deleted from System.Runtime so this work finishes up the move.

* Disable Constructor_String_LoadVersionTest test

Filed https://github.com/dotnet/corefx/issues/33249 to track it.


Commit migrated from dotnet/corefx@388455c
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants