+
+ #[test]
+ fn some_coordinates_on_line() {
+ // horizontally up
+ let coords = supercover_line(point!(0.0, 0.0), point!(3.3, 2.2));
+ assert_eq!(coords.as_slice(), &[point!(0, 0), point!(1, 0), point!(1, 1), point!(2, 1), point!(2, 2), point!(3, 2)]);
+
+ // horizontally down
+ let coords = supercover_line(point!(0.0, 5.0), point!(3.3, 2.2));
+ assert_eq!(coords.as_slice(), &[point!(0, 5), point!(0, 4), point!(1, 4), point!(1, 3), point!(2, 3), point!(2, 2), point!(3, 2)]);
+
+ // vertically right
+ let coords = supercover_line(point!(0.0, 0.0), point!(2.2, 3.3));
+ assert_eq!(coords.as_slice(), &[point!(0, 0), point!(0, 1), point!(1, 1), point!(1, 2), point!(2, 2), point!(2, 3)]);
+
+ // vertically left
+ let coords = supercover_line(point!(5.0, 0.0), point!(3.0, 3.0));
+ assert_eq!(coords.as_slice(), &[point!(5, 0), point!(4, 0), point!(4, 1), point!(3, 1), point!(3, 2), point!(3, 3)]);
+
+ // negative
+ let coords = supercover_line(point!(0.0, 0.0), point!(-3.0, -2.0));
+ assert_eq!(coords.as_slice(), &[point!(-3, -2), point!(-2, -2), point!(-2, -1), point!(-1, -1), point!(-1, 0), point!(0, 0)]);
+
+ //
+ let coords = supercover_line(point!(0.0, 0.0), point!(2.3, 1.1));
+ assert_eq!(coords.as_slice(), &[point!(0, 0), point!(1, 0), point!(2, 0), point!(2, 1)]);
+ }