Skip to content

Commit 62dbd7b

Browse files
committed
Fix unit tests.
1 parent 77bf7c2 commit 62dbd7b

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

plotters/src/element/basic_shapes.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,20 @@ impl<I0: Iterator + Clone, Size: SizeDesc, DB: DrawingBackend> Drawable<DB>
231231
fn test_dashed_path_element() {
232232
use crate::prelude::*;
233233
let check_list = std::cell::RefCell::new(vec![
234-
[(100, 100), (100, 103)],
235-
[(100, 105), (100, 110)],
236-
[(100, 112), (100, 117)],
237-
[(100, 119), (100, 120)],
234+
vec![(100, 100), (100, 103), (100, 118)],
235+
vec![(100, 105), (100, 110)],
236+
vec![(100, 112), (100, 117)],
237+
vec![(100, 119), (100, 120)],
238238
]);
239239
let da = crate::create_mocked_drawing_area(300, 300, |m| {
240240
m.check_draw_path(move |c, s, path| {
241241
assert_eq!(c, BLUE.to_rgba());
242242
assert_eq!(s, 7);
243-
dbg!(&path);
244243
assert_eq!(path, check_list.borrow_mut().remove(0));
245244
});
246245
m.drop_check(|b| {
247-
assert_eq!(b.num_draw_path_call, 4);
248-
assert_eq!(b.draw_count, 4);
246+
assert_eq!(b.num_draw_path_call, 1);
247+
assert_eq!(b.draw_count, 1);
249248
});
250249
});
251250
da.draw(&DashedPathElement::new(

plotters/src/series/line_series.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ mod test {
144144
});
145145

146146
m.drop_check(|b| {
147-
assert_eq!(b.num_draw_path_call, 26);
148-
assert_eq!(b.draw_count, 26);
147+
assert_eq!(b.num_draw_path_call, 9);
148+
assert_eq!(b.draw_count, 9);
149149
});
150150
});
151151

0 commit comments

Comments
 (0)