Skip to content

Commit 93414f6

Browse files
committed
make sure that when the module is not found by the test, the test runner prints available module paths
1 parent b1e9b11 commit 93414f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libraries/System.Diagnostics.Process/tests/ProcessModuleTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ public void LongModuleFileNamesAreSupported()
123123
Assembly loaded = Assembly.LoadFile(longNamePath);
124124
Assert.Equal(longNamePath, loaded.Location);
125125

126-
ProcessModule[] longPathModules = Process.GetCurrentProcess().Modules.Cast<ProcessModule>().Where(module => module.FileName.Contains(libraryName)).ToArray();
127-
Assert.Contains(longPathModules, module => module.FileName == longNamePath);
126+
string[] modulePaths = Process.GetCurrentProcess().Modules.Cast<ProcessModule>().Select(module => module.FileName).ToArray();
127+
Assert.Contains(longNamePath, modulePaths);
128128
}
129129
}
130130
}

0 commit comments

Comments
 (0)