-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(core): add unit tests for merge
trait
#1738
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be valuable to include tests for conflict scenarios as well? For example:
let mut map1: BTreeMap<i32, &str> = BTreeMap::new();
map1.insert(1, "a");
let mut map2: BTreeMap<i32, &str> = BTreeMap::new();
map2.insert(1, "b");
map1.merge(map2);
assert_eq!(map1.len(), 1);
assert_eq!(map1.get(&1), Some(&"b"));
I've added refactored empty check assertions and merge conflict tests. Squashed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 871df7bb24b6c15a096d6b98bdfc7d6877cbd29c
…ncluding conflict scenarios and checking for empty structures
ACK 665273d |
Description
This update adds unit tests for the
Merge
trait implementations onBTreeMap
,BTreeSet
,Vec
, and tuples. It also includes tests for theis_empty
andtake
methods to ensure their correct functionality.Notes to the Reviewers
BTreeSet
's existingtake
method.Changelog Notice
is_empty
,take
) on various collection types.Checklists
All Submissions:
cargo fmt
andcargo clippy
before committing.