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

chore: Improved test assertion style for better readability #262

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

defiberrys
Copy link

I replaced assert!(expected == actual) with assert_eq!(expected, actual) in the test. While both work, assert_eq! is more idiomatic in Rust as it provides better output for debugging by automatically displaying the values when the assertion fails.

p.s. Change improves the readability and overall quality of the tests.

Improved test assertion style for better readability and debugging
@0xMochan
Copy link
Contributor

Hello, thanks for this PR! This will not got merged until all of our CI passes. it also might be apt to rebase with main even if there are no conflicts, thanks!

There are also a lot of places where we could use assert_eq so perhaps this PR could handle that too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants