From 983cb32b40bbf15be8977dbfdca9d4e2691e8e56 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 7 Apr 2019 16:13:10 -0700 Subject: [PATCH] Add test of common PartialEq cases --- tests/test_partialeq.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/test_partialeq.rs diff --git a/tests/test_partialeq.rs b/tests/test_partialeq.rs new file mode 100644 index 0000000..5497641 --- /dev/null +++ b/tests/test_partialeq.rs @@ -0,0 +1,13 @@ +use serde_bytes::{Bytes, ByteBuf}; + +fn _bytes_eq_slice(bytes: &Bytes, slice: &[u8]) -> bool { + bytes == slice +} + +fn _bytebuf_eq_vec(bytebuf: ByteBuf, vec: Vec) -> bool { + bytebuf == vec +} + +fn _bytes_eq_bytestring(bytes: &Bytes) -> bool { + bytes == b"..." +}