Skip to content

Commit

Permalink
Add merge tests for more corner cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
partim committed Apr 22, 2024
1 parent 9596f31 commit 4d05e6a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1382,8 +1382,23 @@ mod test {

#[test]
fn set_merge() {
assert!(
set([block([], 0..0)]).merge(
&set([block([], 0..0)])
).iter().eq(set([block([], 0..0)]).iter())
);
assert!(
set([block([1, 3, 4], 0..3)]).merge(
&set([block([1, 3, 4], 0..3)])
).iter().eq(set([block([1, 3, 4], 0..3)]).iter())
);
assert!(
set([block([1, 3, 4], 0..3)]).merge(
&set([block([], 0..0)])
).iter().eq(set([block([1, 3, 4], 0..3)]).iter())
);
assert!(
set([block([], 0..0)]).merge(
&set([block([1, 3, 4], 0..3)])
).iter().eq(set([block([1, 3, 4], 0..3)]).iter())
);
Expand Down

0 comments on commit 4d05e6a

Please sign in to comment.