aboutsummaryrefslogtreecommitdiff
path: root/src/layout/tests.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-05 10:36:46 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-10 07:29:33 -0800
commit64544a572698b2df5520783203f9723a2dfcac12 (patch)
tree55b6d2193fc66a7fcbff9b3a22be5fbca4e0a08e /src/layout/tests.rs
parentd7d5a7f8f6c3faf7e1ea1a36df053769243b51ac (diff)
downloadniri-64544a572698b2df5520783203f9723a2dfcac12.tar.gz
niri-64544a572698b2df5520783203f9723a2dfcac12.tar.bz2
niri-64544a572698b2df5520783203f9723a2dfcac12.zip
tab indicator: Add position setting
Diffstat (limited to 'src/layout/tests.rs')
-rw-r--r--src/layout/tests.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/layout/tests.rs b/src/layout/tests.rs
index dee23fc0..83fef3bc 100644
--- a/src/layout/tests.rs
+++ b/src/layout/tests.rs
@@ -1,6 +1,9 @@
use std::cell::Cell;
-use niri_config::{FloatOrInt, OutputName, TabIndicatorLength, WorkspaceName, WorkspaceReference};
+use niri_config::{
+ FloatOrInt, OutputName, TabIndicatorLength, TabIndicatorPosition, WorkspaceName,
+ WorkspaceReference,
+};
use proptest::prelude::*;
use proptest_derive::Arbitrary;
use smithay::output::{Mode, PhysicalProperties, Subpixel};
@@ -3200,6 +3203,15 @@ fn arbitrary_center_focused_column() -> impl Strategy<Value = CenterFocusedColum
]
}
+fn arbitrary_tab_indicator_position() -> impl Strategy<Value = TabIndicatorPosition> {
+ prop_oneof![
+ Just(TabIndicatorPosition::Left),
+ Just(TabIndicatorPosition::Right),
+ Just(TabIndicatorPosition::Top),
+ Just(TabIndicatorPosition::Bottom),
+ ]
+}
+
prop_compose! {
fn arbitrary_focus_ring()(
off in any::<bool>(),
@@ -3246,6 +3258,7 @@ prop_compose! {
width in arbitrary_spacing(),
gap in arbitrary_spacing_neg(),
length in (0f64..2f64),
+ position in arbitrary_tab_indicator_position(),
) -> niri_config::TabIndicator {
niri_config::TabIndicator {
off,
@@ -3253,6 +3266,7 @@ prop_compose! {
width: FloatOrInt(width),
gap: FloatOrInt(gap),
length: TabIndicatorLength { total_proportion: Some(length) },
+ position,
..Default::default()
}
}