Skip to content

Commit

Permalink
Fix bug in ActiveIssueDiscoverer with condition member names (#5744)
Browse files Browse the repository at this point in the history
In #5376 the logic was copied from the ConditionalFactDiscoverer but this is wrong.
For ActiveIssue we want to _skip_ the test if the condition is true, rather than the other way round.
  • Loading branch information
akoeplinger committed Jul 3, 2020
1 parent 5548f58 commit 46fe554
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitA

if (calleeType != null && conditionMemberNames != null)
{
if (!DiscovererHelpers.Evaluate(calleeType, conditionMemberNames))
if (DiscovererHelpers.Evaluate(calleeType, conditionMemberNames))
{
yield return new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing);
}
}
}
else if (DiscovererHelpers.TestPlatformApplies(platforms) &&
DiscovererHelpers.TestRuntimeApplies(runtimes) &&
DiscovererHelpers.TestFrameworkApplies(frameworks))
Expand Down

0 comments on commit 46fe554

Please sign in to comment.