about summary refs log tree commit diff
path: root/src/libcore/tests
diff options
context:
space:
mode:
authorChris Gregory <czipperz@gmail.com>2019-05-31 11:36:37 -0500
committerChris Gregory <czipperz@gmail.com>2019-05-31 11:36:37 -0500
commitdf845784ee74cee760caf38064d39e14a23ef791 (patch)
tree84854efbe49e5b81cded5087f11a237b1b9c6462 /src/libcore/tests
parent0772f9a92082c3f5a734e1fae198f817bbf2f61f (diff)
downloadrust-df845784ee74cee760caf38064d39e14a23ef791.tar.gz
rust-df845784ee74cee760caf38064d39e14a23ef791.zip
Add Bound tests
Diffstat (limited to 'src/libcore/tests')
-rw-r--r--src/libcore/tests/ops.rs15
1 files changed, 15 insertions, 0 deletions
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));
+}