Skip to content

Commit 42d636d

Browse files
elinor-fungCopilot
andcommitted
Fix test comments to match actual build mechanism
The Missing and Corrupt assemblies are deleted by the RemoveBindFailureTestAssemblies MSBuild target after build, not by Private=false. Update comments to reflect this. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bdc3496 commit 42d636d

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/libraries/System.Runtime.Loader/tests/TpaLoadFailureTest.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ private static string GetAssemblyPath(string assemblyFileName)
2727
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsCoreCLR), nameof(PlatformDetection.HasAssemblyFiles))]
2828
public void NotFound_ExceptionContainsAssemblyPath()
2929
{
30-
// The Missing assembly is referenced at compile time but not copied to the output
31-
// directory (Private=false), so it will not be found at runtime.
30+
// The Missing assembly is referenced at compile time and listed in deps.json
31+
// (so the host adds it to the TPA list), but the DLL is deleted from the output
32+
// directory by the RemoveBindFailureTestAssemblies MSBuild target after build.
3233
const string assemblyFileName = "System.Runtime.Loader.Test.BindFailure.Missing.dll";
3334
string dllPath = GetAssemblyPath(assemblyFileName);
3435
Assert.False(File.Exists(dllPath), $"Test assembly should not be present at {dllPath}");
@@ -62,8 +63,10 @@ public void Corrupt_ExceptionContainsPathAndHResult()
6263
{
6364
const int COR_E_ASSEMBLYEXPECTED = unchecked((int)0x80131018);
6465

65-
// The Corrupt assembly is referenced at compile time but not copied to the output
66-
// directory (Private=false). We write a corrupt file in its place.
66+
// The Corrupt assembly is referenced at compile time and listed in deps.json
67+
// (so the host adds it to the TPA list), but the DLL is deleted from the output
68+
// directory by the RemoveBindFailureTestAssemblies MSBuild target after build.
69+
// We write a corrupt file in its place.
6770
const string assemblyFileName = "System.Runtime.Loader.Test.BindFailure.Corrupt.dll";
6871
string dllPath = GetAssemblyPath(assemblyFileName);
6972
Assert.False(File.Exists(dllPath), $"Test assembly should not be present at {dllPath}");

0 commit comments

Comments
 (0)