rectangles: format with skips
-
-
use rectangles::count;
#[test]
@@ -25,6 +23,7 @@ fn test_empty_area() {
#[test]
#[ignore]
fn test_one_rectangle() {
+ #[rustfmt::skip]
let lines = &[
"+-+",
"| |",
@@ -36,12 +35,13 @@ fn test_one_rectangle() {
#[test]
#[ignore]
fn test_two_rectangles_no_shared_parts() {
+ #[rustfmt::skip]
let lines = &[
" +-+",
" | |",
"+-+-+",
"| | ",
- "+-+ "
+ "+-+ ",
];
assert_eq!(2, count(lines))
}
@@ -49,12 +49,13 @@ fn test_two_rectangles_no_shared_parts() {
#[test]
#[ignore]
fn test_five_rectangles_three_regions() {
+ #[rustfmt::skip]
let lines = &[
" +-+",
" | |",
"+-+-+",
"| | |",
- "+-+-+"
+ "+-+-+",
];
assert_eq!(5, count(lines))
}
@@ -62,9 +63,10 @@ fn test_five_rectangles_three_regions() {
#[test]
#[ignore]
fn rectangle_of_height_1() {
+ #[rustfmt::skip]
let lines = &[
"+--+",
- "+--+"
+ "+--+",
];
assert_eq!(1, count(lines))
}
@@ -72,10 +74,11 @@ fn rectangle_of_height_1() {
#[test]
#[ignore]
fn rectangle_of_width_1() {
+ #[rustfmt::skip]
let lines = &[
"++",
"||",
- "++"
+ "++",
];
assert_eq!(1, count(lines))
}
@@ -83,9 +86,10 @@ fn rectangle_of_width_1() {
#[test]
#[ignore]
fn unit_square() {
+ #[rustfmt::skip]
let lines = &[
"++",
- "++"
+ "++",
];
assert_eq!(1, count(lines))
}
@@ -93,12 +97,13 @@ fn unit_square() {
#[test]
#[ignore]
fn test_incomplete_rectangles() {
+ #[rustfmt::skip]
let lines = &[
" +-+",
" |",
"+-+-+",
"| | -",
- "+-+-+"
+ "+-+-+",
];
assert_eq!(1, count(lines))
}
@@ -111,7 +116,7 @@ fn test_complicated() {
"| | |",
"+---+--+ |",
"| | |",
- "+---+-------+"
+ "+---+-------+",
];
assert_eq!(3, count(lines))
}
@@ -124,7 +129,7 @@ fn test_not_so_complicated() {
"| | |",
"+------+ |",
"| | |",
- "+---+-------+"
+ "+---+-------+",
];
assert_eq!(2, count(lines))
}
@@ -140,7 +145,7 @@ fn test_large_input_with_many_rectangles() {
"+---+--+--+-+",
"+---+--+--+-+",
"+------+ | |",
- " +-+"
+ " +-+",
];
assert_eq!(60, count(lines))
}
