bincode/tests
Sean Cross d7edfaa0b7 Fix riscv32 atomics and fix tests on 32-bit platforms (#533)
* tests: fix alloc range test on 32-bit Windows

This test checks the range, which is necessarily different when running
on another platform.

Signed-off-by: Sean Cross <sean@xobs.io>

* enc: case usize/isize as u64/i64 in serialization

The deserialization process assumes that usize/isize are 64-bits, as
does the spec at
https://github.com/bincode-org/bincode/blob/trunk/docs/spec.md#varintencoding

Force `usize` and `isize` to be encoded as `u64` and `i64` to force
32-bit platforms to conform to this spec.

This fixes running tests under `cargo test --target i686-pc-windows-msvc`

Signed-off-by: Sean Cross <sean@xobs.io>

* atomic: only provide Atomic*64 on supported platforms

Not all platforms support AtomicI64 or AtomicU64. Use the
`target_has_atomic` config flag to determine whether to include these.

This fixes #532.

Signed-off-by: Sean Cross <sean@xobs.io>

* atomic: remove feature and use new attributes

Now that there is an attribute to indicate which atomic features are
supported on this platform, remove the `atomic` Feature and use these
new attributes.

Signed-off-by: Sean Cross <sean@xobs.io>

* alloc: run `cargo fmt`

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-08 11:35:13 +02:00
..
issues Made the Cow Encode constraints more permissive (#524) 2022-03-17 11:31:22 +01:00
alloc.rs Fix riscv32 atomics and fix tests on 32-bit platforms (#533) 2022-04-08 11:35:13 +02:00
atomic.rs Added support for atomic integers 2021-10-16 14:49:18 +02:00
basic_types.rs Made config::standard() implement .write_fixed_array_header() by default (#509) 2022-02-28 17:26:46 +01:00
derive.rs Fixed an error in bincode derive where it would implement the wrong trait if a generic parameter is present (#487) 2022-01-23 10:10:36 +01:00
derive_rename.rs Updated to virtue 0.0.6, added #[bincode(crate = other)] attribute (#494) 2022-01-31 19:46:57 +01:00
issues.rs Made the Cow Encode constraints more permissive (#524) 2022-03-17 11:31:22 +01:00
serde.rs Made config::standard() implement .write_fixed_array_header() by default (#509) 2022-02-28 17:26:46 +01:00
std.rs Extended Encode and Decode for HashMap and HashSet to support custom hashers (#529) 2022-03-28 12:19:33 +02:00
utils.rs Made config::standard() implement .write_fixed_array_header() by default (#509) 2022-02-28 17:26:46 +01:00