From 04845f0aebd6928bb924147fd93de8dac13ff850 Mon Sep 17 00:00:00 2001 From: blake2-ppc Date: Sun, 1 Sep 2013 16:43:47 +0200 Subject: std::iterator: Add back .rposition() test --- src/libstd/vec.rs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/libstd/vec.rs') diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 39560bd47e6..f8aaf653645 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -2910,16 +2910,6 @@ mod tests { assert!(v1.position_elem(&4).is_none()); } - #[test] - fn test_rposition() { - fn f(xy: &(int, char)) -> bool { let (_x, y) = *xy; y == 'b' } - fn g(xy: &(int, char)) -> bool { let (_x, y) = *xy; y == 'd' } - let v = ~[(0, 'a'), (1, 'b'), (2, 'c'), (3, 'b')]; - - assert_eq!(v.iter().rposition(f), Some(3u)); - assert!(v.iter().rposition(g).is_none()); - } - #[test] fn test_bsearch_elem() { assert_eq!([1,2,3,4,5].bsearch_elem(&5), Some(4)); -- cgit 1.4.1-3-g733a5