Skip to content

Commit

Permalink
chore: minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
he-ym committed Jan 12, 2024
1 parent 39b37e9 commit 1d1c8c1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/public_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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()
);
}

Expand All @@ -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]
Expand Down

0 comments on commit 1d1c8c1

Please sign in to comment.