Skip to content

Commit

Permalink
Tests should permit case-insensitive metadata checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Forgind committed Dec 3, 2020
1 parent cf314ab commit 7077b0e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Tasks.UnitTests/AssemblyDependency/Miscellaneous.cs
Expand Up @@ -3455,7 +3455,7 @@ public void PrimaryFXAssemblyRefIsNotCopyLocal()

Assert.Single(t.ResolvedFiles);
Assert.Equal(Path.Combine(s_myVersion20Path, "System.Data.dll"), t.ResolvedFiles[0].ItemSpec);
Assert.Equal("false", t.ResolvedFiles[0].GetMetadata("CopyLocal"));
Assert.Equal("false", t.ResolvedFiles[0].GetMetadata("CopyLocal"), StringComparer.OrdinalIgnoreCase);
}

/// <summary>
Expand Down Expand Up @@ -3491,7 +3491,7 @@ public void PrivateItemInFrameworksGetsCopyLocalTrue()
t.TargetFrameworkDirectories = new string[] { s_myVersion20Path };
t.SearchPaths = DefaultPaths;
Execute(t);
Assert.Equal(@"true", t.ResolvedFiles[0].GetMetadata("CopyLocal"));
Assert.Equal("true", t.ResolvedFiles[0].GetMetadata("CopyLocal"), StringComparer.OrdinalIgnoreCase);
}

/// <summary>
Expand All @@ -3517,7 +3517,7 @@ public void NoFrameworkDirectoriesStillCopyLocal()
t.TargetFrameworkDirectories = new string[] { };
t.SearchPaths = new string[] { "{RawFileName}" };
Execute(t);
Assert.Equal(@"true", t.ResolvedFiles[0].GetMetadata("CopyLocal"));
Assert.Equal("true", t.ResolvedFiles[0].GetMetadata("CopyLocal"), StringComparer.OrdinalIgnoreCase);
}

/// <summary>
Expand Down Expand Up @@ -4350,7 +4350,7 @@ public void RegressQFE626()
{
if (String.Equals(item.ItemSpec, s_myLibraries_V1_E_EDllPath, StringComparison.OrdinalIgnoreCase))
{
Assert.Equal("false", item.GetMetadata("CopyLocal"));
Assert.Equal("false", item.GetMetadata("CopyLocal"), StringComparer.OrdinalIgnoreCase);
}
}
}
Expand Down Expand Up @@ -4413,12 +4413,12 @@ public void Regress265054()
{
if (String.Equals(item.ItemSpec, s_myLibraries_V1_DDllPath, StringComparison.OrdinalIgnoreCase))
{
Assert.Equal("false", item.GetMetadata("CopyLocal"));
Assert.Equal("false", item.GetMetadata("CopyLocal"), StringComparer.OrdinalIgnoreCase);
}

if (String.Equals(item.ItemSpec, s_myLibraries_V1_E_EDllPath, StringComparison.OrdinalIgnoreCase))
{
Assert.Equal("true", item.GetMetadata("CopyLocal"));
Assert.Equal("true", item.GetMetadata("CopyLocal"), StringComparer.OrdinalIgnoreCase);
}
}
}
Expand Down Expand Up @@ -5350,7 +5350,7 @@ public void Regress435487_FxFileResolvedByHintPathShouldByCopyLocal()
File.Delete(redistFile);
}

Assert.Equal("true", t.ResolvedFiles[0].GetMetadata("CopyLocal")); // "Expected CopyLocal==true."
Assert.Equal("true", t.ResolvedFiles[0].GetMetadata("CopyLocal"), StringComparer.OrdinalIgnoreCase); // "Expected CopyLocal==true."
}

/// <summary>
Expand Down Expand Up @@ -7940,9 +7940,9 @@ public void ForwardRedistRoot()
}

Assert.Equal(3, t.ResolvedFiles.Length); // "Expected three assemblies to be found."
Assert.Equal("true", t.ResolvedFiles[1].GetMetadata("IsRedistRoot"));
Assert.Equal("false", t.ResolvedFiles[0].GetMetadata("IsRedistRoot"));
Assert.Equal("", t.ResolvedFiles[2].GetMetadata("IsRedistRoot"));
Assert.Equal("true", t.ResolvedFiles[1].GetMetadata("IsRedistRoot"), StringComparer.OrdinalIgnoreCase);
Assert.Equal("false", t.ResolvedFiles[0].GetMetadata("IsRedistRoot"), StringComparer.OrdinalIgnoreCase);
Assert.Equal("", t.ResolvedFiles[2].GetMetadata("IsRedistRoot"), StringComparer.OrdinalIgnoreCase);

Assert.Equal("Microsoft-Windows-CLRCoreComp", t.ResolvedFiles[0].GetMetadata("Redist"));
Assert.Equal("Microsoft-Windows-CLRCoreComp", t.ResolvedFiles[1].GetMetadata("Redist"));
Expand Down

0 comments on commit 7077b0e

Please sign in to comment.