Skip to content

Commit

Permalink
add testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang committed Aug 1, 2024
1 parent 93cad9f commit 95a41df
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sync/src/store/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,13 @@ fn test_write_read_in_order() -> anyhow::Result<()> {

assert_eq!(expect_order, db_order);

let mut iter_to_see_empty = sync_dag_store.iter_at_first()?;
assert!(iter_to_see_empty.next().is_some());

sync_dag_store.delete_all_dag_sync_block()?;

iter_to_see_empty = sync_dag_store.iter_at_first()?;
assert!(iter_to_see_empty.next().is_none());

Ok(())
}

0 comments on commit 95a41df

Please sign in to comment.