diff --git a/Cargo.toml b/Cargo.toml index f8d6e7f9..7db4c2f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,6 +84,5 @@ crossbeam-utils = "0.8" fastrand = "2" paste = "1" quickcheck = { default-features = false, git = "https://github.com/taiki-e/quickcheck.git", branch = "dev" } # https://github.com/BurntSushi/quickcheck/pull/304 + https://github.com/BurntSushi/quickcheck/pull/282 + lower MSRV -serde_test = "1" sptr = "0.3" static_assertions = "1" diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 3a14c0e4..1e1555f2 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -318,8 +318,7 @@ LLVM version: 15.0.3", #[cfg(feature = "serde")] #[test] fn test_serde() { - use serde_test::{assert_tokens, Token}; - use test_helper::serde::DebugPartialEq; + use test_helper::serde::{assert_tokens, DebugPartialEq, Token}; macro_rules! t { ($atomic_type:ty, $value_type:ident, $token_type:ident) => { @@ -346,7 +345,7 @@ fn test_serde() { t!(AtomicU32, u32, U32); t!(AtomicI64, i64, I64); t!(AtomicU64, u64, U64); - // TODO: serde_test doesn't support Token::{I128,U128} + // TODO: serde_test doesn't support Token::{I128,U128}: https://github.com/serde-rs/test/pull/6 // t!(AtomicI128, i128, I128); // t!(AtomicU128, u128, U128); #[cfg(feature = "float")] diff --git a/tests/helper/Cargo.toml b/tests/helper/Cargo.toml index e84f4e1d..3e999c7d 100644 --- a/tests/helper/Cargo.toml +++ b/tests/helper/Cargo.toml @@ -11,12 +11,13 @@ doc = false test = false [features] -std = ["critical-section", "fs-err", "serde", "libc", "windows-sys"] +std = ["critical-section", "fs-err", "serde", "serde_test", "libc", "windows-sys"] [dependencies] critical-section = { version = "1", optional = true, features = ["restore-state-bool"] } fs-err = { version = "2", optional = true } serde = { version = "1", optional = true } +serde_test = { version = "1", optional = true } [target.'cfg(unix)'.dependencies] libc = { version = "0.2.140", optional = true } diff --git a/tests/helper/src/serde.rs b/tests/helper/src/serde.rs index a21714fd..f35deb06 100644 --- a/tests/helper/src/serde.rs +++ b/tests/helper/src/serde.rs @@ -1,6 +1,7 @@ use std::fmt; use serde::{Deserialize, Serialize}; +pub use serde_test::*; #[derive(Debug)] pub struct DebugPartialEq(pub T);