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

field_options::struct_type::no_overrides test fails on 32-bit x86 (i686) #148

Closed
decathorpe opened this issue Sep 13, 2023 · 1 comment
Closed

Comments

@decathorpe
Copy link

I'm responsible for packaging the fake and dummy crates for Fedora Linux, and I've noticed that one of the tests fails on 32-bit x86 (i686-unknown-linux-gnu target), but it might fail in the same way on other 32-bit architectures:

https://github.com/cksac/fake-rs/blob/master/fake/tests/derive_macros.rs#L166-L176

---- field_options::struct_type::no_overrides stdout ----
thread 'field_options::struct_type::no_overrides' panicked at 'assertion failed: `(left == right)`
  left: `"k5KuGzxfjPN9Hah"`,
 right: `"5KuGzxfjPN9Ha"`', tests/derive_macros.rs:175:13

I can't tell how the extra two characters (k prefix and h suffix) appear in the output, but maybe it has to do with this line:
https://github.com/cksac/fake-rs/blob/master/fake/src/impls/std/string.rs#L105

The size of usize is different on 32-bit architectures (well, per definition, it's 32 bits instead of 64), might this cause a different length to be randomly initialized?

@cksac
Copy link
Owner

cksac commented Oct 25, 2023

updated test, should be ok now

@cksac cksac closed this as completed Dec 1, 2023
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

No branches or pull requests

2 participants