()
| 138 | |
| 139 | #[test] |
| 140 | fn insert_and_query() { |
| 141 | let mut buf = O3Buffer::new(100); |
| 142 | assert!(buf.insert(make_row(500, 1, 0))); |
| 143 | assert!(buf.insert(make_row(300, 1, 0))); |
| 144 | assert!(buf.insert(make_row(700, 2, 0))); |
| 145 | assert_eq!(buf.len(), 3); |
| 146 | |
| 147 | let results = buf.query_range(200, 600); |
| 148 | assert_eq!(results.len(), 2); |
| 149 | // Should be sorted by timestamp. |
| 150 | assert_eq!(results[0].timestamp_ms, 300); |
| 151 | assert_eq!(results[1].timestamp_ms, 500); |
| 152 | } |
| 153 | |
| 154 | #[test] |
| 155 | fn buffer_full_rejection() { |
nothing calls this directly
no test coverage detected