1
0
mirror of https://github.com/danog/ytop.git synced 2024-11-26 12:04:50 +01:00

fix tests

This commit is contained in:
Richard Patel 2020-04-23 08:13:32 +02:00
parent 8051c1317b
commit 2468e84a10
No known key found for this signature in database
GPG Key ID: 77A6A8A1CF8D1762

View File

@ -172,17 +172,17 @@ mod tests {
#[test]
fn it_does_not_panic_if_max_is_zero() {
let mut widget = Sparkline::default().data(&[0, 0, 0]);
let widget = Sparkline::default().data(&[0, 0, 0]);
let area = Rect::new(0, 0, 3, 1);
let mut buffer = Buffer::empty(area);
widget.draw(area, &mut buffer);
widget.render(area, &mut buffer);
}
#[test]
fn it_does_not_panic_if_max_is_set_to_zero() {
let mut widget = Sparkline::default().data(&[0, 1, 2]).max(0);
let widget = Sparkline::default().data(&[0, 1, 2]).max(0);
let area = Rect::new(0, 0, 3, 1);
let mut buffer = Buffer::empty(area);
widget.draw(area, &mut buffer);
widget.render(area, &mut buffer);
}
}