|
@@ -45,20 +45,3 @@ impl<T: Ord> Set<T> {
|
|
|
self.count() - self.count_le(value)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-mod tests {
|
|
|
- #[test]
|
|
|
- fn test_count() {
|
|
|
- let mut tree = super::Set::new();
|
|
|
- for i in 1..11 {
|
|
|
- assert!(tree.insert(i));
|
|
|
- assert_eq!(tree.count(), i);
|
|
|
- }
|
|
|
- for i in 1..11 {
|
|
|
- assert_eq!(tree.count_lt(&i), i - 1);
|
|
|
- assert_eq!(tree.count_le(&i), i);
|
|
|
- assert_eq!(tree.count_ge(&i), 11 - i);
|
|
|
- assert_eq!(tree.count_gt(&i), 10 - i);
|
|
|
- }
|
|
|
- }
|
|
|
-}
|