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

Share snapshot callback and improve its output #1581

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

JakeWharton
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If no name is provided a counter is implicitly used.

private let testName: String
private let fileName: StaticString

init(named testName: String, _ fileName: StaticString = #file) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't quite understand how it works, but this default is evaluated in the context of the caller which is very different from how Kotlin does it. As a result, we get to capture the name of the calling file automatically.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@JakeWharton JakeWharton merged commit 169383b into trunk Oct 13, 2023
8 checks passed
@JakeWharton JakeWharton deleted the jw.share.2023-10-12 branch October 13, 2023 19:18
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