diff options
| author | blake2-ppc <blake2-ppc> | 2013-09-01 16:43:47 +0200 |
|---|---|---|
| committer | blake2-ppc <blake2-ppc> | 2013-09-01 18:17:19 +0200 |
| commit | 04845f0aebd6928bb924147fd93de8dac13ff850 (patch) | |
| tree | a823cc9a1bb7092046d52775ed4fefd35720b380 /src/libstd/vec.rs | |
| parent | 43ef5ad18410da5f50efc78fbb781f4e1037b02a (diff) | |
| download | rust-04845f0aebd6928bb924147fd93de8dac13ff850.tar.gz rust-04845f0aebd6928bb924147fd93de8dac13ff850.zip | |
std::iterator: Add back .rposition() test
Diffstat (limited to 'src/libstd/vec.rs')
| -rw-r--r-- | src/libstd/vec.rs | 10 |
1 files changed, 0 insertions, 10 deletions
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 @@ -2911,16 +2911,6 @@ mod tests { } #[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)); assert_eq!([1,2,3,4,5].bsearch_elem(&4), Some(3)); |
