Skip to content

Upgrade to xunit 2.3.0-beta4 - #258

Merged
natemcmaster merged 1 commit into
dotnet:devfrom
natemcmaster:xunit
Aug 15, 2017
Merged

Upgrade to xunit 2.3.0-beta4#258
natemcmaster merged 1 commit into
dotnet:devfrom
natemcmaster:xunit

Conversation

@natemcmaster

@natemcmaster natemcmaster commented Aug 15, 2017

Copy link
Copy Markdown

Required a few fixed because of new issues discovered by xunit.analyzers.

https://github.com/aspnet/Coherence-Signed/issues/652

Comment thread build/dependencies.props Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make changes like this now? Shouldn't this file stay mostly unchanged until the repo is switched to lineups?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lineup PR is already queued in my local changes. This one bled over from it as I'm doing the work as incrementally as possible. I can remove it for the sake of purity.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this change?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what was triggering the analyzer exception. They already have a PR to fix it: xunit/xunit.analyzers#77, but it's easy for us to just workaround it by using braces instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required by xunit.analyzers?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW - most of these are just warnings, like this one. But because we have TreatWarningsAsErrors on, we have to fix or suppress.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mikeharder. Glad to still be causing problems for .Net, even if indirectly :)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @marcind. The problems were caused by us, you're helping fix them :).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why suppress instead of removing the unused parameter?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the parameter causes xunit to fail at runtime:

System.InvalidOperationException : The test method expected 1 parameter value, but 2 parameter values were provided.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course the shape of the MemberData needs to match the parameters, but I think it would be cleaner to remove the expected values from the member data, rather than supressing the xunit warning. There is already a FilledStringValues TheoryData, but it has different keys than FilledStringValuesWithExpected.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've remove it. We have other member data that provide the same test coverage, FilledStringValues, DefaultOrNullStringValues, and EmptyStringValues

@natemcmaster
natemcmaster merged commit d077860 into dotnet:dev Aug 15, 2017
@natemcmaster
natemcmaster deleted the xunit branch August 15, 2017 23:42
@ghost ghost locked as resolved and limited conversation to collaborators May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants