dotnet/msbuild

Add explicit tests around CompareAssemblyIdentity implementation

Open

#5 974 ouverte le 16 déc. 2020

Voir sur GitHub
 (0 commentaires) (1 réaction) (0 assignés)C# (1 364 forks)batch import
help wantedtestingtriaged

Métriques du dépôt

Stars
 (5 062 stars)
Métriques de merge PR
 (Merge moyen 11j 7h) (125 PRs mergées en 30 j)

Description

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

Guide contributeur