Skip to content
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

Enable nullable on ObjectModel #3793

Merged
merged 4 commits into from
Jun 22, 2022

Conversation

Evangelink
Copy link
Member

@Evangelink Evangelink commented Jun 21, 2022

Contributes to AB#1549371

@Evangelink Evangelink force-pushed the enable-nullable-object-model branch from 82f4eb6 to 57d13e9 Compare June 22, 2022 11:12
@Evangelink Evangelink merged commit b58c1ce into microsoft:main Jun 22, 2022
@Evangelink Evangelink deleted the enable-nullable-object-model branch June 23, 2022 06:39
@@ -22,15 +20,15 @@ public interface ITestExecutor
/// <param name="tests">Tests to be run.</param>
/// <param name="runContext">Context to use when executing the tests.</param>
/// <param param name="frameworkHandle">Handle to the framework to record results and to do framework operations.</param>
void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, IFrameworkHandle frameworkHandle);
void RunTests(IEnumerable<TestCase>? tests, IRunContext? runContext, IFrameworkHandle? frameworkHandle);
Copy link

@alexrp alexrp Aug 12, 2022

Choose a reason for hiding this comment

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

@Evangelink I just updated to v17.3.0 of Microsoft.TestPlatform.ObjectModel and got nullable errors due to the annotations on these two RunTests methods.

Are they actually correct? I've looked at implementations both in this repo and the wild and no one seems to expect any of these parameters to ever be null.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @alexrp, thanks for raising this. I am just coming back from vacation and I will look into it this week.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looking at mstest, xunit and nunit, it seems that tests cannot be null but runContext can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants