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

Fix as_bytes() test for big endian targets #34

Merged
merged 1 commit into from
Oct 9, 2022

Conversation

frazar
Copy link
Contributor

@frazar frazar commented Oct 8, 2022

The tests for the as_bytes() method assumed that bytes are stored in little endian order, which is not the case for PowerPC. Fix the alignment tests so that they work on both little and big endian targets.

Fixes #23

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@joshlf
Copy link
Member

joshlf commented Oct 8, 2022

Awesome, thanks @frazar! Left a few comments.

The tests for the as_bytes() method assumed that bytes are stored in
little endian order, which is not the case for PowerPC.
Fix the alignment tests so that they work on both little and big endian
targets.

Fixes google#23
@frazar
Copy link
Contributor Author

frazar commented Oct 9, 2022

Great! Should be ready now.

@joshlf joshlf merged commit 49fc9ff into google:main Oct 9, 2022
@joshlf
Copy link
Member

joshlf commented Oct 9, 2022

Thanks again!

@frazar
Copy link
Contributor Author

frazar commented Oct 10, 2022

May I ask you to add the "Hacktoberfest-accepted" label to this PR? Thanks!

@joshlf
Copy link
Member

joshlf commented Oct 10, 2022

May I ask you to add the "Hacktoberfest-accepted" label to this PR? Thanks!

Done!

@frazar
Copy link
Contributor Author

frazar commented Oct 10, 2022

Great, thanks!

@frazar frazar deleted the fix-big-endian-tests branch October 10, 2022 20:15
joshlf pushed a commit that referenced this pull request Aug 3, 2023
The tests for the `as_bytes` method assumed that bytes are stored in
little endian order, which is not the case for PowerPC. Fix the alignment
tests so that they work on both little and big endian targets.

Fixes #23

Co-authored-by: Francesco Zardi <[email protected]>
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.

test_as_bytes_methods fails on powerpc
2 participants