From df845784ee74cee760caf38064d39e14a23ef791 Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Fri, 31 May 2019 11:36:37 -0500 Subject: [PATCH] Add Bound tests --- src/libcore/tests/ops.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/libcore/tests/ops.rs b/src/libcore/tests/ops.rs index 78cf07119e7..3f6d63fc8a1 100644 --- a/src/libcore/tests/ops.rs +++ b/src/libcore/tests/ops.rs @@ -82,3 +82,18 @@ fn test_range_is_empty() { assert!( (NAN ..= EPSILON).is_empty()); assert!( (NAN ..= NAN).is_empty()); } + +#[test] +fn test_bound_cloned_unbounded() { + assert_eq!(Bound::<&u32>::Unbounded.cloned(), Bound::Unbounded); +} + +#[test] +fn test_bound_cloned_included() { + assert_eq!(Bound::Included(&3).cloned(), Bound::Included(3)); +} + +#[test] +fn test_bound_cloned_excluded() { + assert_eq!(Bound::Excluded(&3).cloned(), Bound::Excluded(3)); +}