mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-05 23:03:06 +00:00
add test_peek_last
This commit is contained in:
parent
54c5490099
commit
3ee40bcc0b
@ -116,6 +116,14 @@ mod tests {
|
||||
assert_eq!(pool.len(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_peek_last() {
|
||||
let mut pool = MemPool::new();
|
||||
pool.push_item(test_item_with_id(1));
|
||||
pool.push_item(test_item_with_id(2));
|
||||
let item = pool.peek_last();
|
||||
assert_eq!(item, Some(&test_item_with_id(1)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_push_pop() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user