diff --git a/compatibility/README.md b/compatibility/README.md index 1cf64bff..cc7d1e84 100644 --- a/compatibility/README.md +++ b/compatibility/README.md @@ -9,19 +9,19 @@ We have created a test project that can be used to test the compatibility betwee ## Adding a test case for your project To add a test case for your project, please follow the following steps: -- [X] Fork https://github.com/bincode-org/bincode -- [X] create a new file `compatibility/src/.rs`. -- [X] Add a link to your project: https://github.com/ppamorim/openraft/tree/bincode-bug/example-raft-kv -- [X] Add `Licence: MIT OR Apache-2.0` if you agree to distribute your code under this license -- [X] Add a `mod ;` in the `lib.rs`. Make sure it's alphabetically ordered (check the ordering in your file system). -- [X] Add your structs. +- [ ] Fork https://github.com/bincode-org/bincode +- [ ] create a new file `compatibility/src/.rs`. +- [ ] Add a link to your project +- [ ] Add `Licence: MIT OR Apache-2.0` if you agree to distribute your code under this license +- [ ] Add a `mod ;` in the `lib.rs`. Make sure it's alphabetically ordered (check the ordering in your file system). +- [ ] Add your structs. - Adding references to libraries is not recommended. Libraries will not be implementing `bincode 2`'s encoding/decoding system. - If you need references to libraries, consider adding a test case for that library, and then referencing that test. -- [X] Make sure structs derive the following traits: - - [X] `serde::Serialize` and `serde::Deserialize`, like normal - - [X] `bincode_2::Encode` and `bincode_2::Decode`, for the bincode 2 encode/decode mechanic - - [X] Because the crate is renamed to `bincode_2`, you also need to add `#[bincode(crate = "bincode_2")]` - - [X] `Debug, PartialEq` +- [ ] Make sure structs derive the following traits: + - [ ] `serde::Serialize` and `serde::Deserialize`, like normal + - [ ] `bincode_2::Encode` and `bincode_2::Decode`, for the bincode 2 encode/decode mechanic + - [ ] Because the crate is renamed to `bincode_2`, you also need to add `#[bincode(crate = "bincode_2")]` + - [ ] `Debug, PartialEq` ```rs #[derive(Serialize, Deserialize, bincode_2::Encode, bincode_2::Decode, Debug, PartialEq)] @@ -30,9 +30,9 @@ pub struct YourStruct { } ``` -- [X] Use `rand` to be able to generate a random test case for your project. -- [X] For strings there is a helper function in `crate`: `gen_string(rng: &mut impl Rng) -> String` -- [X] Add the following code: +- [ ] Use `rand` to be able to generate a random test case for your project. + - [ ] For strings there is a helper function in `crate`: `gen_string(rng: &mut impl Rng) -> String` +- [ ] Add the following code: ```rs #[test] diff --git a/compatibility/src/membership.rs b/compatibility/src/membership.rs index 0f0c7365..d3ed75a8 100644 --- a/compatibility/src/membership.rs +++ b/compatibility/src/membership.rs @@ -35,7 +35,7 @@ pub fn test() { } fn vec_random_btreeset(rng: &mut ThreadRng) -> Vec> { - let mut vec = Vec::with_capacity(5); + let mut vec = Vec::with_capacity(10); for _ in 0..rng.gen_range(0..10) { vec.push(random_btreeset(rng)); }