We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7abb6c0 commit 2fe6802Copy full SHA for 2fe6802
src/pure/stack_set.rs
@@ -1309,6 +1309,26 @@ pub mod tests {
1309
1310
assert!(matches!(res, Err(Error::NoScreens)));
1311
}
1312
+
1313
1314
+ #[test_case(true,1,1; "forward")]
1315
+ #[test_case(false,1,3; "backward")]
1316
+ #[test_case(true,4,0; "forward loop to start")]
1317
+ #[test]
1318
+ fn tag_cycle_focuses_correct_tag(forward: bool,count:usize, expected_index: usize) {
1319
+ let mut s = test_stack_set(4,2);
1320
1321
+ for _ in 0..count{
1322
+ if forward {
1323
+ s.next_tag()
1324
+ } else {
1325
+ s.previous_tag()
1326
+ }
1327
1328
+ let tags=s.ordered_tags();
1329
1330
+ assert_eq!(s.current_tag(), tags[expected_index]);
1331
1332
1333
1334
#[cfg(test)]
0 commit comments