use crate::db::executor::terminal::{bytes_window_accept_row, bytes_window_limit_exhausted};
#[test]
fn bytes_window_accept_row_respects_offset_and_limit() {
let mut offset_remaining = 2usize;
let mut limit_remaining = Some(2usize);
assert!(!bytes_window_accept_row(
&mut offset_remaining,
&mut limit_remaining
));
assert!(!bytes_window_accept_row(
&mut offset_remaining,
&mut limit_remaining
));
assert!(bytes_window_accept_row(
&mut offset_remaining,
&mut limit_remaining
));
assert!(bytes_window_accept_row(
&mut offset_remaining,
&mut limit_remaining
));
assert!(!bytes_window_accept_row(
&mut offset_remaining,
&mut limit_remaining
));
assert!(bytes_window_limit_exhausted(limit_remaining));
}