Skip to content

Commit 23de67d

Browse files
committed
Remove 'namespace removal' login from FindTestcase since that is now done at a root level when running tests.
1 parent f83b676 commit 23de67d

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

GoogleTestAdapter/Core/TestResults/StandardOutputTestResultParser.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -196,24 +196,7 @@ private TestCase FindTestcase(string qualifiedTestname)
196196

197197
public static TestCase FindTestcase(string qualifiedTestname, IList<TestCase> testCasesRun)
198198
{
199-
foreach (TestCase tc in testCasesRun)
200-
{
201-
// If namespace exists then remove it so we can compare the test display names.
202-
// Using just tc.DisplayName does not work for paramaterized test cases.
203-
string fullyQualifiedName = tc.FullyQualifiedName;
204-
int frequency = fullyQualifiedName.Where(x => (x == '.')).Count();
205-
if (frequency > 1)
206-
{
207-
fullyQualifiedName = fullyQualifiedName.Substring(fullyQualifiedName.IndexOf('.') + 1);
208-
}
209-
210-
if (fullyQualifiedName == qualifiedTestname)
211-
{
212-
return tc;
213-
}
214-
}
215-
216-
return null;
199+
return testCasesRun.SingleOrDefault(tc => tc.FullyQualifiedName == qualifiedTestname);
217200
}
218201

219202
public static bool IsRunLine(string line)

0 commit comments

Comments
 (0)