mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-02-03 04:53:08 +00:00
add test_pop_last
This commit is contained in:
parent
6f5b0f97b0
commit
54c5490099
@ -106,6 +106,17 @@ mod tests {
|
||||
assert_eq!(pool.len(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_pop_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.pop_last();
|
||||
assert_eq!(item, Some(test_item_with_id(1)));
|
||||
assert_eq!(pool.len(), 1);
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_push_pop() {
|
||||
let mut mempool: MemPool<TestItem> = MemPool::new();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user