dotnet/msbuild

Add explicit tests around CompareAssemblyIdentity implementation

Open

#5974 aperta il 16 dic 2020

Vedi su GitHub
 (0 commenti) (1 reazione) (0 assegnatari)C# (1364 fork)batch import
help wantedtestingtriaged

Metriche repository

Star
 (5062 star)
Metriche merge PR
 (Merge medio 11g 7h) (125 PR mergiate in 30 g)

Descrizione

Before the .NET Core port, ResolveAssemblyReferences compared assembly identities using a native method call:

https://github.com/Microsoft/msbuild/blob/a939f1547a3f8b91512d0d2d270a8d0f0111e7e7/src/XMakeTasks/NativeMethods.cs#L976-L985

Now, there's a managed implementation that optionally calls that one on Windows:

https://github.com/dotnet/msbuild/blob/a8efaf15afcaf5fce9cb6e1c3b7c94e0c88d804b/src/Tasks/NativeMethods.cs#L1114-L1136

We should have tests that validate that implementation using the native method as a reference. This is a nice unit-testing problem since it's functional and idempotent, so we can probably hit 100% code coverage.

Related: #3930, #5973

Guida contributor