-
Notifications
You must be signed in to change notification settings - Fork 193
Convert Data/DataIO Tests to swift-testing #1363
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
base: main
Are you sure you want to change the base?
Conversation
b0c0bca
to
d121864
Compare
@@ -893,6 +901,47 @@ private struct StringTests { | |||
#expect(result == expected) | |||
} | |||
} | |||
|
|||
@Test func deletingLastPathComponent() { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
d121864
to
2dede55
Compare
@swift-ci please test |
@swift-ci please test |
@swift-ci please test |
Continued cherry-picks (with edits) of the initial swift-testing adoption for all of our data-related tests