Skip to content

Commit ac98d64

Browse files
committed
rectangles: format with skips
1 parent 1914977 commit ac98d64

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

exercises/rectangles/tests/rectangles.rs

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
use rectangles::count;
42

53
#[test]
@@ -25,81 +23,88 @@ fn test_empty_area() {
2523
#[test]
2624
#[ignore]
2725
fn test_one_rectangle() {
26+
#[rustfmt::skip]
2827
let lines = &[
2928
"+-+",
3029
"| |",
3130
"+-+",
32-
];
31+
];
3332
assert_eq!(1, count(lines))
3433
}
3534

3635
#[test]
3736
#[ignore]
3837
fn test_two_rectangles_no_shared_parts() {
38+
#[rustfmt::skip]
3939
let lines = &[
4040
" +-+",
4141
" | |",
4242
"+-+-+",
4343
"| | ",
44-
"+-+ "
45-
];
44+
"+-+ ",
45+
];
4646
assert_eq!(2, count(lines))
4747
}
4848

4949
#[test]
5050
#[ignore]
5151
fn test_five_rectangles_three_regions() {
52+
#[rustfmt::skip]
5253
let lines = &[
5354
" +-+",
5455
" | |",
5556
"+-+-+",
5657
"| | |",
57-
"+-+-+"
58-
];
58+
"+-+-+",
59+
];
5960
assert_eq!(5, count(lines))
6061
}
6162

6263
#[test]
6364
#[ignore]
6465
fn rectangle_of_height_1() {
66+
#[rustfmt::skip]
6567
let lines = &[
6668
"+--+",
67-
"+--+"
68-
];
69+
"+--+",
70+
];
6971
assert_eq!(1, count(lines))
7072
}
7173

7274
#[test]
7375
#[ignore]
7476
fn rectangle_of_width_1() {
77+
#[rustfmt::skip]
7578
let lines = &[
7679
"++",
7780
"||",
78-
"++"
79-
];
81+
"++",
82+
];
8083
assert_eq!(1, count(lines))
8184
}
8285

8386
#[test]
8487
#[ignore]
8588
fn unit_square() {
89+
#[rustfmt::skip]
8690
let lines = &[
8791
"++",
88-
"++"
89-
];
92+
"++",
93+
];
9094
assert_eq!(1, count(lines))
9195
}
9296

9397
#[test]
9498
#[ignore]
9599
fn test_incomplete_rectangles() {
100+
#[rustfmt::skip]
96101
let lines = &[
97102
" +-+",
98103
" |",
99104
"+-+-+",
100105
"| | -",
101-
"+-+-+"
102-
];
106+
"+-+-+",
107+
];
103108
assert_eq!(1, count(lines))
104109
}
105110

@@ -111,8 +116,8 @@ fn test_complicated() {
111116
"| | |",
112117
"+---+--+ |",
113118
"| | |",
114-
"+---+-------+"
115-
];
119+
"+---+-------+",
120+
];
116121
assert_eq!(3, count(lines))
117122
}
118123

@@ -124,8 +129,8 @@ fn test_not_so_complicated() {
124129
"| | |",
125130
"+------+ |",
126131
"| | |",
127-
"+---+-------+"
128-
];
132+
"+---+-------+",
133+
];
129134
assert_eq!(2, count(lines))
130135
}
131136

@@ -140,7 +145,7 @@ fn test_large_input_with_many_rectangles() {
140145
"+---+--+--+-+",
141146
"+---+--+--+-+",
142147
"+------+ | |",
143-
" +-+"
144-
];
148+
" +-+",
149+
];
145150
assert_eq!(60, count(lines))
146151
}

0 commit comments

Comments
 (0)