diff --git a/src/public_tests.rs b/src/public_tests.rs index e6806e2..72c8110 100644 --- a/src/public_tests.rs +++ b/src/public_tests.rs @@ -45,7 +45,12 @@ fn test_set_get_string() { "HELLO".to_string() ); - // Can set string convertible bytes and fetch it back as string. + assert_eq!( + store.get_bytes("ABC".to_string()).unwrap().unwrap(), + "HELLO".as_bytes().to_vec() + ); + + // Can set bytes and fetch it back as string. store.set_bytes("XYZ".to_string(), "HELLO".as_bytes().to_vec(), Some(5000)); assert_eq!( store.get_string("ABC".to_string()).unwrap().unwrap(), @@ -59,7 +64,7 @@ fn test_pop_string() { store.set_string("ABC".to_string(), "HELLO".to_string(), Some(5000)); assert_eq!( store.pop_string("ABC".to_string()).unwrap().unwrap(), - "HELLO" + "HELLO".to_string() ); } @@ -71,10 +76,6 @@ fn test_set_get_bytes() { store.get_bytes("ABC".to_string()).unwrap().unwrap(), "HELLO".as_bytes().to_vec() ); - assert_eq!( - store.get_string("ABC".to_string()).unwrap().unwrap(), - "HELLO".to_string() - ); } #[test]