@@ -148,7 +148,11 @@ fn get_route(active_block: ActiveBlock) -> Route {
148
148
#[ cfg( test) ]
149
149
mod tests {
150
150
use ratatui:: {
151
- backend:: TestBackend , layout:: Position , prelude:: Buffer , style:: { Modifier , Style } , Terminal
151
+ backend:: TestBackend ,
152
+ layout:: Position ,
153
+ prelude:: Buffer ,
154
+ style:: { Modifier , Style } ,
155
+ Terminal ,
152
156
} ;
153
157
154
158
use super :: * ;
@@ -200,22 +204,29 @@ mod tests {
200
204
for col in 0 ..=99 {
201
205
match ( col, row) {
202
206
( 1 ..=15 , 0 ) => {
203
- expected. cell_mut ( Position :: new ( col, row) ) . unwrap ( ) . set_style (
204
- Style :: default ( )
205
- . fg ( COLOR_YELLOW )
206
- . add_modifier ( Modifier :: BOLD ) ,
207
- ) ;
207
+ expected
208
+ . cell_mut ( Position :: new ( col, row) )
209
+ . unwrap ( )
210
+ . set_style (
211
+ Style :: default ( )
212
+ . fg ( COLOR_YELLOW )
213
+ . add_modifier ( Modifier :: BOLD ) ,
214
+ ) ;
208
215
}
209
216
( 51 ..=82 , 0 ) | ( 51 ..=67 , 8 ) | ( 1 ..=20 , 14 ) => {
210
- expected. cell_mut ( Position :: new ( col, row) ) . unwrap ( ) . set_style (
211
- Style :: default ( )
212
- . fg ( COLOR_WHITE )
213
- . add_modifier ( Modifier :: BOLD ) ,
214
- ) ;
217
+ expected
218
+ . cell_mut ( Position :: new ( col, row) )
219
+ . unwrap ( )
220
+ . set_style (
221
+ Style :: default ( )
222
+ . fg ( COLOR_WHITE )
223
+ . add_modifier ( Modifier :: BOLD ) ,
224
+ ) ;
215
225
}
216
226
( 0 | 16 ..=49 , 0 ) | ( 0 ..=49 , 13 ) | ( 0 | 49 , 1 ..=13 | 20 ..=99 ) => {
217
227
expected
218
- . cell_mut ( Position :: new ( col, row) ) . unwrap ( )
228
+ . cell_mut ( Position :: new ( col, row) )
229
+ . unwrap ( )
219
230
. set_style ( Style :: default ( ) . fg ( COLOR_YELLOW ) ) ;
220
231
}
221
232
( 51 , 1 | 4 | 9 | 11 | 13 )
@@ -224,12 +235,14 @@ mod tests {
224
235
| ( 51 ..=70 , 10 | 12 )
225
236
| ( 52 ..=71 , 11 | 12 ) => {
226
237
expected
227
- . cell_mut ( Position :: new ( col, row) ) . unwrap ( )
238
+ . cell_mut ( Position :: new ( col, row) )
239
+ . unwrap ( )
228
240
. set_style ( Style :: default ( ) . fg ( COLOR_CYAN ) ) ;
229
241
}
230
242
_ => {
231
243
expected
232
- . cell_mut ( Position :: new ( col, row) ) . unwrap ( )
244
+ . cell_mut ( Position :: new ( col, row) )
245
+ . unwrap ( )
233
246
. set_style ( Style :: default ( ) . fg ( COLOR_WHITE ) ) ;
234
247
}
235
248
}
0 commit comments