Skip to content

Remove implicit cast from ITestResult to TestResult #3503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2020

Conversation

stevenaw
Copy link
Member

@stevenaw stevenaw commented Mar 13, 2020

Relates to #3423

There was an implicit cast in TestResult.AddToXml that could cause exceptions to be thrown when used with custom-derived implementations of ITestResult. This is a short-term fix to avoid the crash, but doesn't address the main point from @CharliePoole here: #3423 (comment)

Copy link
Member

@mikkelbu mikkelbu left a comment

Choose a reason for hiding this comment

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

LGTM. Personally, I also think we should remove the same unnecessary casts in the test projects (both explicit casts and implicit casts in connection with `foreach), just to minimise the confusion. What do @nunit/framework-team think?

EDIT: And we also need an additional review 😄.

@ChrisMaddock
Copy link
Member

Personally, I also think we should remove the same unnecessary casts in the test projects (both explicit casts and implicit casts in connection with `foreach), just to minimise the confusion. What do @nunit/framework-team think?

Absolutely, in my opinion. (Although I'm no longer framework team!)

Thanks for sorting this, @stevenaw!

@ChrisMaddock ChrisMaddock merged commit 5c6789c into nunit:master Apr 5, 2020
@ChrisMaddock ChrisMaddock added this to the 3.13 milestone Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants