Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit ef2fe64

Browse files
committed
Fix FileVersionInfo test for CompanyName
Code coverage highlighted that we had a bug in VerifyVersionInfo where the test for CompanyName was actually testing Comments. Fixing that then highlighted a bug in the test data when compared to the actual native DLL.
1 parent 41b90e6 commit ef2fe64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/System.Diagnostics.FileVersionInfo/tests/FileVersionInfoTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void FileVersionInfo_Normal()
2525
VerifyVersionInfo(Path.Combine(Directory.GetCurrentDirectory(), NativeConsoleAppFileName), new MyFVI()
2626
{
2727
Comments = "",
28-
CompanyName = "This is not a real company name.",
28+
CompanyName = "Microsoft Corporation",
2929
FileBuildPart = 3,
3030
FileDescription = "This is the description for the native console application.",
3131
FileMajorPart = 5,
@@ -217,7 +217,7 @@ private void VerifyVersionInfo(String filePath, MyFVI expected)
217217
{
218218
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(filePath);
219219
TestStringProperty("Comments", fvi.Comments, expected.Comments);
220-
TestStringProperty("CompanyName", fvi.Comments, expected.Comments);
220+
TestStringProperty("CompanyName", fvi.CompanyName, expected.CompanyName);
221221
TestProperty<int>("FileBuildPart", fvi.FileBuildPart, expected.FileBuildPart);
222222
TestStringProperty("FileDescription", fvi.FileDescription, expected.FileDescription);
223223
TestProperty<int>("FileMajorPart", fvi.FileMajorPart, expected.FileMajorPart);

0 commit comments

Comments
 (0)