dentiny commented on code in PR #1578:
URL: https://github.com/apache/iceberg-rust/pull/1578#discussion_r2256549232
##########
crates/iceberg/src/delete_vector.rs:
##########
@@ -120,3 +126,32 @@ impl BitOrAssign for DeleteVector {
self.inner.bitor_assign(&other.inner);
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_insertion_and_iteration() {
+ let mut dv = DeleteVector::default();
+ assert!(dv.insert(42));
+ assert!(dv.insert(100));
+ assert!(!dv.insert(42));
+
+ let mut items: Vec<u64> = dv.iter().collect();
+ items.sort();
+ assert_eq!(items, vec![42, 100]);
+ assert_eq!(dv.len(), 2);
+ }
+
+ #[test]
+ fn test_insert_positions() {
Review Comment:
Thanks! Added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]