You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No diagnostics are raised by the analyzer despite both these inputs resulting in exactly the same test being run. Somewhat related to #1742, with the major difference being that these tests run just fine without any issues.
The text was updated successfully, but these errors were encountered:
JakeYallop
changed the title
InlineData duplicate detection fails to detect duplicates between implicitly widened types
InlineData duplicate detection fails to detect duplicates between implicitly converted types
Jun 23, 2024
I'm a little torn on whether this should be raised or not, but I've tagged it to be fixed.
The original purpose of the analyzer is to identify when tests are going to end up having the same serialization and therefore only get run once in VSTest.
Here's what it looks like with your original code:
And here's what it looks like when using two ints:
So we do actually run it twice rather than once when the input values are different, even if they eventually get coerced into the same type on the other side.
The reason I'm willing to leave this open is that it's probably the case that the developer made a mistake here (even though in this unusual iteration, they'll both get run anyways). It goes beyond the scope of the original purpose of the analyzer (to help people who have questions about why their test ran once instead of twice), but it feels like a good expansion of value.
Given the following code:
No diagnostics are raised by the analyzer despite both these inputs resulting in exactly the same test being run. Somewhat related to #1742, with the major difference being that these tests run just fine without any issues.
The text was updated successfully, but these errors were encountered: