Skip to content

Conversation

@plemarquand
Copy link
Contributor

When running a swift-testing test that takes arguments the results are added to the Test Explorer showing their pass/fail status. At this time these tests cannot be run with a specific argument so these tests should not be marked as runnable. This prevents the "Run", "Debug" and "Coverage" buttons from appearing on the test items in the explorer.

Issue: #1147

When running a swift-testing test that takes arguments the results are
added to the Test Explorer showing their pass/fail status. At this time
these tests cannot be run with a specific argument so these tests should
not be marked as runnable. This prevents the "Run", "Debug" and
"Coverage" buttons from appearing on the test items in the explorer.

Issue: swiftlang#1147
@plemarquand plemarquand force-pushed the no-runnable-swift-testing-arg branch from 41660c3 to f7934a2 Compare October 21, 2024 13:38
@plemarquand
Copy link
Contributor Author

To verify:

  • Create a swift-testing test with argument: @Test(arguments: [1,2,3]) func test(_ arg: Int) {}
  • Run it
  • Check the test explorer and see 1,2,3 as entries in the list, verify that on hover they don't have the buttons to run them (while the parent 'test' entry does.

Copy link
Contributor

@award999 award999 left a comment

Choose a reason for hiding this comment

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

post-merge is there a test we can add here?

@plemarquand plemarquand merged commit ee88108 into swiftlang:main Oct 22, 2024
7 of 8 checks passed
@plemarquand plemarquand deleted the no-runnable-swift-testing-arg branch October 22, 2024 15:04
@plemarquand
Copy link
Contributor Author

@award999 Verified this behaviour with an existing test in #1158

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.

2 participants