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

test: add cases for format_location #541

Merged
merged 5 commits into from
Apr 18, 2024

Conversation

Rustin170506
Copy link
Collaborator

Because this function uses a regex, it's better to add some tests to make sure we don't break anything if we want to change the regex.

Copy link
Collaborator

@hds hds left a comment

Choose a reason for hiding this comment

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

This is a great idea, I think it makes sense to test paths from other platform too.

tokio-console/src/state/mod.rs Outdated Show resolved Hide resolved
Because this function uses a regex,
it's better to add some tests to make sure
we don't break anything if we want to change the regex.
Copy link
Collaborator

@hds hds left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

if possible, i would like to remove the conditional compilation from these tests. besides that, this is great! thank you!

tokio-console/src/state/mod.rs Outdated Show resolved Hide resolved
tokio-console/src/state/mod.rs Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

🔢 Self-check (PR reviewed by myself and ready for feedback.)

@Rustin170506 Rustin170506 requested a review from hawkw April 17, 2024 12:20
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

one last suggestion, although it's not a blocker — i'm fine with the current code, but i think separating the tests might be a little nicer.

tokio-console/src/state/mod.rs Outdated Show resolved Hide resolved
@Rustin170506 Rustin170506 enabled auto-merge (squash) April 18, 2024 00:41
@Rustin170506 Rustin170506 merged commit 4d91f5d into tokio-rs:main Apr 18, 2024
17 checks passed
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