Skip to content

Commit

Permalink
bugfix: filtered test cases were run, even if their test results were…
Browse files Browse the repository at this point in the history
…n't registered (#36)
  • Loading branch information
csoltenborn committed Mar 15, 2016
1 parent a07fec8 commit 4ce65bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GoogleTestAdapter/TestAdapter/TestExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ public void RunTests(IEnumerable<string> executables, IRunContext runContext, IF

ISet<string> allTraitNames = GetAllTraitNames(allTestCasesInExecutables);
TestCaseFilter filter = new TestCaseFilter(runContext, allTraitNames, TestEnvironment);
List<TestCase> vsTestCases =
List<TestCase> vsTestCasesToRun =
filter.Filter(allTestCasesInExecutables.Select(DataConversionExtensions.ToVsTestCase)).ToList();
allTestCasesInExecutables =
allTestCasesInExecutables.Where(tc => vsTestCases.Any(vtc => tc.FullyQualifiedName == vtc.FullyQualifiedName)).ToList();
IEnumerable<Model.TestCase> testCasesToRun =
allTestCasesInExecutables.Where(tc => vsTestCasesToRun.Any(vtc => tc.FullyQualifiedName == vtc.FullyQualifiedName)).ToList();

DoRunTests(allTestCasesInExecutables, allTestCasesInExecutables, runContext, frameworkHandle);
DoRunTests(allTestCasesInExecutables, testCasesToRun, runContext, frameworkHandle);
}
catch (Exception e)
{
Expand Down

0 comments on commit 4ce65bf

Please sign in to comment.