Skip to content

Conversation

@jmschonfeld
Copy link
Contributor

Continued cherry-picks (with edits) of the initial swift-testing adoption for all of our data-related tests

@jmschonfeld jmschonfeld force-pushed the swift-testing/data-tests branch 2 times, most recently from b0c0bca to d121864 Compare June 17, 2025 21:56
@jmschonfeld jmschonfeld requested a review from jrflat June 17, 2025 21:56
}
}

@Test func deletingLastPathComponent() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for consolidating these!

isEmpty = span.isEmpty
#expect(!isEmpty)
count = span.count
#expect(count == count)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a different variable name (or source.count) would be good :)

Copy link
Contributor Author

@jmschonfeld jmschonfeld Jun 18, 2025

Choose a reason for hiding this comment

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

Oh good call, thanks this is probably a typo on my part 🙂 - likely a find and replace error while extracting the span calls out of the expectations (which sadly don't work because #expect can't capture the non escapable type in its escaping closure)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It turns out that span.count in an expectation is fine, so I removed the extra variables. span.isEmpty doesn't work, so I've left the isEmpty variables and filed swiftlang/swift-testing#1164 about the discrepancy

@jmschonfeld jmschonfeld force-pushed the swift-testing/data-tests branch from d121864 to 2dede55 Compare June 18, 2025 16:14
@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@jmschonfeld jmschonfeld merged commit 6078b98 into swiftlang:main Jun 22, 2025
15 checks passed
@jmschonfeld jmschonfeld deleted the swift-testing/data-tests branch June 22, 2025 21:14
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