Closed mattjbray closed 4 weeks ago
Can you add some tests?
Can you add some tests?
Added some simple tests. I'm not sure how to test anything more specific without mocking the displays somehow - any pointers on how to do that would be appreciated.
I've also added #[inline]
attributes to match all the other fns in this module.
Add
CGDisplay::displays_with_point
andCGDisplay::displays_with_rect
.Uses the pattern from
CGDisplay::active_displays
to first get the count of matching displays, then intialize the result Vec withvec![0; count as usize]
.