Skip to content

Fix as_bytes() test for big endian targets#34

Merged
joshlf merged 1 commit intogoogle:mainfrom
frazar:fix-big-endian-tests
Oct 9, 2022
Merged

Fix as_bytes() test for big endian targets#34
joshlf merged 1 commit intogoogle:mainfrom
frazar:fix-big-endian-tests

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

@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 frazar force-pushed the fix-big-endian-tests branch from 8ed0321 to 059cfac Compare October 9, 2022 20:53
@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 <frazar@users.noreply.github.com>
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