about summary refs log tree commit diff
path: root/src/libcore/tests
diff options
context:
space:
mode:
authorNiv Kaminer <nivkner@zoho.com>2017-09-29 10:54:55 +0300
committerNiv Kaminer <nivkner@zoho.com>2017-09-30 11:33:47 +0300
commitff99111f482096248e7b37eeaf46ee8174d05b00 (patch)
tree1bf3d7517214fd8ad4174b259e45f2bc18a9c6ca /src/libcore/tests
parentb7041bfab3a83702a8026fb7a18d8ea7d54cc648 (diff)
address some `FIXME`s whose associated issues were marked as closed
remove FIXME(#13101) since `assert_receiver_is_total_eq` stays.
remove FIXME(#19649) now that stability markers render.
remove FIXME(#13642) now the benchmarks were moved.
remove FIXME(#6220) now that floating points can be formatted.
remove FIXME(#18248) and write tests for `Rc<str>` and `Rc<[u8]>`
remove reference to irelevent issues in FIXME(#1697, #2178...)
update FIXME(#5516) to point to getopts issue 7
update FIXME(#7771) to point to RFC 628
update FIXME(#19839) to point to issue 26925
Diffstat (limited to 'src/libcore/tests')
-rw-r--r--src/libcore/tests/hash/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libcore/tests/hash/mod.rs b/src/libcore/tests/hash/mod.rs
index e8ea6044f5f..43ba941f13b 100644
--- a/src/libcore/tests/hash/mod.rs
+++ b/src/libcore/tests/hash/mod.rs
@@ -12,6 +12,7 @@ mod sip;
 
 use std::hash::{Hash, Hasher};
 use std::default::Default;
+use std::rc::Rc;
 
 struct MyHasher {
     hash: u64,
@@ -64,12 +65,14 @@ fn test_writer_hasher() {
     assert_eq!(hash(& s), 97 + 0xFF);
     let s: Box<str> = String::from("a").into_boxed_str();
     assert_eq!(hash(& s), 97 + 0xFF);
+    let s: Rc<&str> = Rc::new("a");
+    assert_eq!(hash(&s), 97 + 0xFF);
     let cs: &[u8] = &[1, 2, 3];
     assert_eq!(hash(& cs), 9);
     let cs: Box<[u8]> = Box::new([1, 2, 3]);
     assert_eq!(hash(& cs), 9);
-
-    // FIXME (#18248) Add tests for hashing Rc<str> and Rc<[T]>
+    let cs: Rc<[u8]> = Rc::new([1, 2, 3]);
+    assert_eq!(hash(& cs), 9);
 
     let ptr = 5_usize as *const i32;
     assert_eq!(hash(&ptr), 5);