Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pluveto
Copy link

@pluveto pluveto commented Nov 21, 2024

Description

This update adds unit tests for the Merge trait implementations on BTreeMap, BTreeSet, Vec, and tuples. It also includes tests for the is_empty and take methods to ensure their correct functionality.

Notes to the Reviewers

  • The tests cover basic scenarios for merging collections and checking their emptiness.
  • Consider the potential method name conflict with BTreeSet's existing take method.

Changelog Notice

  • Added unit tests for merging functionality and utility methods (is_empty, take) on various collection types.

Checklists

All Submissions:

  • I've signed all my commits.
  • I followed the contribution guidelines.
  • I ran cargo fmt and cargo clippy before committing.

assert!(set.is_empty());

let vec: Vec<i32> = Vec::new();
assert!(vec.is_empty());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we qualify these with the trait method also?

Suggested change
assert!(vec.is_empty());
assert!(Merge::is_empty(&vec);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants