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

Extend tests in gpio::check_pin_groups() #817

Merged
merged 2 commits into from
Jul 21, 2024

Conversation

hfly0
Copy link
Contributor

@hfly0 hfly0 commented Jul 15, 2024

I was scrolling through the code and I thought I could fix this while I was at it. I just extended the tests in gpio.rs a tiny bit.

Changes

Replaced the uses of assert!(x == y) with assert_eq!(), so it was more clear which pin was wrong when tests failed.

Also added checks for group.set(...), group.set_u32(...), on top of the existing group.toggle()

Switch hex numbers to binary to make it easier to read the bits.

Replaced the uses of `assert!(x == y)` with `assert_eq!()`, so it was more clear which pin was wrong when tests failed.

Also added checks for `group.set(...)`, `group.set_u32(...)`, on top of the existing `group.toggle()`

Switch hex numbers to binary to make it easier to read the bits

Signed-off-by: hfly0 <[email protected]>
@thejpster
Copy link
Member

@hfly0 would you mind runnning cargo fmt on your branch?

@hfly0
Copy link
Contributor Author

hfly0 commented Jul 21, 2024

@hfly0 would you mind runnning cargo fmt on your branch?

Oops, I remembered to run the tests, but didn't remember to format the code.

Should be fixed now!

@ithinuel ithinuel merged commit 2e8a7d6 into rp-rs:main Jul 21, 2024
6 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