about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-02-05 14:15:18 +0000
committerbors <bors@rust-lang.org>2017-02-05 14:15:18 +0000
commit9c8cdb2923a69177017165a4cdb0e1ea673fc49f (patch)
tree69ebb9fa31a84a98c42c14f56e866762a844ce2f /src/libcoretest
parent696f5c1fc695494053709ae3b18b4c6a65b619a6 (diff)
parent0a09274e27c7b409a321c0c7ed20d99492601b44 (diff)
downloadrust-9c8cdb2923a69177017165a4cdb0e1ea673fc49f.tar.gz
rust-9c8cdb2923a69177017165a4cdb0e1ea673fc49f.zip
Auto merge of #39563 - frewsxcv:rollup, r=frewsxcv
Rollup of 19 pull requests

- Successful merges: #38518, #38921, #38959, #38983, #39009, #39107, #39193, #39289, #39312, #39393, #39442, #39443, #39453, #39454, #39471, #39477, #39478, #39527, #39552
- Failed merges:
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/iter.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcoretest/iter.rs b/src/libcoretest/iter.rs
index 6d02f76c33d..c7833dbd156 100644
--- a/src/libcoretest/iter.rs
+++ b/src/libcoretest/iter.rs
@@ -192,6 +192,12 @@ fn test_iterator_enumerate_count() {
 }
 
 #[test]
+fn test_iterator_filter_count() {
+    let xs = [0, 1, 2, 3, 4, 5, 6, 7, 8];
+    assert_eq!(xs.iter().filter(|&&x| x % 2 == 0).count(), 5);
+}
+
+#[test]
 fn test_iterator_peekable() {
     let xs = vec![0, 1, 2, 3, 4, 5];
     let mut it = xs.iter().cloned().peekable();