mirror of
https://github.com/danog/ytop.git
synced 2024-11-30 04:29:10 +01:00
fix tests
This commit is contained in:
parent
8051c1317b
commit
2468e84a10
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user