Skip to content

Commit df84578

Browse files
committed
Add Bound tests
1 parent 0772f9a commit df84578

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/libcore/tests/ops.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,18 @@ fn test_range_is_empty() {
8282
assert!( (NAN ..= EPSILON).is_empty());
8383
assert!( (NAN ..= NAN).is_empty());
8484
}
85+
86+
#[test]
87+
fn test_bound_cloned_unbounded() {
88+
assert_eq!(Bound::<&u32>::Unbounded.cloned(), Bound::Unbounded);
89+
}
90+
91+
#[test]
92+
fn test_bound_cloned_included() {
93+
assert_eq!(Bound::Included(&3).cloned(), Bound::Included(3));
94+
}
95+
96+
#[test]
97+
fn test_bound_cloned_excluded() {
98+
assert_eq!(Bound::Excluded(&3).cloned(), Bound::Excluded(3));
99+
}

0 commit comments

Comments
 (0)